###############################################################################
name = acpid
-version = 2.0.9
-release = 5
+version = 2.0.16
+release = 1
+
+# ACPI is only available on x86 architectures.
+sup_arches = x86_64 i686
groups = System/Daemons
url = http://tedfelix.com/linux/acpid-netlink.html
end
source_dl = http://tedfelix.com/linux/
+sources = %{thisapp}.tar.xz
build
- build
- sed -e "s/-Werror//g" -i Makefile
- make CC=gcc RPM_OPT_FLAGS="%{CFLAGS}" %{PARALLLEISMFLAGS}
- end
-
install_cmds
mkdir -pv %{BUILDROOT}/etc/acpi/{actions,events}
cp -vf %{DIR_SOURCE}/power %{BUILDROOT}/etc/acpi/events/
cp -vf %{DIR_SOURCE}/power.sh %{BUILDROOT}/etc/acpi/actions/
-
- mkdir -pv %{BUILDROOT}/etc/sysconfig
- cp -vf %{DIR_SOURCE}/acpid.sysconfig %{BUILDROOT}/etc/sysconfig/acpid
end
end
packages
package %{name}
groups += Base
+
+ script postin
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+ # ACPI is enabled by default.
+ /usr/bin/systemctl --no-reload enable acpid.service >/dev/null 2>&1 || :
+ end
+
+ script preun
+ /usr/bin/systemctl --no-reload disable acpid.service >/dev/null 2>&1 || :
+ /usr/bin/systemctl stop acpid.service >/dev/null 2>&1 || :
+ end
+
+ script postun
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+
+ script postup
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+ /usr/bin/systemctl try-restart acpid.service >/dev/null 2>&1 || :
+ end
end
package %{name}-debuginfo
--- /dev/null
+diff -up acpid-2.0.15/Makefile.am.mk acpid-2.0.15/Makefile.am
+--- acpid-2.0.15/Makefile.am.mk 2012-02-17 04:37:12.109907134 +0100
++++ acpid-2.0.15/Makefile.am 2012-03-16 11:27:15.127573044 +0100
+@@ -20,7 +20,7 @@ acpi_listen_SOURCES = acpi_listen.c log.
+
+ dist_man8_MANS = acpid.8 acpi_listen.8
+
+-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO
++dist_doc_DATA =
+
+ # Just docs to add to the dist.
+ # One problem with this is that it includes all files in the samples dir
+diff -up acpid-2.0.15/Makefile.in.mk acpid-2.0.15/Makefile.in
+--- acpid-2.0.15/Makefile.in.mk 2012-03-16 11:28:53.568421905 +0100
++++ acpid-2.0.15/Makefile.in 2012-03-16 11:29:21.679378750 +0100
+@@ -276,7 +276,7 @@ acpid_SOURCES = acpid.c acpi_ids.c conne
+
+ acpi_listen_SOURCES = acpi_listen.c log.c ud_socket.c
+ dist_man8_MANS = acpid.8 acpi_listen.8
+-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO
++dist_doc_DATA =
+
+ # Just docs to add to the dist.
+ # One problem with this is that it includes all files in the samples dir
+++ /dev/null
-diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile
-diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile
-diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile
-diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile
-diff -up acpid-2.0.2/Makefile.makefile acpid-2.0.2/Makefile
---- acpid-2.0.2/Makefile.makefile 2010-01-27 00:36:23.000000000 +0100
-+++ acpid-2.0.2/Makefile 2010-02-25 16:01:39.641024017 +0100
-@@ -31,8 +31,9 @@ MAN8GZ = $(MAN8:.8=.8.gz)
-
- DOCS = COPYING Changelog README TESTPLAN TODO
-
--CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE $(OPT) \
-- -fno-strict-aliasing -g $(DEFS)
-+CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 $(OPT) \
-+ -fno-strict-aliasing -g $(DEFS) $(RPM_OPT_FLAGS) -fPIE
-+LDFLAGS = -pie -Wl,-z,relro
- DEFS = -DVERSION="\"$(VERSION)\""
-
- all: $(PROGS)
-@@ -46,8 +47,8 @@ man: $(MAN8)
-
- install_docs:
- mkdir -p $(DESTDIR)/$(DOCDIR)
-- for a in $(DOCS); do install -m 0644 $$a $(DESTDIR)/$(DOCDIR) ; done
-- cp -a samples $(DESTDIR)/$(DOCDIR)
-+ #for a in $(DOCS); do install -m 0644 $$a $(DESTDIR)/$(DOCDIR) ; done
-+ #cp -a samples $(DESTDIR)/$(DOCDIR)
-
- install: $(PROGS) man install_docs
- mkdir -p $(DESTDIR)/$(SBINDIR)
Description=ACPI Event Daemon
After=syslog.target
-# This could probably benefit from socket activation, but honestly I think it
-# is time for acpid to go away, and hence I am not planning to spend the time
-# to add socket activation here. We use Type=forking to ensure that the
-# communication sockets are in place before boot proceeds with any service
-# needing this service. Would acpid support socket activation we could use
-# Type=simple here.
-
[Service]
Type=forking
-EnvironmentFile=/etc/sysconfig/acpid
-ExecStart=/usr/sbin/acpid $OPTIONS
+ExecStart=/usr/sbin/acpid
[Install]
WantedBy=multi-user.target