1 | %bcond_with systemd |
---|
2 | |
---|
3 | |
---|
4 | Summary: ACPI Event Daemon |
---|
5 | Summary(ja): ACPI イベントデーモン |
---|
6 | Name: acpid |
---|
7 | Version: 2.0.32 |
---|
8 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
9 | Group: System Environment/Daemons |
---|
10 | Vendor: Project Vine |
---|
11 | Distribution: Vine Linux |
---|
12 | Packager: daisuke |
---|
13 | |
---|
14 | License: GPL |
---|
15 | URL: https://sourceforge.net/projects/acpid2/ |
---|
16 | Source: https://downloads.sourceforge.net/project/acpid2/acpid-%{version}.tar.xz |
---|
17 | Source1: acpid.init |
---|
18 | Source2: acpid.video.conf |
---|
19 | Source3: acpid.power.conf |
---|
20 | Source4: acpid.power.sh |
---|
21 | Source6: acpid.sysconfig |
---|
22 | Source7: acpid.service |
---|
23 | Source8: acpid.socket |
---|
24 | |
---|
25 | # https://sourceforge.net/p/acpid2/tickets/14/ |
---|
26 | Patch0: acpid-2.0.32-kacpimon-dynamic-connections.patch |
---|
27 | |
---|
28 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
29 | %if %{with systemd} |
---|
30 | BuildRequires: systemd |
---|
31 | Requires(post): systemd |
---|
32 | Requires(preun): systemd |
---|
33 | Requires(postun): systemd |
---|
34 | Requires: systemd |
---|
35 | %else |
---|
36 | Requires(post): chkconfig |
---|
37 | Requires(preun): chkconfig, initscripts |
---|
38 | %endif |
---|
39 | |
---|
40 | ExclusiveArch: x86_64 %{ix86} |
---|
41 | |
---|
42 | |
---|
43 | %description |
---|
44 | acpid is a daemon that dispatches ACPI events to user-space programs. |
---|
45 | (bug reports to sunthockin@users.sourceforge.net) |
---|
46 | |
---|
47 | %description -l ja |
---|
48 | acpidはACPIイベントをユーザスペースのプログラムへ素早く伝えるデーモンです。 |
---|
49 | (バグレポートはsunthockin@users.sourceforge.netに送ってください) |
---|
50 | |
---|
51 | |
---|
52 | %prep |
---|
53 | %setup -q |
---|
54 | %patch0 -p1 -b .kacpimon-dynamic-connections |
---|
55 | |
---|
56 | %build |
---|
57 | %configure |
---|
58 | make %{?_smp_mflags} CFLAGS="%{optflags} %{?harden}" |
---|
59 | |
---|
60 | |
---|
61 | %install |
---|
62 | rm -rf %{buildroot} |
---|
63 | mkdir -p %{buildroot} |
---|
64 | make install DESTDIR=%{buildroot} |
---|
65 | |
---|
66 | mkdir -p %{buildroot}%{_sysconfdir}/acpi/events |
---|
67 | mkdir -p %{buildroot}%{_sysconfdir}/acpi/actions |
---|
68 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
---|
69 | chmod 755 %{buildroot}%{_sysconfdir}/acpi/events |
---|
70 | |
---|
71 | install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/acpi/events/video |
---|
72 | install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/acpi/events/power |
---|
73 | install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/acpi/actions/power.sh |
---|
74 | |
---|
75 | install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/acpid |
---|
76 | |
---|
77 | %if %{with systemd} |
---|
78 | mkdir -p %{buildroot}%{_unitdir} |
---|
79 | install -p -m 644 %{SOURCE7} %{SOURCE8} %{buildroot}%{_unitdir} |
---|
80 | %else |
---|
81 | mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d |
---|
82 | install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/acpid |
---|
83 | %endif |
---|
84 | |
---|
85 | rm -rf %{buildroot}%{_docdir}/%{name} |
---|
86 | |
---|
87 | |
---|
88 | %clean |
---|
89 | rm -rf %{buildroot} |
---|
90 | |
---|
91 | |
---|
92 | %post |
---|
93 | %if %{with systemd} |
---|
94 | %systemd_post %{name}.socket %{name}.service |
---|
95 | %else |
---|
96 | # only run on install, not upgrade |
---|
97 | if [ "$1" = "1" ]; then |
---|
98 | /sbin/chkconfig --add acpid |
---|
99 | fi |
---|
100 | if [ -e /var/log/acpid ]; then |
---|
101 | touch /var/log/acpid |
---|
102 | fi |
---|
103 | %endif |
---|
104 | |
---|
105 | %postun |
---|
106 | %if %{with systemd} |
---|
107 | %systemd_postun_with_restart %{name}.socket %{name}.service |
---|
108 | %else |
---|
109 | if [ "$1" -ge "1" ]; then |
---|
110 | /sbin/service acpid condrestart >/dev/null 2>&1 |
---|
111 | fi |
---|
112 | %endif |
---|
113 | |
---|
114 | %preun |
---|
115 | %if %{with systemd} |
---|
116 | %systemd_preun %{name}.socket %{name}.service |
---|
117 | %else |
---|
118 | # only run if this is the last instance to be removed |
---|
119 | if [ "$1" = "0" ]; then |
---|
120 | /sbin/service acpid stop > /dev/null 2>&1 |
---|
121 | /sbin/chkconfig --del acpid |
---|
122 | rm -f /var/run/acpid.socket |
---|
123 | fi |
---|
124 | %endif |
---|
125 | |
---|
126 | |
---|
127 | %files |
---|
128 | %defattr(-,root,root) |
---|
129 | %license COPYING |
---|
130 | %doc Changelog README TODO samples |
---|
131 | %dir %{_sysconfdir}/acpi |
---|
132 | %dir %{_sysconfdir}/acpi/events |
---|
133 | %dir %{_sysconfdir}/acpi/actions |
---|
134 | %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/video |
---|
135 | %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/power |
---|
136 | %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/acpi/actions/power.sh |
---|
137 | %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/acpid |
---|
138 | %{_bindir}/acpi_listen |
---|
139 | %{_sbindir}/acpid |
---|
140 | %{_sbindir}/kacpimon |
---|
141 | %{_mandir}/man8/acpid.8* |
---|
142 | %{_mandir}/man8/acpi_listen.8* |
---|
143 | %{_mandir}/man8/kacpimon.8* |
---|
144 | %if %{with systemd} |
---|
145 | %{_unitdir}/%{name}.service |
---|
146 | %{_unitdir}/%{name}.socket |
---|
147 | %else |
---|
148 | %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/acpid |
---|
149 | %endif |
---|
150 | |
---|
151 | %changelog |
---|
152 | * Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.32-1 |
---|
153 | - new upstream release. |
---|
154 | - updated Patch0. |
---|
155 | |
---|
156 | * Sat Feb 09 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.30-1 |
---|
157 | - new upstream release. |
---|
158 | - updated Source4 to support elogind. |
---|
159 | |
---|
160 | * Thu Feb 22 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.28-1 |
---|
161 | - new upstream release. |
---|
162 | - updated Source4. |
---|
163 | - imported Patch0 from rawhide. |
---|
164 | |
---|
165 | * Fri Oct 05 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.17-1 |
---|
166 | - new upstream release |
---|
167 | - remove Patch1 (acpid-2.0.2-makefile.patch) |
---|
168 | |
---|
169 | * Wed Feb 15 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.14-1 |
---|
170 | - new upstream release |
---|
171 | |
---|
172 | * Wed Nov 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.13-1 |
---|
173 | - new upstream release |
---|
174 | - change filename in /etc/acpi/events |
---|
175 | |
---|
176 | * Sun Apr 17 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.8-1 |
---|
177 | - new upstream release |
---|
178 | - add acpid.sysconfig |
---|
179 | |
---|
180 | * Tue Mar 16 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.2-1 |
---|
181 | - new upstream release |
---|
182 | |
---|
183 | * Sat May 9 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.10-1 |
---|
184 | - new upstream release: fixes CVE-2009-0798 (too many open files DoS) |
---|
185 | - fix power.sh (Source4) to work with ConsoleKit >= 0.3.0 |
---|
186 | (ck-list-sessions now returns 'unix-user' instead of 'uid') |
---|
187 | without this fix, pressing power key will always goes to shutdown |
---|
188 | even if gnome-power-manager is active and running |
---|
189 | - add ExclusiveArch: x86_64 %%{ix86} |
---|
190 | |
---|
191 | * Mon Aug 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.6-4 |
---|
192 | - add patch10 to ignore .rpmnew file |
---|
193 | - add power button handling script and config |
---|
194 | - import some patches from fedora |
---|
195 | - add rpm's optflags to makefile |
---|
196 | - Fixed leak of a file descriptor |
---|
197 | - Fixed dumping useless info to log |
---|
198 | |
---|
199 | * Mon Aug 11 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.6-3 |
---|
200 | - spec in UTF-8 |
---|
201 | - adjust start/stop priority not to conflict with HAL |
---|
202 | |
---|
203 | * Sun Apr 06 2008 Kazutaka HARADA <Kazutaka@dc4.so-net.ne.jp> 1.0.6-2 |
---|
204 | - rebuild |
---|
205 | - apply new versioning policy |
---|
206 | |
---|
207 | * Sun Jul 1 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.6-1vl2 |
---|
208 | - remove %%{_sysconfdir}/logrotate.d/acpid from files |
---|
209 | (from this version, syslog is used for logging) |
---|
210 | - remove Source2 (from this version, syslog is used for logging) |
---|
211 | |
---|
212 | * Sun Jul 1 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.6-1vl1 |
---|
213 | - upstream release |
---|
214 | - update Source0 URL |
---|
215 | - drop Patch0 (merged into upstream source) |
---|
216 | - drop Patch1 (solved in another way on upstream source) |
---|
217 | |
---|
218 | * Sat May 26 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.4-1vl3 |
---|
219 | - add Patch1 to rebuild with new toolchain |
---|
220 | |
---|
221 | * Sat Nov 04 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.4-1vl2 |
---|
222 | - update acpid.init |
---|
223 | - check if ACPI interface is available or not. (<BTS:216>) |
---|
224 | |
---|
225 | * Thu Oct 21 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.4-1vl1 |
---|
226 | - upstream release |
---|
227 | - move sample.conf to %doc |
---|
228 | - add some new sample scripts to %doc |
---|
229 | - MEMO: file acpid-bindir.patch will be unnecessary in next upstream release, |
---|
230 | since the patch is accepted in upstream CVS |
---|
231 | |
---|
232 | * Thu Sep 23 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.3-1vl4 |
---|
233 | - changed Group: |
---|
234 | - added %clean section |
---|
235 | |
---|
236 | * Wed Jul 21 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.3-1vl3 |
---|
237 | - changed redhat/acpid.init tarball into text file |
---|
238 | - added Source2: logrotate support |
---|
239 | |
---|
240 | * Thu Jun 24 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.0.3-1vl2 |
---|
241 | - upstream release |
---|
242 | - extract redhat/acpid.init from acpid-1.0.2.tar.gz tarball |
---|
243 | - patch Makefile to mkdir %BINDIR before install |
---|
244 | - added Japanese Summary |
---|
245 | - remove /var/run/acpid.socket at preun |
---|
246 | - delete previously commented scripts |
---|
247 | |
---|
248 | * Sun Dec 21 2003 KAZUKI SHIMURA <rito@pos.to> 1.0.2-1vl3 |
---|
249 | - removed name/version/release macros |
---|
250 | - added vendor/distribution tag |
---|
251 | - added %%doc (merged with 1.0.2-1vl2 in VinePlus/2.5) |
---|
252 | - removed needless chmod/attr |
---|
253 | - stop service before uninstall |
---|
254 | |
---|
255 | * Fri Nov 14 2003 Satoshi MACHINO <machino@vinelinux.org> 1.0.2-1vl2 |
---|
256 | - rebuilt for Vine Seed |
---|
257 | - added japanese description |
---|
258 | - changed from Copylight to License |
---|
259 | |
---|
260 | * Sun Nov 2 2003 KANEKO Seiji <giraffe@m2.pbc.ne.jp> |
---|
261 | - 1.0.2-1vl1 |
---|
262 | - Removed prefix definition |
---|
263 | - Remove /var/log/acpid from package file |
---|
264 | |
---|
265 | * Thu Aug 21 2003 KANEKO Seiji <giraffe@m2.pbc.ne.jp> |
---|
266 | - 1.0.2-1vl0.1 |
---|
267 | - Spec file modified for Vine Linux 2.6r1 |
---|
268 | |
---|
269 | * Tue May 13 2003 Tim Hockin <thockin@sun.com> |
---|
270 | - Fixed a dumb bug with %e expansion for commands |
---|
271 | - Add COPYING file |
---|
272 | - Add TODO file |
---|
273 | |
---|
274 | * Fri Mar 15 2002 Tim Hockin <thockin@sun.com> |
---|
275 | - Updated RPM spec with patch from sun for chkconfig on/off |
---|
276 | - Add Changelog, make 'make rpm' use it. |
---|
277 | - 1.0.1 |
---|
278 | |
---|
279 | * Wed Mar 13 2002 Tim Hockin <thockin@sun.com> |
---|
280 | - Fixed logging bug - not appending to log (O_APPEND needed) |
---|
281 | - Fix 'make install' to not need root access |
---|
282 | - Fix RPM spec to not need root |
---|
283 | |
---|
284 | * Thu Sep 6 2001 Tim Hockin <thockin@sun.com> |
---|
285 | - 1.0.0 |
---|
286 | |
---|
287 | * Thu Aug 16 2001 Tim Hockin <thockin@sun.com> |
---|
288 | - Added commandline options to actions |
---|
289 | |
---|
290 | * Wed Aug 15 2001 Tim Hockin <thockin@sun.com> |
---|
291 | - Added UNIX domain socket support |
---|
292 | - Changed /etc/acpid.d to /etc/acpid/events |
---|
293 | |
---|
294 | * Mon Aug 13 2001 Tim Hockin <thockin@sun.com> |
---|
295 | - added changelog |
---|
296 | - 0.99.1-1 |
---|
297 | |
---|