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