| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- ##
- ## pine.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 version
- %define V_here 4.61L
- %define V_real 4.61
- # package information
- Name: pine
- Summary: Programm for Internet News & Email (PINE)
- URL: http://www.washington.edu/pine/
- Vendor: University of Washington
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: PLUS
- Group: Mail
- License: Free but restricted
- Version: %{V_here}
- Release: 20040716
- # package options
- %option with_ssl no
- %option with_ldap no
- # list of sources
- Source0: ftp://ftp.cac.washington.edu/pine/pine%{V_real}.tar.bz2
- Source1: pine.conf.fixed
- Source2: pine.conf
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, MTA, make, gcc
- PreReq: OpenPKG, openpkg >= 20040130, MTA
- %if "%{with_ssl}" == "yes"
- BuildPreReq: openssl
- PreReq: openssl
- %endif
- %if "%{with_ldap}" == "yes"
- BuildPreReq: openldap
- PreReq: openldap
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Pine - a Program for Internet News & Email - is a tool for reading,
- sending, and managing electronic messages. Pine was developed by
- Computing & Communications at the University of Washington. Though
- originally designed for inexperienced email users, Pine has evolved
- to support many advanced features, and an ever-growing number of
- configuration and personal-preference options.
- %track
- prog pine = {
- version = %{V_real}
- url = ftp://ftp.cac.washington.edu/pine
- regex = pine(__VER__)\.tar\.bz2
- }
- %prep
- %setup -q -n pine%{V_real}
- %build
- # determine build platform
- OS=""
- OS_DEP_FILE=""
- case "%{l_platform -t}" in
- *-freebsd* ) OS="bsf"; OS_DEP_FILE="pine/osdep/os-bsf.h" ;;
- *-hpux1[01]* ) OS="ghp"; OS_DEP_FILE="pine/osdep/os-ghp.h" ;;
- *-linux* ) OS="slx"; OS_DEP_FILE="pine/osdep/os-lnx.h" ;;
- *-netbsd* ) OS="neb"; OS_DEP_FILE="pine/osdep/os-neb.h" ;;
- *-sunos5.* ) OS="gs5"; OS_DEP_FILE="pine/osdep/os-sol.h" ;;
- *)
- # take a look at ./doc/pine-ports of the pine tarball
- echo "Sorry, unsupported architecture '%{l_platform -t}'" |\
- %{l_rpmtool} msg -b -t error 1>&2
- exit 1
- ;;
- esac
- # adjust paths
- PINE_CONF_FIXED="%{l_prefix}/etc/pine/pine.conf.fixed"
- PINE_CONF="%{l_prefix}/etc/pine/pine.conf"
- SENDMAIL="%{l_prefix}/sbin/sendmail"
- %{l_shtool} subst \
- -e "s;^\(#define SYSTEM_PINERC_FIXED[ ]\).*$;\1 \"$PINE_CONF_FIXED\";" \
- -e "s;^\(#define SYSTEM_PINERC[ ]\).*$;\1 \"$PINE_CONF\";" \
- -e "s;^\(#define SENDMAIL[ ]\).*$;\1 \"$SENDMAIL\";" \
- $OS_DEP_FILE
- case "%{l_platform -t}" in
- *-sunos* )
- %{l_shtool} subst \
- -e "s;^#include <stropts.h>;;" \
- pico/osdep/read.pol
- ;;
- esac
- # clean up before building Pine
- sh ./build clean
- # set up LDAP build environment
- %if "%{with_ldap}" == "yes"
- mkdir ldap
- ln -s %{l_prefix}/include ldap/include
- ln -s %{l_prefix}/lib ldap/libraries
- %endif
- # build Pine
- cflags="%{l_cflags -O}"
- ldflags="%{l_ldflags}"
- %if "%{with_ldap}" == "yes"
- case "%{l_platform -t}" in
- *-sunos5.* ) ldflags="$ldflags -lresolv" ;;
- esac
- %endif
- sh ./build \
- CC="%{l_cc}" \
- EXTRACFLAGS="$cflags" \
- EXTRALDFLAGS="$ldflags" \
- %if "%{with_ldap}" != "yes"
- NOLDAP \
- %endif
- %if "%{with_ssl}" == "yes"
- SSLDIR="%{l_prefix}" \
- SSLTYPE="unix" \
- %else
- NOSSL \
- %endif
- $OS
- %install
- rm -rf $RPM_BUILD_ROOT
- # create directories and install files
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/pine \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1
- %{l_shtool} install -c -s -m 755 \
- bin/pine \
- $RPM_BUILD_ROOT%{l_prefix}/bin/
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE pine.conf.fixed} \
- %{SOURCE pine.conf} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/pine/
- %{l_shtool} install -c -m 644 \
- doc/pine.1 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/pine/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|