|
@@ -2,12 +2,13 @@
|
|
%define pdir Mail
|
|
%define pdir Mail
|
|
%define pnam SpamAssassin
|
|
%define pnam SpamAssassin
|
|
|
|
|
|
-%define version 3.3.1
|
|
+%define version 3.3.2
|
|
-%define real_version 3.3.1
|
|
+%define real_version 3.3.2
|
|
|
|
+%global saversion 3.003002
|
|
%define release 1%{_dist_release}
|
|
%define release 1%{_dist_release}
|
|
-%define cfdate 20110406
|
|
+%define cfdate 20140113
|
|
%define name spamassassin
|
|
%define name spamassassin
|
|
-%define _initrddir /etc/rc.d/init.d/
|
|
+%define _initrddir /etc/rc.d/init.d
|
|
%define initdir %{_initrddir}
|
|
%define initdir %{_initrddir}
|
|
#%define __find_provides /usr/lib/rpm/find-provides.perl
|
|
#%define __find_provides /usr/lib/rpm/find-provides.perl
|
|
#%define __find_requires /usr/lib/rpm/find-requires.perl
|
|
#%define __find_requires /usr/lib/rpm/find-requires.perl
|
|
@@ -21,15 +22,18 @@ Release: %{release}
|
|
License: Apache License 2.0
|
|
License: Apache License 2.0
|
|
URL: http://spamassassin.org/
|
|
URL: http://spamassassin.org/
|
|
Source0: http://spamassassin.org/released/Mail-SpamAssassin-%{real_version}.tar.bz2
|
|
Source0: http://spamassassin.org/released/Mail-SpamAssassin-%{real_version}.tar.bz2
|
|
-Source1: sample-japanese-local.cf-%{cfdate}
|
|
+Source1: http://spamassassin.org/released/Mail-SpamAssassin-rules-%{real_version}-r1104058.tar.gz
|
|
-Source2: README.vine
|
|
+Source2: sample-japanese-local.cf-%{cfdate}
|
|
-Source3: filter.sh
|
|
+Source3: README.vine
|
|
-Source4: sa-update.cronscript
|
|
+Source4: filter.sh
|
|
-Source5: sa-update.crontab
|
|
+Source5: spamassassin.sysconfig
|
|
Source6: sa-update.logrotate
|
|
Source6: sa-update.logrotate
|
|
|
|
+Source7: sa-update.crontab
|
|
|
|
+Source8: sa-update.cronscript
|
|
|
|
+Source9: sa-update.force-sysconfig
|
|
|
|
+Source11: spamassassin-official.conf
|
|
|
|
+Source12: sought.conf
|
|
Patch0: spamassassin-3.1.7_rules.patch
|
|
Patch0: spamassassin-3.1.7_rules.patch
|
|
-Patch1: spamassassin-3.3.1-fix-deprecated.patch
|
|
|
|
-Patch2: spamassassin-3.3.1-fix-deprecated2.patch
|
|
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
Requires(pre): /sbin/chkconfig
|
|
Requires(pre): /sbin/chkconfig
|
|
Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
|
|
Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
|
|
@@ -106,17 +110,14 @@ user's own mail user-agent application.
|
|
|
|
|
|
%patch0 -p0 -b .rules
|
|
%patch0 -p0 -b .rules
|
|
|
|
|
|
-%patch1 -p0 -b .fix-deprecated
|
|
|
|
-%patch2 -p0 -b .fix-deprecated2
|
|
|
|
-
|
|
|
|
# Japanese sample file / README
|
|
# Japanese sample file / README
|
|
-cp -p %{SOURCE1} sample-japanese-local.cf
|
|
+cp -p %{SOURCE2} sample-japanese-local.cf
|
|
-cp -p %{SOURCE2} README.vine
|
|
+cp -p %{SOURCE3} README.vine
|
|
-cp -p %{SOURCE3} filter.sh
|
|
+cp -p %{SOURCE4} filter.sh
|
|
# sa-update sample
|
|
# sa-update sample
|
|
-cp -p %{SOURCE4} .
|
|
|
|
-cp -p %{SOURCE5} .
|
|
|
|
cp -p %{SOURCE6} .
|
|
cp -p %{SOURCE6} .
|
|
|
|
+cp -p %{SOURCE7} .
|
|
|
|
+cp -p %{SOURCE8} .
|
|
# change README filename
|
|
# change README filename
|
|
cp spamd/README spamd/README.spamd
|
|
cp spamd/README spamd/README.spamd
|
|
|
|
|
|
@@ -127,29 +128,59 @@ CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
|
|
%{__make} spamd/libspamc.so
|
|
%{__make} spamd/libspamc.so
|
|
|
|
|
|
%install
|
|
%install
|
|
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
|
|
|
+
|
|
|
|
+make DESTDIR=%{buildroot} install
|
|
|
|
|
|
-make DESTDIR=$RPM_BUILD_ROOT install
|
|
+install -d %{buildroot}/%{initdir}
|
|
|
|
+install -m 0755 spamd/redhat-rc-script.sh %{buildroot}%{initdir}/spamassassin
|
|
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/mail/spamassassin
|
|
|
|
|
|
-install -d $RPM_BUILD_ROOT/%{initdir}
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
-install -m 0755 spamd/redhat-rc-script.sh $RPM_BUILD_ROOT/%{initdir}/spamassassin
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
-mkdir -p $RPM_BUILD_ROOT/etc/mail/spamassassin
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/cron.d
|
|
-mkdir -p $RPM_BUILD_ROOT/var/spool/spamassassin
|
|
+install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/spamassassin
|
|
|
|
+install -m 0644 %{SOURCE6} %{buildroot}/etc/logrotate.d/sa-update
|
|
|
|
+install -m 0644 %{SOURCE7} %{buildroot}/etc/cron.d/sa-update
|
|
|
|
+install -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/sa-update
|
|
|
|
+# installed mode 744 as non root users can't run it, but can read it.
|
|
|
|
+install -m 0744 %{SOURCE8} %{buildroot}%{_datadir}/spamassassin/sa-update.cron
|
|
|
|
|
|
# [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
|
# [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
|
|
|
|
|
|
|
+find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
|
|
|
|
+find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
|
|
|
|
+
|
|
|
|
+# Default rules from separate tarball
|
|
|
|
+cd %{buildroot}%{_datadir}/spamassassin/
|
|
|
|
+tar xfvz %{SOURCE1}
|
|
|
|
+sed -i -e 's|\@\@VERSION\@\@|%{saversion}|' *.cf
|
|
|
|
+cd -
|
|
|
|
+
|
|
|
|
+find %{buildroot}/usr -type f -print |
|
|
|
|
+ sed "s@^%{buildroot}@@g" |
|
|
|
|
+ grep -v perllocal.pod |
|
|
|
|
+ grep -v "\.packlist" > %{name}-%{version}-filelist
|
|
|
|
+if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then
|
|
|
|
+ echo "ERROR: EMPTY FILE LIST"
|
|
|
|
+ exit -1
|
|
|
|
+fi
|
|
|
|
+find %{buildroot}%{perl_vendorlib}/* -type d -print |
|
|
|
|
+ sed "s@^%{buildroot}@%dir @g" >> %{name}-%{version}-filelist
|
|
|
|
+
|
|
|
|
+# sa-update channels and keyring directory
|
|
|
|
+mkdir -m 0700 %{buildroot}%{_sysconfdir}/mail/spamassassin/sa-update-keys/
|
|
|
|
+mkdir -m 0755 %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
|
|
|
|
+install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
|
|
|
|
+install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
|
|
|
|
+
|
|
%clean
|
|
%clean
|
|
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
|
|
|
|
|
%post
|
|
%post
|
|
# install
|
|
# install
|
|
-# if [ $1 = 1 ]; then
|
|
+if [ $1 = 1 ]; then
|
|
-# /sbin/chkconfig --add spamassassin
|
|
+ /sbin/chkconfig --add spamassassin
|
|
-# fi
|
|
|
|
-
|
|
|
|
-if [ -x /usr/bin/sa-update ] ; then
|
|
|
|
-echo "Update rules"
|
|
|
|
-/usr/bin/sa-update ||:
|
|
|
|
fi
|
|
fi
|
|
|
|
|
|
# update
|
|
# update
|
|
@@ -168,6 +199,13 @@ if [ $1 = 2 ]; then
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+%post tools
|
|
|
|
+
|
|
|
|
+if [ -x /usr/bin/sa-update ] ; then
|
|
|
|
+echo "Update rules"
|
|
|
|
+/usr/bin/sa-update ||:
|
|
|
|
+fi
|
|
|
|
+
|
|
%post -n perl-Mail-SpamAssassin
|
|
%post -n perl-Mail-SpamAssassin
|
|
if [ -x /usr/bin/sa-update ] ; then
|
|
if [ -x /usr/bin/sa-update ] ; then
|
|
echo "Update rules"
|
|
echo "Update rules"
|
|
@@ -202,25 +240,34 @@ fi
|
|
%doc spamd/README.spamd
|
|
%doc spamd/README.spamd
|
|
%doc sample-japanese-local.cf
|
|
%doc sample-japanese-local.cf
|
|
%doc sa-update.*
|
|
%doc sa-update.*
|
|
-%attr(755,root,root) %{_bindir}/*
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
|
|
|
|
+%attr(755,root,root) %{_bindir}/spam*
|
|
%config %attr(755,root,root) %{initdir}/spamassassin
|
|
%config %attr(755,root,root) %{initdir}/spamassassin
|
|
-%{_mandir}/man1/*
|
|
+%{_mandir}/man1/spam*
|
|
|
|
|
|
%files -n spamassassin-tools
|
|
%files -n spamassassin-tools
|
|
%defattr(644,root,root,755)
|
|
%defattr(644,root,root,755)
|
|
%doc sql
|
|
%doc sql
|
|
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/sa-update
|
|
|
|
+%config(noreplace) %{_sysconfdir}/logrotate.d/sa-update
|
|
|
|
+%{_sysconfdir}/cron.d/sa-update
|
|
|
|
+%attr(755,root,root) %{_bindir}/sa-*
|
|
|
|
+%{_mandir}/man1/sa-*
|
|
|
|
|
|
%files -n perl-Mail-SpamAssassin
|
|
%files -n perl-Mail-SpamAssassin
|
|
-%defattr(644,root,root,755)
|
|
+%defattr(-,root,root)
|
|
%{perl_vendorlib}/Mail/*
|
|
%{perl_vendorlib}/Mail/*
|
|
%{perl_vendorlib}/spamassassin-run.pod
|
|
%{perl_vendorlib}/spamassassin-run.pod
|
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/mail/spamassassin
|
|
%config(noreplace) %{_sysconfdir}/mail/spamassassin
|
|
%{_datadir}/spamassassin
|
|
%{_datadir}/spamassassin
|
|
%{_mandir}/man3/*
|
|
%{_mandir}/man3/*
|
|
-%attr(775,root,root) /var/spool/spamassassin
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Mon Jan 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.2-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- added official rules.
|
|
|
|
+
|
|
* Fri Apr 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.1-1
|
|
* Fri Apr 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.1-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
- replaced "Prereq:" and "BuildPrereq".
|
|
- replaced "Prereq:" and "BuildPrereq".
|
|
@@ -250,7 +297,7 @@ fi
|
|
* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 3.2.3-0vl1
|
|
* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 3.2.3-0vl1
|
|
- new upstream release
|
|
- new upstream release
|
|
|
|
|
|
-* Thu Feb 20 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
+* Tue Feb 20 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
- 3.1.8-0vl2
|
|
- 3.1.8-0vl2
|
|
- rebuilt for VinePlus 4.x
|
|
- rebuilt for VinePlus 4.x
|
|
- installed perl modules to vendor_perl dir
|
|
- installed perl modules to vendor_perl dir
|
|
@@ -314,7 +361,7 @@ fi
|
|
- Source version up
|
|
- Source version up
|
|
- Sample-japanese-local.cf update
|
|
- Sample-japanese-local.cf update
|
|
|
|
|
|
-* Sun Apr 10 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
+* Sat Apr 10 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
- 2.63-0vl4
|
|
- 2.63-0vl4
|
|
- rebuild for VineSeed Plus
|
|
- rebuild for VineSeed Plus
|
|
- Sample-japanese-local.cf update
|
|
- Sample-japanese-local.cf update
|
|
@@ -329,7 +376,7 @@ fi
|
|
- Source version up
|
|
- Source version up
|
|
- Sample-japanese-local.cf update
|
|
- Sample-japanese-local.cf update
|
|
|
|
|
|
-* Sat Dec 23 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
+* Tue Dec 23 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
|
|
- 2.61-0vl1
|
|
- 2.61-0vl1
|
|
- Source version up
|
|
- Source version up
|
|
- Sample-japanese-local.cf update
|
|
- Sample-japanese-local.cf update
|