]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without clamav # clamav / virusfilter module | |
4 | # | |
5 | %ifarch x32 | |
6 | %undefine with_clamav | |
7 | %endif | |
8 | Summary: Modules for c-icap ICAP server | |
9 | Summary(pl.UTF-8): Moduły dla serwera ICAP c-icap | |
10 | Name: c-icap-modules | |
11 | Version: 0.5.7 | |
12 | Release: 1 | |
13 | License: GPL v2+ | |
14 | Group: Networking/Daemons | |
15 | Source0: https://downloads.sourceforge.net/c-icap/c_icap_modules-%{version}.tar.gz | |
16 | # Source0-md5: 08c4721a26840bb0ff95fcaa64b686c3 | |
17 | Patch0: %{name}-build.patch | |
18 | Patch1: clamav0.101.patch | |
19 | URL: https://c-icap.sourceforge.net/ | |
20 | BuildRequires: autoconf >= 2.50 | |
21 | BuildRequires: automake | |
22 | BuildRequires: c-icap-devel >= 0.5 | |
23 | %{?with_clamav:BuildRequires: clamav-devel >= 0.90} | |
24 | BuildRequires: db-devel >= 4.2 | |
25 | BuildRequires: libtool >= 2:2 | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | Modules for c-icap ICAP server. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Moduły dla serwera ICAP c-icap. | |
33 | ||
34 | %package -n c-icap-srv_clamav | |
35 | Summary: ClamAV service for c-icap | |
36 | Summary(pl.UTF-8): Usługa ClamAV dla c-icap | |
37 | Group: Networking/Daemons | |
38 | Requires: c-icap >= 0.5 | |
39 | ||
40 | %description -n c-icap-srv_clamav | |
41 | ClamAV service for c-icap. | |
42 | ||
43 | %description -n c-icap-srv_clamav -l pl.UTF-8 | |
44 | Usługa ClamAV dla c-icap. | |
45 | ||
46 | %package -n c-icap-srv_url_check | |
47 | Summary: URL check service for c-icap | |
48 | Summary(pl.UTF-8): Usługa sprawdzania URL-i dla c-icap | |
49 | Group: Networking/Daemons | |
50 | Requires: c-icap >= 0.5 | |
51 | ||
52 | %description -n c-icap-srv_url_check | |
53 | URL check service for c-icap. | |
54 | ||
55 | %description -n c-icap-srv_url_check -l pl.UTF-8 | |
56 | Usługa sprawdzania URL-i dla c-icap. | |
57 | ||
58 | %package -n c-icap-srv_content_filtering | |
59 | Summary: Content filtering service for c-icap | |
60 | Summary(pl.UTF-8): Usługa filtrowania treści dla c-icap | |
61 | Group: Networking/Daemons | |
62 | Requires: c-icap >= 0.5 | |
63 | ||
64 | %description -n c-icap-srv_content_filtering | |
65 | Content filtering service for c-icap. | |
66 | ||
67 | %description -n c-icap-srv_content_filtering -l pl.UTF-8 | |
68 | Usługa filtrowania treści dla c-icap. | |
69 | ||
70 | %prep | |
71 | %setup -q -n c_icap_modules-%{version} | |
72 | %patch0 -p1 | |
73 | %patch1 -p1 | |
74 | ||
75 | %build | |
76 | %{__libtoolize} | |
77 | %{__aclocal} -I m4 | |
78 | %{__autoconf} | |
79 | %{__autoheader} | |
80 | %{__automake} | |
81 | export CFLAGS="%{rpmcflags} -I/usr/include/clamav" | |
82 | %configure | |
83 | ||
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/c-icap | |
90 | %{__make} install \ | |
91 | DESTDIR=$RPM_BUILD_ROOT | |
92 | ||
93 | # Not installed by upstream | |
94 | cp -a services/content_filtering/srv_content_filtering.conf.default \ | |
95 | $RPM_BUILD_ROOT%{_sysconfdir}/c-icap/srv_content_filtering.conf | |
96 | ||
97 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/c_icap/*.la | |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with clamav} | |
103 | %files -n c-icap-srv_clamav | |
104 | %defattr(644,root,root,755) | |
105 | %doc README SPONSORS | |
106 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/clamav_mod.conf | |
107 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/clamd_mod.conf | |
108 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/virus_scan.conf | |
109 | %{_sysconfdir}/c-icap/clamav_mod.conf.default | |
110 | %{_sysconfdir}/c-icap/clamd_mod.conf.default | |
111 | %{_sysconfdir}/c-icap/virus_scan.conf.default | |
112 | %attr(755,root,root) %{_libdir}/c_icap/clamav_mod.so | |
113 | %attr(755,root,root) %{_libdir}/c_icap/clamd_mod.so | |
114 | %attr(755,root,root) %{_libdir}/c_icap/virus_scan.so | |
115 | %{_datadir}/c_icap/templates/virus_scan | |
116 | %endif | |
117 | ||
118 | %files -n c-icap-srv_url_check | |
119 | %defattr(644,root,root,755) | |
120 | %doc README SPONSORS | |
121 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/srv_url_check.conf | |
122 | %{_sysconfdir}/c-icap/srv_url_check.conf.default | |
123 | %attr(755,root,root) %{_libdir}/c_icap/srv_url_check.so | |
124 | %{_datadir}/c_icap/templates/srv_url_check | |
125 | %{_bindir}/c-icap-mods-sguardDB | |
126 | %{_mandir}/man8/c-icap-mods-sguardDB.8* | |
127 | ||
128 | %files -n c-icap-srv_content_filtering | |
129 | %defattr(644,root,root,755) | |
130 | %doc README SPONSORS | |
131 | %attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/srv_content_filtering.conf | |
132 | %{_sysconfdir}/c-icap/srv_content_filtering.conf.default | |
133 | %attr(755,root,root) %{_libdir}/c_icap/srv_content_filtering.so | |
134 | %{_datadir}/c_icap/templates/srv_content_filtering |