| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- ##
- ## petidomo.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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/tool/petidomo/
- Vendor: Peter Simons
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: Mail
- License: GPL
- Version: 4.0b6
- Release: 20040319
- # 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
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, bison, flex
- PreReq: OpenPKG, openpkg >= 20040130, MTA
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl >= 1.4.0-20040310
- PreReq: fsl >= 1.4.0-20040310
- %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.
- %track
- prog petidomo = {
- comment = "rse: 4.0b3 is broken"
- version = %{version}
- url = ftp://ftp.ossp.org/pkg/tool/petidomo/
- regex = petidomo-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -c
- %setup -q -T -D -a 1
- %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
|