]> git.pld-linux.org Git - packages/clamav.git/blob - clamav.spec
- cosmetic
[packages/clamav.git] / clamav.spec
1 %define         database_version 20030117
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:        3
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 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
22 AMaViS, compressed files, uses the virus database from
23 OpenAntivirus.org, and includes a program for auto-updating. The
24 scanner is multithreaded, written in C, and POSIX compliant.
25
26 %description -l pl
27 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
28 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
29 wirusów z OpenAntivirus.org, i posiada system automatycznej
30 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
31 POSIXem.
32
33 %package libs
34 Summary:        Shared libraries for clamav
35 Summary(pl):    Biblioteki dzielone clamav
36 Group:          Libraries
37
38 %description libs
39 Shared libraries for clamav.
40
41 %description libs -l pl
42 Biblioteki dzielone clamav.
43
44 %package devel
45 Summary:        clamav - Development header files and libraries
46 Summary(pl):    clamav - Pliki nag³ówkowe i biblioteki dla programistów
47 Group:          Development/Libraries
48 Requires:       %{name}-libs = %{version}
49
50 %description devel
51 This package contains the development header files and libraries
52 necessary to develop clamav client applications.
53
54 %description devel -l pl
55 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
56 klienckich clamav.
57
58 %package static
59 Summary:        clamav staic libraris
60 Summary(pl):    Biblioteki statyczne clamav
61 Group:          Development/Libraries
62 Requires:       %{name}-devel = %{version}
63
64 %description static
65 clamav static libraris.
66
67 %description static -l pl
68 Biblioteki statyczne clamav.
69
70 %package database
71 Summary:        Virus database for clamav
72 Summary(pl):    Bazy wirusów dla clamav
73 Group:          Applications
74 Version:        %{version}.%{database_version}
75
76 %description database
77 Virus database for clamav
78
79 %description database -l pl
80 Bazy wirusów dla clamav
81
82 %prep
83 %setup -q
84 %setup -q -n clamav-0.54 -a 3
85
86 %build
87 rm -f missing
88 %{__aclocal}
89 %{__autoconf}
90 %{__automake}
91 %configure \
92         --disable-clamav
93 %{__make}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
98 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
99
100 %{__make} install \
101         DESTDIR=$RPM_BUILD_ROOT
102
103 echo -e '#!/bin/sh\n%{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log --daemon-notify' \
104         > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
105
106 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
107
108 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/clamd
109 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
110 install etc/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %pre
116 if [ -n "`getgid clamav`" ]; then
117         if [ "`getgid clamav`" != "43" ]; then
118                 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
119                 exit 1
120         fi
121 else
122         echo "Adding group clamav GID=43"
123         /usr/sbin/groupadd -g 43 -r -f clamav
124 fi
125 if [ -n "`id -u clamav 2>/dev/null`" ]; then
126         if [ "`id -u clamav`" != "43" ]; then
127                 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
128                 exit 1
129         fi
130 else
131         echo "Adding user clamav UID=43"
132         /usr/sbin/useradd -u 43 -r -d /tmp  -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
133 fi
134
135 %postun
136 if [ "$1" = "0" ]; then
137         echo "Removing user clamav"
138         /usr/sbin/userdel clamav
139         echo "Removing group clamav"
140         /usr/sbin/groupdel clamav
141 fi
142
143 %post
144 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
145
146 %post libs -p /sbin/ldconfig
147 %postun libs -p /sbin/ldconfig
148
149 %files
150 %defattr(644,root,root,755)
151 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
152 %attr(755,root,root) %{_bindir}/*
153 %attr(755,root,root) %{_sbindir}/*
154 %attr(755,clamav,root) %dir %{_datadir}/%{name}
155 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
156 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
157 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
158 %attr(754,root,root) /etc/rc.d/init.d/clamd
159 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
160 %{_mandir}/man?/*
161
162 %files libs
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_libdir}/lib*.so.*
165
166 %files devel
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/lib*.so
169 %{_libdir}/lib*.la
170 %{_includedir}/*.h
171
172 %files static
173 %defattr(644,root,root,755)
174 %{_libdir}/*.a
175
176 %files database
177 %defattr(644,root,root,755)
178 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db*
This page took 0.046299 seconds and 4 git commands to generate.