## ## petidomo.spec -- OpenPKG RPM Specification ## Copyright (c) 2000-2004 The OpenPKG Project ## Copyright (c) 2000-2004 Ralf S. Engelschall ## Copyright (c) 2000-2004 Cable & Wireless ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package information Name: petidomo Summary: Mailing List Server URL: http://www.ossp.org/pkg/tool/petidomo/ Vendor: Peter Simons Packager: The OpenPKG Project Distribution: OpenPKG [EVAL] Group: Mail License: GPL Version: 4.0b1 Release: 20030918 # package options %option with_fsl yes # list of sources Source0: ftp://ftp.ossp.org/pkg/tool/petidomo/petidomo-%{version}.tar.gz Source1: etc.petidomo.tar Source2: fsl.petidomo Source3: rc.petidomo Patch0: petidomo.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20030718, bison, flex PreReq: OpenPKG, openpkg >= 20030718, MTA %if "%{with_fsl}" == "yes" BuildPreReq: fsl >= 1.2.0 PreReq: fsl >= 1.2.0 %endif AutoReq: no AutoReqProv: no %description Petidomo is a mailing list manager very similar to the popular package Majordomo. It handles both list un-/subscription and the address expansion of list postings. The actual delivery of postings is performed by an MTA like Sendmail. %prep %setup0 -q -c %setup1 -q -T -D -a 1 %patch -p0 %build # build petidomo ( cd petidomo-%{version} CC="%{l_cc}" \ CFLAGS="%{l_cflags}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ LIBS="%{l_fsl_libs}" \ ./configure \ --prefix=%{l_prefix} \ --sysconfdir=%{l_prefix}/etc/petidomo %{l_make} %{l_mflags} ) || exit $? %install rm -rf $RPM_BUILD_ROOT ( cd petidomo-%{version} %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT ) || exit $? rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/petidomo rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/petidomo rm -rf $RPM_BUILD_ROOT%{l_prefix}/var/petidomo %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/var/petidomo \ $RPM_BUILD_ROOT%{l_prefix}/etc/petidomo %{l_shtool} install -c -m 644 \ /dev/null $RPM_BUILD_ROOT%{l_prefix}/var/petidomo/petidomo.log ( cd etc.petidomo l_hostname=`%{l_shtool} echo -e '%h%d'` %{l_shtool} install -c -m - \ -e "s;@l_hostname@;${l_hostname};g" %{l_value -s -a} \ * $RPM_BUILD_ROOT%{l_prefix}/etc/petidomo/ ) || exit $? # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d %{l_shtool} install -c -m - %{l_value -s -a} \ %{SOURCE rc.petidomo} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ # install OSSP fsl configuration %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl %{l_shtool} install -c -m 644 %{l_value -s -a} \ %{SOURCE fsl.petidomo} \ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%not %dir %{l_prefix}/etc/fsl' \ '%config %{l_prefix}/etc/fsl/fsl.petidomo' \ '%config %{l_prefix}/etc/petidomo/*' \ '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/petidomo/*' \ '%attr(6755,%{l_musr},%{l_mgrp}) %{l_prefix}/bin/petidomo' %files -f files %clean rm -rf $RPM_BUILD_ROOT %post # add hook into MTA configuration if [ ".$1" = .1 ]; then aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` if [ ".$aliases_file" != . ]; then ( echo "petidomo: \"|$RPM_INSTALL_PREFIX/bin/petidomo --mode=listserv\"" echo "petidomo-approve: \"|$RPM_INSTALL_PREFIX/bin/petidomo --mode=approve\"" echo "petidomo-manager: postmaster" echo "owner-owner: petidomo-manager" echo "users: \"|$RPM_INSTALL_PREFIX/bin/petidomo --mode=deliver --listname=users\"" echo "users-request: \"|$RPM_INSTALL_PREFIX/bin/petidomo --mode=listserv --listname=users\"" echo "users-owner: postmaster" echo "owner-users: users-owner" ) |\ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:petidomo" $aliases_file fi if [ ".$update_command" != . ]; then eval $update_command fi fi %postun # remove hook from MTA configuration if [ ".$1" = .0 ]; then aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` if [ ".$aliases_file" != . ]; then $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:petidomo" $aliases_file fi if [ ".$update_command" != . ]; then eval $update_command fi fi