###############################################################################
name = acpid
-version = 2.0.9
-release = 4
+version = 2.0.34
+release = 1
-groups = Base System/Daemons
-url = http://tedfelix.com/linux/acpid-netlink.html
+groups = System/Daemons
+url = https://sourceforge.net/projects/acpid2/
license = GPLv2+
-summary = ACPI Event Daemon.
+summary = ACPI Event Daemon
description
acpid is a daemon that dispatches ACPI events to user-space programs.
end
-source_dl = http://tedfelix.com/linux/
+source_dl = https://sourceforge.net/projects/acpid2/files/
+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}
+ 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