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