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