]>
Commit | Line | Data |
---|---|---|
f18d6268 | 1 | Summary: C implementation of an ICAP server |
2 | Name: c-icap | |
66984729 JR |
3 | Version: 0.5.2 |
4 | Release: 1 | |
f18d6268 | 5 | License: BSD |
6 | Group: Libraries | |
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 | |
f18d6268 | 53 | |
54 | %description devel | |
55 | Header files for c-icap library. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe biblioteki c-icap. | |
59 | ||
60 | %package static | |
61 | Summary: Static c-icap library | |
62 | Summary(pl.UTF-8): Statyczna biblioteka c-icap | |
63 | Group: Development/Libraries | |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static c-icap library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Statyczna biblioteka c-icap. | |
71 | ||
72 | %prep | |
73 | %setup -q -n c_icap-%{version} | |
74 | %patch0 -p1 | |
f18d6268 | 75 | |
76 | %build | |
1adb9050 | 77 | %configure \ |
66984729 | 78 | --sysconfdir=%{_sysconfdir}/c-icap \ |
5df3cbe4 | 79 | --enable-large-files \ |
66984729 JR |
80 | --with-openssl \ |
81 | --with-zlib \ | |
82 | --with-bzlib \ | |
83 | --with-bdb \ | |
84 | --with-ldap \ | |
85 | --with-memcached \ | |
86 | --with-pcre \ | |
87 | --enable-ipv6 | |
88 | ||
f18d6268 | 89 | %{__make} |
90 | ||
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
bb8620c7 | 93 | install -d $RPM_BUILD_ROOT%{_datadir}/c_icap/templates \ |
94 | $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \ | |
66984729 JR |
95 | $RPM_BUILD_ROOT/var/log{,/archive}/c-icap \ |
96 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} | |
97 | ||
f18d6268 | 98 | %{__make} install \ |
99 | DESTDIR=$RPM_BUILD_ROOT | |
100 | ||
66984729 JR |
101 | touch $RPM_BUILD_ROOT/var/log/c-icap/{access.log,server.log} |
102 | ||
103 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/c-icap | |
104 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/c-icap | |
105 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/c-icap | |
106 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/%{systemdunitdir}/c-icap.service | |
107 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/c-icap.conf | |
108 | ||
109 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/c_icap/*.la | |
bb8620c7 | 110 | |
f18d6268 | 111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
bb8620c7 | 114 | %pre |
115 | %groupadd -g 262 c-icap | |
116 | %useradd -o -u 262 -s /bin/false -g c-icap -c "c-icap ICAP server daemon" -d /usr/share/empty c-icap | |
117 | ||
118 | %post | |
119 | /sbin/chkconfig --add c-icap | |
120 | %service c-icap restart | |
66984729 | 121 | %systemd_post %{name}.service |
bb8620c7 | 122 | |
123 | %preun | |
124 | if [ "$1" = "0" ]; then | |
125 | /sbin/chkconfig --del c-icap | |
126 | %service c-icap stop | |
127 | fi | |
66984729 | 128 | %systemd_preun %{name}.service |
bb8620c7 | 129 | |
130 | %postun | |
131 | if [ "$1" = "0" ]; then | |
132 | %userremove c-icap | |
133 | %groupremove c-icap | |
134 | fi | |
66984729 | 135 | %systemd_reload |
bb8620c7 | 136 | |
137 | %post lib -p /sbin/ldconfig | |
138 | %postun lib -p /sbin/ldconfig | |
f18d6268 | 139 | |
140 | %files | |
141 | %defattr(644,root,root,755) | |
142 | %doc README | |
bb8620c7 | 143 | |
144 | %dir %{_sysconfdir}/c-icap | |
145 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.conf | |
09097d0c | 146 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.magic |
66984729 JR |
147 | %{_sysconfdir}/c-icap/c-icap.conf.default |
148 | %{_sysconfdir}/c-icap/c-icap.magic.default | |
bb8620c7 | 149 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/c-icap |
150 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/c-icap | |
66984729 JR |
151 | %{systemdunitdir}/c-icap.service |
152 | %{systemdtmpfilesdir}/c-icap.conf | |
bb8620c7 | 153 | %attr(754,root,root) /etc/rc.d/init.d/c-icap |
f18d6268 | 154 | %attr(755,root,root) %{_bindir}/c-icap |
155 | %attr(755,root,root) %{_bindir}/c-icap-client | |
f18d6268 | 156 | %attr(755,root,root) %{_bindir}/c-icap-mkbdb |
157 | %attr(755,root,root) %{_bindir}/c-icap-stretch | |
f18d6268 | 158 | %attr(755,root,root) %{_libdir}/c_icap/bdb_tables.so |
159 | %attr(755,root,root) %{_libdir}/c_icap/dnsbl_tables.so | |
160 | %attr(755,root,root) %{_libdir}/c_icap/ldap_module.so | |
161 | %attr(755,root,root) %{_libdir}/c_icap/srv_echo.so | |
162 | %attr(755,root,root) %{_libdir}/c_icap/sys_logger.so | |
66984729 JR |
163 | %attr(755,root,root) %{_libdir}/c_icap/memcached_cache.so |
164 | %attr(755,root,root) %{_libdir}/c_icap/shared_cache.so | |
165 | %attr(755,root,root) %{_libdir}/c_icap/srv_ex206.so | |
166 | %{_mandir}/man8/c-icap.8* | |
167 | %{_mandir}/man8/c-icap-client.8* | |
168 | %{_mandir}/man8/c-icap-config.8* | |
169 | %{_mandir}/man8/c-icap-libicapapi-config.8* | |
170 | %{_mandir}/man8/c-icap-mkbdb.8* | |
171 | %{_mandir}/man8/c-icap-stretch.8* | |
172 | %dir %{_datadir}/c_icap | |
bb8620c7 | 173 | %attr(750,c-icap,c-icap) %dir /var/run/c-icap |
174 | %attr(770,root,c-icap) %dir /var/log/archive/c-icap | |
175 | %attr(770,root,c-icap) %dir /var/log/c-icap | |
176 | %attr(770,root,c-icap) %ghost /var/log/c-icap/* | |
177 | ||
178 | %files lib | |
179 | %defattr(644,root,root,755) | |
180 | %attr(755,root,root) %{_libdir}/libicapapi.so.*.*.* | |
66984729 | 181 | %attr(755,root,root) %ghost %{_libdir}/libicapapi.so.5 |
f18d6268 | 182 | |
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
88b96e0f | 185 | %attr(755,root,root) %{_bindir}/c-icap-config |
186 | %attr(755,root,root) %{_bindir}/c-icap-libicapapi-config | |
f18d6268 | 187 | %{_libdir}/libicapapi.so |
188 | %{_includedir}/c_icap | |
189 | ||
190 | %files static | |
191 | %defattr(644,root,root,755) | |
192 | %{_libdir}/libicapapi.la |