systemd switch [release 2.0.23-2mamba;Thu Feb 12 2015]

This commit is contained in:
Silvan Calarco 2024-01-05 20:12:05 +01:00
parent 008d1030fe
commit 07f87dc953
2 changed files with 38 additions and 16 deletions

9
acpid.service Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=ACPI event daemon
Documentation=man:acpid(8)
[Service]
ExecStart=/usr/sbin/acpid --foreground --netlink
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +1,6 @@
Name: acpid Name: acpid
Version: 2.0.23 Version: 2.0.23
Release: 1mamba Release: 2mamba
Summary: The ACPI event daemon Summary: The ACPI event daemon
Group: System/Kernel and Hardware Group: System/Kernel and Hardware
Vendor: openmamba Vendor: openmamba
@ -10,11 +10,13 @@ URL: http://sourceforge.net/projects/acpid2
Source0: http://downloads.sourceforge.net/project/acpid2/acpid-%{version}.tar.xz Source0: http://downloads.sourceforge.net/project/acpid2/acpid-%{version}.tar.xz
Source1: acpid-initscript Source1: acpid-initscript
Source2: acpi-sysconfig Source2: acpi-sysconfig
Source3: acpid.service
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%systemd_requires
Requires(pre): chkconfig Requires(pre): chkconfig
Requires(pre): sed Requires(pre): sed
@ -33,8 +35,8 @@ The programs it executes are configured through a set of configuration files, wh
%install %install
%makeinstall %makeinstall
install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/acpid #install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/acpi
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/acpi install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/acpid.service
install -d -m 755 %{buildroot}/etc/acpi/events install -d -m 755 %{buildroot}/etc/acpi/events
#install -m 644 samples/sample.conf %{buildroot}/etc/acpi/events #install -m 644 samples/sample.conf %{buildroot}/etc/acpi/events
@ -49,20 +51,27 @@ chmod 640 %{buildroot}/var/log/acpid
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post %post
if [ $1 -eq 1 ]; then %systemd_post acpid
# new install systemctl -q daemon-reload
chkconfig --add acpid if [ $1 -eq 1 -o -e /etc/rc5.d/S44acpid ]; then
systemctl -q enable acpid
systemctl -q start acpid
fi fi
[ -e %{_sysconfdir}/sysconfig/acpi ] && sed -i "/CPU_FREQ=.*/d" %{_sysconfdir}/sysconfig/acpi #[ -e %{_sysconfdir}/sysconfig/acpi ] && sed -i "/CPU_FREQ=.*/d" %{_sysconfdir}/sysconfig/acpi
exit 0 :
%preun %preun
if [ $1 -eq 0 ]; then %systemd_preun acpid
# erase :
chkconfig --del acpid
service acpid stop %postun
fi %systemd_postun acpid
exit 0 :
%posttrans
# clean broken old sysv links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
:
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -70,11 +79,12 @@ exit 0
%dir %{_sysconfdir}/acpi/events %dir %{_sysconfdir}/acpi/events
%dir %{_sysconfdir}/acpi/actions %dir %{_sysconfdir}/acpi/actions
#%attr(0644,root,root) %{_sysconfdir}/acpi/events/sample.conf #%attr(0644,root,root) %{_sysconfdir}/acpi/events/sample.conf
%attr(0755,root,root) %{_initrddir}/acpid #%attr(0755,root,root) %{_initrddir}/acpid
%config(noreplace) %{_sysconfdir}/sysconfig/acpi #%config(noreplace) %{_sysconfdir}/sysconfig/acpi
%{_bindir}/acpi_listen %{_bindir}/acpi_listen
%{_sbindir}/acpid %{_sbindir}/acpid
%{_sbindir}/kacpimon %{_sbindir}/kacpimon
%{_unitdir}/acpid.service
%{_localstatedir}/log/acpid %{_localstatedir}/log/acpid
%{_mandir}/man8/acpi_listen.8* %{_mandir}/man8/acpi_listen.8*
%{_mandir}/man8/acpid.8* %{_mandir}/man8/acpid.8*
@ -83,6 +93,9 @@ exit 0
%{_datadir}/doc/acpid/* %{_datadir}/doc/acpid/*
%changelog %changelog
* Thu Feb 12 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.23-2mamba
- systemd switch
* Sun Aug 24 2014 Automatic Build System <autodist@mambasoft.it> 2.0.23-1mamba * Sun Aug 24 2014 Automatic Build System <autodist@mambasoft.it> 2.0.23-1mamba
- automatic version update by autodist - automatic version update by autodist