]> git.pld-linux.org Git - packages/clamav.git/blob - clamav.spec
90dc00e067a5b6d993f367711ec18d9fdeca412c
[packages/clamav.git] / clamav.spec
1 Summary:        An anti-virus utility for Unix
2 Summary(pl):    Antywirusowe narzêdzie dla Unixów
3 Name:           clamav
4 Version:        0.24
5 Release:        1
6 License:        GPL
7 Group:          Applications/Mail
8 Source0:        http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
9 URL:            http://clamav.elektrapro.com/
10 BuildRequires:  autoconf
11 BuildRequires:  automake
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description
15 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
16 AMaViS, compressed files, uses the virus database from
17 OpenAntivirus.org, and includes a program for auto-updating. The
18 scanner is multithreaded, written in C, and POSIX compliant.
19
20 %description -l pl
21 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
22 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
23 wirusów z OpenAntivirus.org, i posiada system automatycznej
24 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
25 POSIXem.
26
27 %prep
28 %setup -q
29
30 %build
31 rm -f missing
32 aclocal
33 %{__autoconf}
34 %{__automake}
35 %configure \
36         --disable-clamav
37 %{__make}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
42
43 %{__make} install \
44         DESTDIR=$RPM_BUILD_ROOT
45
46 echo -e '#!/bin/sh\n%{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log' \
47         > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
48
49 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %pre
55 if [ -n "`getgid clamav`" ]; then
56         if [ "`getgid clamav`" != "43" ]; then
57                 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
58                 exit 1
59         fi
60 else
61         echo "adding group clamav GID=43"
62         /usr/sbin/groupadd -g 43 -r -f clamav
63 fi
64 if [ -n "`id -u clamav 2>/dev/null`" ]; then
65         if [ "`id -u clamav`" != "43" ]; then
66                 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
67                 exit 1
68         fi
69 else
70         echo "Adding user clamav UID=43"
71         /usr/sbin/useradd -u 43 -r -d /tmp  -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
72 fi
73
74 %postun
75 if [ "$1" = "0" ]; then
76         echo "Removing user clamav"
77         /usr/sbin/userdel clamav
78         echo "Removing group clamav"
79         /usr/sbin/groupdel clamav
80 fi
81
82 %post
83 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
84
85 %files
86 %defattr(644,root,root,755)
87 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/*.pdf
88 %attr(755,root,root) %{_bindir}/*
89 %attr(755,clamav,root) %dir %{_datadir}/%{name}
90 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db
91 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
92 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
93 %{_mandir}/man?/*
This page took 0.05798 seconds and 3 git commands to generate.