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