]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
acpid: Update to 2.0.16 (among other changes).
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 30 Apr 2012 21:20:18 +0000 (23:20 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 30 Apr 2012 21:20:18 +0000 (23:20 +0200)
The package is from now on only built for x86 architectures
and will be enabled by default when installed.

acpid/acpid.nm
acpid/acpid.sysconfig [deleted file]
acpid/patches/acpid-2.0.15-makefile.patch [new file with mode: 0644]
acpid/patches/acpid-2.0.2-makefile.patch [deleted file]
acpid/systemd/acpid.service

index b0baa161ae076ffbd973e8f6fa8106754139eb50..0973b036ba5abb8b99e2735b8b1f0146da5df416 100644 (file)
@@ -4,8 +4,11 @@
 ###############################################################################
 
 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
@@ -17,26 +20,40 @@ description
 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
diff --git a/acpid/acpid.sysconfig b/acpid/acpid.sysconfig
deleted file mode 100644 (file)
index f0d2bfb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-OPTIONS=
diff --git a/acpid/patches/acpid-2.0.15-makefile.patch b/acpid/patches/acpid-2.0.15-makefile.patch
new file mode 100644 (file)
index 0000000..0168986
--- /dev/null
@@ -0,0 +1,24 @@
+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 
diff --git a/acpid/patches/acpid-2.0.2-makefile.patch b/acpid/patches/acpid-2.0.2-makefile.patch
deleted file mode 100644 (file)
index 0ba9e79..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-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)
index 553b3e2ff73d00c62ac1ecd0b941d9f432003ec3..0826d86e14985c1ca3cc814eed6766af305e2198 100644 (file)
@@ -2,17 +2,9 @@
 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