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