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