1 | %bcond_with systemd |
---|
2 | |
---|
3 | Summary: Inotify cron system |
---|
4 | Name: incron |
---|
5 | Version: 0.5.12 |
---|
6 | Release: 5%{?_dist_release}%{?with_systemd:.systemd} |
---|
7 | Group: System Environment/Base |
---|
8 | Vendor: Project Vine |
---|
9 | Distribution: Vine Linux |
---|
10 | Packager: tomop |
---|
11 | |
---|
12 | License: GPLv2 |
---|
13 | URL: https://github.com/ar-/incron |
---|
14 | Source0: https://github.com/ar-/incron/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz |
---|
15 | Source1: incrond.init |
---|
16 | Source2: incrond.service |
---|
17 | Patch0: incron-0.5.10-gcc.patch |
---|
18 | Patch1: incron-0.5.12-prevent-zombies.patch |
---|
19 | # https://github.com/ar-/incron/pull/45/commits/134900ea1dd19834ba6e6c7e7e07611a0e0d78a0 |
---|
20 | Patch2: incron-fix-segv-on-mkdir.patch |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
22 | |
---|
23 | %if %{with systemd} |
---|
24 | %{?systemd_requires} |
---|
25 | %else |
---|
26 | Requires(post): /sbin/chkconfig |
---|
27 | Requires(preun): /sbin/chkconfig, /sbin/service |
---|
28 | Requires(postun): /sbin/service |
---|
29 | %endif |
---|
30 | |
---|
31 | %description |
---|
32 | This program is an "inotify cron" system. |
---|
33 | It consists of a daemon and a table manipulator. |
---|
34 | You can use it a similar way as the regular cron. |
---|
35 | The difference is that the inotify cron handles |
---|
36 | filesystem events rather than time periods. |
---|
37 | |
---|
38 | %prep |
---|
39 | %setup -q |
---|
40 | %patch0 -p1 -b .gcc |
---|
41 | %patch1 -p1 -b .zombie |
---|
42 | %patch2 -p1 -b .mkdir |
---|
43 | |
---|
44 | %if %{with systemd} |
---|
45 | sed -i -e 's|/var/run|/run|' \ |
---|
46 | appinst.h \ |
---|
47 | incron.conf.5 \ |
---|
48 | incron.conf.example \ |
---|
49 | incroncfg.cpp |
---|
50 | %endif |
---|
51 | |
---|
52 | %build |
---|
53 | make %{?_smp_mflags} CXXFLAGS="%{optflags}" |
---|
54 | |
---|
55 | |
---|
56 | %install |
---|
57 | rm -rf %{buildroot} |
---|
58 | |
---|
59 | #install files manually since source Makefile tries to do it as root |
---|
60 | install -D -p incrond %{buildroot}%{_sbindir}/incrond |
---|
61 | install -D -p -m 4755 incrontab %{buildroot}%{_bindir}/incrontab |
---|
62 | install -d %{buildroot}%{_localstatedir}/spool/%{name} |
---|
63 | install -d %{buildroot}%{_sysconfdir}/%{name}.d |
---|
64 | install -D -p -m 0644 incron.conf.example %{buildroot}%{_sysconfdir}/%{name}.conf |
---|
65 | |
---|
66 | %if %{with systemd} |
---|
67 | install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/incrond.service |
---|
68 | %else |
---|
69 | install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_initdir}/incrond |
---|
70 | %endif |
---|
71 | |
---|
72 | # install manpages |
---|
73 | make install-man MANPATH="%{buildroot}%{_mandir}" INSTALL="install -D -p" |
---|
74 | |
---|
75 | %post |
---|
76 | %if %{with systemd} |
---|
77 | %systemd_post incrond.service |
---|
78 | %else |
---|
79 | if [ $1 -eq 1 ]; then |
---|
80 | /sbin/chkconfig --add incrond |
---|
81 | fi |
---|
82 | %endif |
---|
83 | |
---|
84 | |
---|
85 | %preun |
---|
86 | %if %{with systemd} |
---|
87 | %systemd_preun incrond.service |
---|
88 | %else |
---|
89 | if [ $1 -eq 0 ]; then |
---|
90 | /sbin/service %{name} stop >/dev/null 2>&1 || : |
---|
91 | /sbin/chkconfig --del incrond |
---|
92 | fi |
---|
93 | %endif |
---|
94 | |
---|
95 | |
---|
96 | %postun |
---|
97 | %if %{with systemd} |
---|
98 | %systemd_postun_with_restart incrond.service |
---|
99 | %else |
---|
100 | if [ $1 -ge 1 ]; then |
---|
101 | /sbin/service incrond condrestart >/dev/null 2>&1 || : |
---|
102 | fi |
---|
103 | %endif |
---|
104 | |
---|
105 | |
---|
106 | %clean |
---|
107 | rm -rf %{buildroot} |
---|
108 | |
---|
109 | %files |
---|
110 | %defattr(-,root,root,-) |
---|
111 | %license COPYING LICENSE* |
---|
112 | %doc CHANGELOG README TODO |
---|
113 | %attr(4755,root,root) %{_bindir}/incrontab |
---|
114 | %{_sbindir}/incrond |
---|
115 | %if %{with systemd} |
---|
116 | %{_unitdir}/incrond.service |
---|
117 | %else |
---|
118 | %{_initdir}/incrond |
---|
119 | %endif |
---|
120 | %config(noreplace) %{_sysconfdir}/%{name}.conf |
---|
121 | %{_mandir}/man1/incrontab.1.gz |
---|
122 | %{_mandir}/man5/incrontab.5.gz |
---|
123 | %{_mandir}/man5/incron.conf.5.gz |
---|
124 | %{_mandir}/man8/incrond.8.gz |
---|
125 | %dir %{_localstatedir}/spool/%{name} |
---|
126 | %dir %{_sysconfdir}/%{name}.d |
---|
127 | |
---|
128 | |
---|
129 | %changelog |
---|
130 | * Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.12-5 |
---|
131 | - added R(postun):. |
---|
132 | - added systemd stuff (disabled as default). |
---|
133 | |
---|
134 | * Mon Dec 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.12-4 |
---|
135 | - imported Patch2. |
---|
136 | |
---|
137 | * Mon Nov 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.12-3 |
---|
138 | - replaced Patch1. |
---|
139 | |
---|
140 | * Sat Jul 9 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.12-2 |
---|
141 | - added Patch1. |
---|
142 | |
---|
143 | * Thu Jul 7 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.12-1 |
---|
144 | - new upstream release. |
---|
145 | |
---|
146 | * Sun Jan 12 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.10-2 |
---|
147 | - rebuilt with current environment. |
---|
148 | |
---|
149 | * Fri May 04 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5.10-1 |
---|
150 | - new upstream release. |
---|
151 | - built for Vine Linux. |
---|
152 | |
---|
153 | * Thu Feb 16 2012 Jon Ciesla <limburgher@gmail.com> - 0.5.9-4 |
---|
154 | - Migrate to systemd, BZ 789688. |
---|
155 | - gcc47 patch. |
---|
156 | |
---|
157 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9-3 |
---|
158 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
159 | |
---|
160 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9-2 |
---|
161 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
162 | |
---|
163 | * Mon Dec 21 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.5.9-1 |
---|
164 | - Upstream released new version |
---|
165 | |
---|
166 | * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.8-2 |
---|
167 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
168 | |
---|
169 | * Wed Feb 25 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.5.8-1 |
---|
170 | - Upstream released new version |
---|
171 | - GCC 4.4 fixes |
---|
172 | - Drop GCC 4.3 patch, fixed upstream |
---|
173 | |
---|
174 | * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.7-2 |
---|
175 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
176 | |
---|
177 | * Sat Feb 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> - 0.5.7-1 |
---|
178 | - Sync with upstream |
---|
179 | |
---|
180 | * Tue Mar 13 2007 <ruben@rubenkerkhof.com> 0.5.5-1 |
---|
181 | - Sync with upstream |
---|
182 | * Mon Feb 12 2007 <ruben@rubenkerkhof.com> 0.5.4-1 |
---|
183 | - Update to new upstream version |
---|
184 | - Upstream fixed permissions on pidfile |
---|
185 | - New manpage for incron.conf |
---|
186 | - Upstream fixed example conf file |
---|
187 | * Sun Feb 04 2007 <ruben@rubenkerkhof.com> 0.5.1-1 |
---|
188 | - Updated to new upstream version |
---|
189 | - Upstream fixed the incorrect encoding of the LICENSE-GPL file |
---|
190 | * Sat Jan 27 2007 <ruben@rubenkerkhof.com> 0.5.0-1 |
---|
191 | - Updated to new upstream version |
---|
192 | - Changed the service name in the scriptlets |
---|
193 | - Added a configuration file |
---|
194 | - Included GPL License |
---|
195 | * Sat Jan 27 2007 <ruben@rubenkerkhof.com> 0.4.0-1 |
---|
196 | - First try at packaging it up |
---|