]>
Commit | Line | Data |
---|---|---|
f18d6268 | 1 | Summary: C implementation of an ICAP server |
2f3c6202 | 2 | Summary(pl.UTF-8): Implementacja w C serwera ICAP |
f18d6268 | 3 | Name: c-icap |
2f3c6202 JB |
4 | Version: 0.5.12 |
5 | Release: 1 | |
f18d6268 | 6 | License: BSD |
728562f3 | 7 | Group: Networking/Daemons |
2f3c6202 JB |
8 | Source0: https://downloads.sourceforge.net/c-icap/c_icap-%{version}.tar.gz |
9 | # Source0-md5: d6f2bb2b9e95d33af9d4507104e418d6 | |
bb8620c7 | 10 | Source1: %{name}.init |
11 | Source2: %{name}.sysconfig | |
12 | Source3: %{name}.logrotate | |
66984729 JR |
13 | Source4: %{name}.service |
14 | Source5: %{name}.tmpfiles | |
15 | Patch0: c-icap-conf.patch | |
2f3c6202 | 16 | URL: https://c-icap.sourceforge.net/ |
66984729 | 17 | BuildRequires: bzip2-devel |
2f3c6202 | 18 | BuildRequires: db-devel >= 4.2 |
66984729 | 19 | BuildRequires: doxygen |
2f3c6202 | 20 | BuildRequires: libbrotli-devel |
66984729 JR |
21 | BuildRequires: libmemcached-devel |
22 | BuildRequires: openldap-devel | |
23 | BuildRequires: openssl-devel | |
24 | BuildRequires: pcre-devel | |
25 | BuildRequires: rpmbuild(macros) >= 1.647 | |
26 | BuildRequires: zlib-devel | |
27 | Requires(post,preun): /sbin/chkconfig | |
28 | Requires(post,preun,postun): systemd-units >= 38 | |
29 | Requires: systemd-units >= 0.38 | |
bb8620c7 | 30 | Requires: %{name}-lib = %{version}-%{release} |
95efecae | 31 | Requires: rc-scripts >= 0.4.0.12 |
8c65eec5 | 32 | Conflicts: logrotate < 3.8.0 |
f18d6268 | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | c-icap is an implementation of an ICAP server. It can be used with | |
37 | HTTP proxies that support the ICAP protocol to implement content | |
38 | adaptation and filtering services. | |
39 | ||
2f3c6202 JB |
40 | %description -l pl.UTF-8 |
41 | c-icap to implementacja serwera ICAP. Można go używać z proxy HTTP | |
42 | obsługującymi protokół ICAP do implementowania usług adaptowania i | |
43 | filtrowania treści. | |
44 | ||
bb8620c7 | 45 | %package lib |
46 | Summary: c-icap library | |
47 | Summary(pl.UTF-8): biblioteka c-icap | |
48 | Group: Development/Libraries | |
49 | ||
50 | %description lib | |
51 | c-icap library. | |
52 | ||
53 | %description lib -l pl.UTF-8 | |
54 | Biblioteka c-icap. | |
55 | ||
f18d6268 | 56 | %package devel |
57 | Summary: Header files for c-icap library | |
58 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki c-icap | |
59 | Group: Development/Libraries | |
49e9ab45 | 60 | Requires: %{name}-lib = %{version}-%{release} |
2f3c6202 | 61 | Obsoletes: c-icap-static < 0.5.12 |
f18d6268 | 62 | |
63 | %description devel | |
64 | Header files for c-icap library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe biblioteki c-icap. | |
68 | ||
f18d6268 | 69 | %prep |
70 | %setup -q -n c_icap-%{version} | |
71 | %patch0 -p1 | |
f18d6268 | 72 | |
73 | %build | |
1adb9050 | 74 | %configure \ |
66984729 | 75 | --sysconfdir=%{_sysconfdir}/c-icap \ |
2f3c6202 | 76 | --enable-ipv6 \ |
5df3cbe4 | 77 | --enable-large-files \ |
66984729 | 78 | --with-bdb \ |
2f3c6202 | 79 | --with-bzlib \ |
66984729 JR |
80 | --with-ldap \ |
81 | --with-memcached \ | |
2f3c6202 | 82 | --with-openssl \ |
66984729 | 83 | --with-pcre \ |
2f3c6202 | 84 | --with-zlib \ |
66984729 | 85 | |
f18d6268 | 86 | %{__make} |
87 | ||
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
bb8620c7 | 90 | install -d $RPM_BUILD_ROOT%{_datadir}/c_icap/templates \ |
91 | $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \ | |
66984729 JR |
92 | $RPM_BUILD_ROOT/var/log{,/archive}/c-icap \ |
93 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} | |
94 | ||
f18d6268 | 95 | %{__make} install \ |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
66984729 JR |
98 | touch $RPM_BUILD_ROOT/var/log/c-icap/{access.log,server.log} |
99 | ||
100 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/c-icap | |
101 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/c-icap | |
102 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/c-icap | |
103 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/%{systemdunitdir}/c-icap.service | |
104 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/c-icap.conf | |
105 | ||
2f3c6202 | 106 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libicapapi.la |
66984729 | 107 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/c_icap/*.la |
bb8620c7 | 108 | |
f18d6268 | 109 | %clean |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
bb8620c7 | 112 | %pre |
113 | %groupadd -g 262 c-icap | |
114 | %useradd -o -u 262 -s /bin/false -g c-icap -c "c-icap ICAP server daemon" -d /usr/share/empty c-icap | |
115 | ||
116 | %post | |
117 | /sbin/chkconfig --add c-icap | |
118 | %service c-icap restart | |
66984729 | 119 | %systemd_post %{name}.service |
bb8620c7 | 120 | |
121 | %preun | |
122 | if [ "$1" = "0" ]; then | |
123 | /sbin/chkconfig --del c-icap | |
124 | %service c-icap stop | |
125 | fi | |
66984729 | 126 | %systemd_preun %{name}.service |
bb8620c7 | 127 | |
128 | %postun | |
129 | if [ "$1" = "0" ]; then | |
130 | %userremove c-icap | |
131 | %groupremove c-icap | |
132 | fi | |
66984729 | 133 | %systemd_reload |
bb8620c7 | 134 | |
135 | %post lib -p /sbin/ldconfig | |
136 | %postun lib -p /sbin/ldconfig | |
f18d6268 | 137 | |
138 | %files | |
139 | %defattr(644,root,root,755) | |
2f3c6202 | 140 | %doc AUTHORS README TODO |
bb8620c7 | 141 | %dir %{_sysconfdir}/c-icap |
142 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.conf | |
09097d0c | 143 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.magic |
66984729 JR |
144 | %{_sysconfdir}/c-icap/c-icap.conf.default |
145 | %{_sysconfdir}/c-icap/c-icap.magic.default | |
bb8620c7 | 146 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/c-icap |
147 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/c-icap | |
66984729 JR |
148 | %{systemdunitdir}/c-icap.service |
149 | %{systemdtmpfilesdir}/c-icap.conf | |
bb8620c7 | 150 | %attr(754,root,root) /etc/rc.d/init.d/c-icap |
f18d6268 | 151 | %attr(755,root,root) %{_bindir}/c-icap |
152 | %attr(755,root,root) %{_bindir}/c-icap-client | |
f18d6268 | 153 | %attr(755,root,root) %{_bindir}/c-icap-mkbdb |
154 | %attr(755,root,root) %{_bindir}/c-icap-stretch | |
5b3c6311 | 155 | %dir %{_libdir}/c_icap |
f18d6268 | 156 | %attr(755,root,root) %{_libdir}/c_icap/bdb_tables.so |
157 | %attr(755,root,root) %{_libdir}/c_icap/dnsbl_tables.so | |
158 | %attr(755,root,root) %{_libdir}/c_icap/ldap_module.so | |
159 | %attr(755,root,root) %{_libdir}/c_icap/srv_echo.so | |
160 | %attr(755,root,root) %{_libdir}/c_icap/sys_logger.so | |
66984729 JR |
161 | %attr(755,root,root) %{_libdir}/c_icap/memcached_cache.so |
162 | %attr(755,root,root) %{_libdir}/c_icap/shared_cache.so | |
163 | %attr(755,root,root) %{_libdir}/c_icap/srv_ex206.so | |
164 | %{_mandir}/man8/c-icap.8* | |
165 | %{_mandir}/man8/c-icap-client.8* | |
166 | %{_mandir}/man8/c-icap-config.8* | |
167 | %{_mandir}/man8/c-icap-libicapapi-config.8* | |
168 | %{_mandir}/man8/c-icap-mkbdb.8* | |
169 | %{_mandir}/man8/c-icap-stretch.8* | |
170 | %dir %{_datadir}/c_icap | |
728562f3 | 171 | %dir %{_datadir}/c_icap/templates |
bb8620c7 | 172 | %attr(750,c-icap,c-icap) %dir /var/run/c-icap |
173 | %attr(770,root,c-icap) %dir /var/log/archive/c-icap | |
174 | %attr(770,root,c-icap) %dir /var/log/c-icap | |
175 | %attr(770,root,c-icap) %ghost /var/log/c-icap/* | |
176 | ||
177 | %files lib | |
178 | %defattr(644,root,root,755) | |
179 | %attr(755,root,root) %{_libdir}/libicapapi.so.*.*.* | |
66984729 | 180 | %attr(755,root,root) %ghost %{_libdir}/libicapapi.so.5 |
f18d6268 | 181 | |
182 | %files devel | |
183 | %defattr(644,root,root,755) | |
88b96e0f | 184 | %attr(755,root,root) %{_bindir}/c-icap-config |
185 | %attr(755,root,root) %{_bindir}/c-icap-libicapapi-config | |
f18d6268 | 186 | %{_libdir}/libicapapi.so |
187 | %{_includedir}/c_icap |