]> git.pld-linux.org Git - packages/clamav.git/blob - clamav.spec
af17557caf1a584a5ffee151a098bf79badb8442
[packages/clamav.git] / clamav.spec
1 %define         database_version 20030207
2 Summary:        An anti-virus utility for Unix
3 Summary(pl):    Antywirusowe narzêdzie dla Unixów
4 Name:           clamav
5 Version:        0.54
6 Release:        4
7 License:        GPL
8 Group:          Applications
9 Source0:        http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 # gziped from http://clamav.elektrapro.com/database/:
13 Source3:        %{name}-database-%{database_version}.tar.gz
14 URL:            http://clamav.elektrapro.com/
15 Requires:       %{name}-database
16 BuildRequires:  autoconf
17 BuildRequires:  automake
18 BuildRequires:  zlib-devel
19 Requires(pre):  user-clamav
20 Requires(post,preun):   /sbin/chkconfig
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
25 AMaViS, compressed files, uses the virus database from
26 OpenAntivirus.org, and includes a program for auto-updating. The
27 scanner is multithreaded, written in C, and POSIX compliant.
28
29 %description -l pl
30 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
31 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
32 wirusów z OpenAntivirus.org, i posiada system automatycznej
33 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
34 POSIXem.
35
36 %package libs
37 Summary:        Shared libraries for clamav
38 Summary(pl):    Biblioteki dzielone clamav
39 Group:          Libraries
40
41 %description libs
42 Shared libraries for clamav.
43
44 %description libs -l pl
45 Biblioteki dzielone clamav.
46
47 %package devel
48 Summary:        clamav - Development header files and libraries
49 Summary(pl):    clamav - Pliki nag³ówkowe i biblioteki dla programistów
50 Group:          Development/Libraries
51 Requires:       %{name}-libs = %{version}
52
53 %description devel
54 This package contains the development header files and libraries
55 necessary to develop clamav client applications.
56
57 %description devel -l pl
58 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
59 klienckich clamav.
60
61 %package static
62 Summary:        clamav staic libraris
63 Summary(pl):    Biblioteki statyczne clamav
64 Group:          Development/Libraries
65 Requires:       %{name}-devel = %{version}
66
67 %description static
68 clamav static libraris.
69
70 %description static -l pl
71 Biblioteki statyczne clamav.
72
73 %package database
74 Summary:        Virus database for clamav
75 Summary(pl):    Bazy wirusów dla clamav
76 Group:          Applications
77 Version:        %{version}.%{database_version}
78 Requires:       %{name}
79
80 %description database
81 Virus database for clamav (updated %{database_version})
82
83 %description database -l pl
84 Bazy wirusów dla clamav (aktualizowana %{database_version})
85
86 %prep
87 %setup -q -a 3
88
89 %build
90 rm -f missing
91 %{__aclocal}
92 %{__autoconf}
93 %{__automake}
94 %configure \
95         --disable-clamav \
96         --with-dbdir=/var/lib/%{name}
97 %{__make}
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
102 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
103
104 %{__make} install \
105         DESTDIR=$RPM_BUILD_ROOT
106
107 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
108 #!/bin/sh
109 umask 022
110 %{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log --daemon-notify
111 EOF
112
113 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
114
115 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/clamd
116 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
117 install etc/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
124 /sbin/chkconfig --add clamd
125 if [ -f /var/lock/subsys/clamd ]; then
126         /etc/rc.d/init.d/clamd restart >&2
127 else
128         echo "Run \"/etc/rc.d/init.d/clamd start\" to start Clam Antivirus daemon." >&2
129 fi
130
131 %preun
132 if [ "$1" = "0" ]; then
133         if [ -f /var/lock/subsys/clamd ]; then
134                 /etc/rc.d/init.d/clamd stop
135         fi
136         /sbin/chkconfig --del clamd
137 fi
138
139 %post   libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
141
142 %files
143 %defattr(644,root,root,755)
144 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
145 %attr(755,root,root) %{_bindir}/*
146 %attr(755,root,root) %{_sbindir}/*
147 %attr(755,clamav,root) %dir /var/lib/%{name}
148 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
149 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
150 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
151 %attr(754,root,root) /etc/rc.d/init.d/clamd
152 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
153 %{_mandir}/man?/*
154
155 %files libs
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_libdir}/lib*.so.*.*
158
159 %files devel
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/lib*.so
162 %{_libdir}/lib*.la
163 %{_includedir}/*.h
164
165 %files static
166 %defattr(644,root,root,755)
167 %{_libdir}/*.a
168
169 %files database
170 %defattr(644,root,root,755)
171 %attr(644,clamav,root) %verify(not md5 size mtime) /var/lib/%{name}/*.db*
This page took 0.033465 seconds and 3 git commands to generate.