]> git.pld-linux.org Git - packages/amavis-ng.git/blame - amavis-ng.spec
- updated to 0.4.1.orig
[packages/amavis-ng.git] / amavis-ng.spec
CommitLineData
afeb56a6 1Summary: New generation amavis
2Summary(pl): Amavis nowej generacji
3Name: amavis-ng
a00ed71e 4Version: 0.1.4.1.orig
afeb56a6 5Release: 0
6License: GPL
7Group: Applications/Mail
a00ed71e 8Source0: http://prdownloads.sourceforge.net/amavis/%{name}_%{version}.tar.gz
9Patch0: amavis-ng.patch
afeb56a6 10URL: http://amavis.sourceforge.net/
11BuildRequires: perl
12BuildRequires: perl-devel
13Obsoletes: amavisd
14Obsoletes: amavis
15Obsoletes: AMaViS
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%description
19blah
20
21%description -l pl
22blah blah
23
24%prep
25%setup -q
a00ed71e 26%patch0 -p1
afeb56a6 27
28%build
29perl Makefile.PL
a00ed71e 30%{__make}
afeb56a6 31%install
32rm -rf $RPM_BUILD_ROOT
33install -d $RPM_BUILD_ROOT
34
35%{__make} install DESTDIR=$RPM_BUILD_ROOT
36
37%clean
38rm -rf $RPM_BUILD_ROOT
39
a00ed71e 40%pre
41if [ -n "`getgid amavis`" ]; then
42 if [ "`getgid amavis`" != "97" ]; then
43 echo "Warning: group amavis doesn't have gid=97. Correct this before installing clamav" 1>&2
44 exit 1
45 fi
46else
47 echo "adding group amavis GID=97"
48 /usr/sbin/groupadd -g 97 -r -f amavis
49fi
50
51if [ -n "`id -u amavis 2>/dev/null`" ]; then
52 if [ "`id -u amavis`" != "97" ]; then
53 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
54 exit 1
55 fi
56else
57 echo "adding user amavis UID=97"
58 /usr/sbin/useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
59fi
60
61%postun
62if [ "$1" = "0" ]; then
63 echo "Removing user amavis"
64 /usr/sbin/userdel amavis
65 echo "Removing group clamav"
66 /usr/sbin/groupdel amavis
67fi
68
69
afeb56a6 70%files
71%defattr(644,root,root,755)
a00ed71e 72%doc README TODO
afeb56a6 73%attr(755,root,root) %{_bindir}/*
a00ed71e 74%attr(755,root,root) %{_sbindir}/*
75%{_datadir}/amavis
76%attr(750,amavis,amavis) /var/spool/amavis
This page took 0.030674 seconds and 4 git commands to generate.