|
|
|
##
|
|
|
|
## petidomo.spec -- OpenPKG RPM Specification
|
|
|
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
|
|
|
|
## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
##
|
|
|
|
## 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/petidomo/
|
|
|
|
Vendor: Peter Simons
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
Distribution: OpenPKG [EXP]
|
|
|
|
Group: Mail
|
|
|
|
License: GPL
|
|
|
|
Version: 4.0b1
|
|
|
|
Release: 20011201
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
Source0: ftp://ftp.ossp.org/pkg/petidomo/petidomo-%{version}.tar.gz
|
|
|
|
Source1: etc.petidomo.tar
|
|
|
|
Source2: ftp://ftp.openpkg.org/DST/petidomo/fakesyslog.tar.gz
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20011126.0, bison, flex
|
|
|
|
PreReq: OpenPKG, openpkg >= 20011126.0, MTA
|
|
|
|
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 still performed by an MTA like Sendmail.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup0 -q -c
|
|
|
|
%setup1 -q -T -D -a 1
|
|
|
|
%setup2 -q -T -D -a 2
|
|
|
|
|
|
|
|
%build
|
|
|
|
fakesyslogdir="`pwd`/fakesyslog"
|
|
|
|
( cd fakesyslog
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
./configure \
|
|
|
|
--with-logfile=%{l_prefix}/var/petidomo/petidomo.log
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
)
|
|
|
|
( cd petidomo-%{version}
|
|
|
|
PATH="%{l_prefix}/bin:$PATH"
|
|
|
|
export PATH
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
LDFLAGS="-L$fakesyslogdir -lfakesyslog" \
|
|
|
|
LIBS="-lfakesyslog" \
|
|
|
|
./configure \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--sysconfdir=%{l_prefix}/etc/petidomo
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
)
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
( cd petidomo-%{version}
|
|
|
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
)
|
|
|
|
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}/etc/petidomo
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/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" \
|
|
|
|
-e "s;@l_prefix@;%{l_prefix};g" \
|
|
|
|
* $RPM_BUILD_ROOT%{l_prefix}/etc/petidomo/
|
|
|
|
)
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
%{l_files_std} \
|
|
|
|
'%config %{l_prefix}/etc/petidomo/*' \
|
|
|
|
'%attr(6755,%{l_fsusr},%{l_fsgrp}) %{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/sbin/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/sbin/rpmtool config \
|
|
|
|
-r -i "$RPM_INSTALL_PREFIX:petidomo" $aliases_file
|
|
|
|
fi
|
|
|
|
if [ ".$update_command" != . ]; then
|
|
|
|
eval $update_command
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|