%define name PowerMail %define version 1.7 %define release 1mdk Summary: Extremely powerful and versatile mail receiver Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Servers URL: http://www.powerdns.com/ Source0: powermail-%{version}.tar.bz2 # wget -rm http://doc.powermail.com/powermail/ Source1: doc.powerdns.com.tar.bz2 Source2: powerpop.init.bz2 Source3: powersmtp.init.bz2 Source4: pplistener.init.bz2 Source5: powerimap.init.bz2 PreReq: rpm-helper BuildRequires: bison BuildRequires: flex BuildRequires: libldap2-devel BuildRequires: libmysql12-devel BuildRequires: libopenssl0.9.7-devel #BuildRequires: libpq++4-devel #BuildRequires: libpq3-devel BuildRequires: libstdc++5-devel #BuildRequires: postgresql-devel BuildRequires: zlib1-devel Requires: libldap2 Requires: libmysql12 Requires: libopenssl0.9.7 #Requires: libpq++4 #Requires: libpq3 Requires: libstdc++5 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description PowerMail is a redundant & distributed system for receiving mail and storing it for users. The way PowerMail works is quite unorthodox, this document sets out how the different modules cooperate. PowerMail only receives email and makes it available over POP. Furthermore, incoming email can be forwarded to other email addresses. Although most PowerMail installations will query a relational database for information about email addresses, messages are stored on disk. %prep %setup -q -n powermail-%{version} -a1 bzcat %{SOURCE2} > powerpop.init bzcat %{SOURCE3} > powersmtp.init bzcat %{SOURCE4} > pplistener.init bzcat %{SOURCE5} > powerimap.init %build %serverbuild %configure2_5x \ --sysconfdir=%{_sysconfdir}/powermail \ --libdir=%{_libdir}/powermail \ --localstatedir=%{_localstatedir}/powermail \ --with-socketdir=/var/run/powermail \ --with-userbases="ldap mysqlpdns mysqlplain mysqlsimplepdns text" \ --with-mysql=%{_prefix} # NOTE: the postgresql "module" won't build, maybe later? # why is this nessesary all of a sudden? find . -type f -name "Makefile" | xargs perl -pi -e "s|-pthread|-lpthread|g" %make %install [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} # don't fiddle with the initscript! export DONT_GPRINTIFY=1 %makeinstall_std install -d %{buildroot}/var/run/powermail install -d %{buildroot}%{_initrddir} install -m0755 powerpop.init %{buildroot}%{_initrddir}/powerpop install -m0755 powersmtp.init %{buildroot}%{_initrddir}/powersmtp install -m0755 pplistener.init %{buildroot}%{_initrddir}/pplistener install -m0755 powerimap.init %{buildroot}%{_initrddir}/powerimap # add one missing file, use this on for now cp %{buildroot}%{_sysconfdir}/powermail/powerpop.conf \ %{buildroot}%{_sysconfdir}/powermail/powerimap.conf \ # clean up rm -rf %{buildroot}/etc/init.d %pre %_pre_useradd powermail /var/lib/powermail /bin/false %post %_post_service pplistener %_post_service powersmtp %_post_service powerpop %_post_service powerimap %preun %_preun_service pplistener %_preun_service powersmtp %_preun_service powerpop %_preun_service powerimap %postun %_postun_userdel powermail %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} # note: this package should probably be split up, but that may come later on... %files %defattr(-,root,root) %doc ChangeLog README TODO doc.powerdns.com %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/powersmtp.conf %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/power.conf %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/pplistener.conf %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/powerpop.conf %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/powerimap.conf %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/powermail/mailboxes %config(noreplace) %attr(0755,root,root) %{_initrddir}/powersmtp %config(noreplace) %attr(0755,root,root) %{_initrddir}/powerpop %config(noreplace) %attr(0755,root,root) %{_initrddir}/pplistener %config(noreplace) %attr(0755,root,root) %{_initrddir}/powerimap %dir %{_sysconfdir}/powermail %dir %attr(0755,powermail,powermail) /var/run/powermail %{_bindir}/powermail %{_bindir}/mboxdir %{_bindir}/pptool %{_sbindir}/powerimap %{_sbindir}/powersmtp %{_sbindir}/powerpop %{_sbindir}/pplistener %{_localstatedir}/powermail/messages %{_localstatedir}/powermail/state %changelog * Sat Aug 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.7-1mdk - initial cooker contrib - added S1 - S5