]>
Commit | Line | Data |
---|---|---|
1 | Summary: C implementation of an ICAP server | |
2 | Summary(pl.UTF-8): Implementacja w C serwera ICAP | |
3 | Name: c-icap | |
4 | Version: 0.5.12 | |
5 | Release: 1 | |
6 | License: BSD | |
7 | Group: Networking/Daemons | |
8 | Source0: https://downloads.sourceforge.net/c-icap/c_icap-%{version}.tar.gz | |
9 | # Source0-md5: d6f2bb2b9e95d33af9d4507104e418d6 | |
10 | Source1: %{name}.init | |
11 | Source2: %{name}.sysconfig | |
12 | Source3: %{name}.logrotate | |
13 | Source4: %{name}.service | |
14 | Source5: %{name}.tmpfiles | |
15 | Patch0: c-icap-conf.patch | |
16 | URL: https://c-icap.sourceforge.net/ | |
17 | BuildRequires: bzip2-devel | |
18 | BuildRequires: db-devel >= 4.2 | |
19 | BuildRequires: doxygen | |
20 | BuildRequires: libbrotli-devel | |
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 | |
30 | Requires: %{name}-lib = %{version}-%{release} | |
31 | Requires: rc-scripts >= 0.4.0.12 | |
32 | Conflicts: logrotate < 3.8.0 | |
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 | ||
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 | ||
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 | ||
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 | |
60 | Requires: %{name}-lib = %{version}-%{release} | |
61 | Obsoletes: c-icap-static < 0.5.12 | |
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 | ||
69 | %prep | |
70 | %setup -q -n c_icap-%{version} | |
71 | %patch0 -p1 | |
72 | ||
73 | %build | |
74 | %configure \ | |
75 | --sysconfdir=%{_sysconfdir}/c-icap \ | |
76 | --enable-ipv6 \ | |
77 | --enable-large-files \ | |
78 | --with-bdb \ | |
79 | --with-bzlib \ | |
80 | --with-ldap \ | |
81 | --with-memcached \ | |
82 | --with-openssl \ | |
83 | --with-pcre \ | |
84 | --with-zlib \ | |
85 | ||
86 | %{__make} | |
87 | ||
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | install -d $RPM_BUILD_ROOT%{_datadir}/c_icap/templates \ | |
91 | $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \ | |
92 | $RPM_BUILD_ROOT/var/log{,/archive}/c-icap \ | |
93 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} | |
94 | ||
95 | %{__make} install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
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 | ||
106 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libicapapi.la | |
107 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/c_icap/*.la | |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
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 | |
119 | %systemd_post %{name}.service | |
120 | ||
121 | %preun | |
122 | if [ "$1" = "0" ]; then | |
123 | /sbin/chkconfig --del c-icap | |
124 | %service c-icap stop | |
125 | fi | |
126 | %systemd_preun %{name}.service | |
127 | ||
128 | %postun | |
129 | if [ "$1" = "0" ]; then | |
130 | %userremove c-icap | |
131 | %groupremove c-icap | |
132 | fi | |
133 | %systemd_reload | |
134 | ||
135 | %post lib -p /sbin/ldconfig | |
136 | %postun lib -p /sbin/ldconfig | |
137 | ||
138 | %files | |
139 | %defattr(644,root,root,755) | |
140 | %doc AUTHORS README TODO | |
141 | %dir %{_sysconfdir}/c-icap | |
142 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.conf | |
143 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.magic | |
144 | %{_sysconfdir}/c-icap/c-icap.conf.default | |
145 | %{_sysconfdir}/c-icap/c-icap.magic.default | |
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 | |
148 | %{systemdunitdir}/c-icap.service | |
149 | %{systemdtmpfilesdir}/c-icap.conf | |
150 | %attr(754,root,root) /etc/rc.d/init.d/c-icap | |
151 | %attr(755,root,root) %{_bindir}/c-icap | |
152 | %attr(755,root,root) %{_bindir}/c-icap-client | |
153 | %attr(755,root,root) %{_bindir}/c-icap-mkbdb | |
154 | %attr(755,root,root) %{_bindir}/c-icap-stretch | |
155 | %dir %{_libdir}/c_icap | |
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 | |
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 | |
171 | %dir %{_datadir}/c_icap/templates | |
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.*.*.* | |
180 | %attr(755,root,root) %ghost %{_libdir}/libicapapi.so.5 | |
181 | ||
182 | %files devel | |
183 | %defattr(644,root,root,755) | |
184 | %attr(755,root,root) %{_bindir}/c-icap-config | |
185 | %attr(755,root,root) %{_bindir}/c-icap-libicapapi-config | |
186 | %{_libdir}/libicapapi.so | |
187 | %{_includedir}/c_icap |