# $Id: smeserver-popfile.spec,v 1.1 2013/03/03 21:50:54 unnilennium Exp $ # Authority: cool34000 # Name: Sylvain Gomez %define name smeserver-popfile %define version 0.21.2 %define release 2 %define rpmver 4.0.4 Summary: POPFile is a POP3 proxy Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GPL Group: Mail/Classification Source: %{name}-%{version}.tar.gz URL: http://popfile.sourceforge.net/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch BuildRequires: e-smith-devtools Requires: e-smith-base, e-smith-release >= 7, perl-DBD-SQLite >= 1.13-1 %description This RPM is an unofficial addon for the SME Server 7.x. The target audience is the Linux/E-smith administrator who wants to add a POP3 Proxy to filter and classify mails. After installation open your webbrowser at http://your_e-smith-server_adress:7676 %changelog * Thu Jun 27 2013 JP Pialasse 0.21.2-2.sme - fix unreachable when updating * Mon Jun 5 2007 Sylvain Gomez - 0.21.2-1 - Original version %prep rm -rf $RPM_BUILD_ROOT %setup %build %install /bin/rm -rf $RPM_BUILD_ROOT (/usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) /bin/rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist %defattr(-,root,root) %clean rm -rf $RPM_BUILD_ROOT %pre %post # Variables SRVNAME=$(/sbin/e-smith/db configuration get SystemName) # Creating and starting service ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98popfile /sbin/e-smith/db configuration set popfile service status enabled /sbin/e-smith/signal-event remoteaccess-update service popfile start echo " " echo "-------------------------------------------------------------------------------" echo "POPFile Installation finished." echo "Please go to http://$SRVNAME:7676 and protect access with a password!" echo " " echo "To use POPFile, you must configure your mail clients to use the new POP3 proxy." echo "Configuration to be modified is:" echo " - POP3 server: $SRVNAME" echo " - Login : $SRVNAME:your-sme-login" echo " - POP3 Port : 1100" echo "-------------------------------------------------------------------------------" %preun # Deleting and unregistering service if [ $1 = 0 ] ; then service popfile stop sleep 3 rm -f /etc/rc7.d/S98popfile rm -f /etc/rc.d/init.d/popfile /sbin/e-smith/config delete popfile /sbin/e-smith/signal-event remoteaccess-update # Removing install directory rm -rf /opt/popfile fi %postun