|
|
@@ -0,0 +1,166 @@
|
|
|
+##
|
|
|
+## milter.spec -- OpenPKG RPM Package Specification
|
|
|
+## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
|
|
|
+## Copyright (c) 2000-2006 Ralf S. Engelschall <http://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 version
|
|
|
+%define V_libmilter 8.13.8
|
|
|
+%define V_sendmail_pmilter 0.95
|
|
|
+%define V_mail_milter 0.07
|
|
|
+
|
|
|
+# package information
|
|
|
+Name: milter
|
|
|
+Summary: Mail Filtering API
|
|
|
+URL: http://www.milter.org/
|
|
|
+Vendor: Eric Allman, Todd Vierling
|
|
|
+Packager: OpenPKG Foundation e.V.
|
|
|
+Distribution: OpenPKG Community
|
|
|
+Class: EVAL
|
|
|
+Group: Mail
|
|
|
+License: BSD/Artistic
|
|
|
+Version: %{V_libmilter}
|
|
|
+Release: 20061228
|
|
|
+
|
|
|
+# package options
|
|
|
+%option with_perl no
|
|
|
+
|
|
|
+# list of sources
|
|
|
+Source0: ftp://ftp.sendmail.org/pub/sendmail/sendmail.%{V_libmilter}.tar.gz
|
|
|
+Source1: http://switch.dl.sourceforge.net/sourceforge/pmilter/Sendmail-PMilter-%{V_sendmail_pmilter}.tar.gz
|
|
|
+Source2: http://switch.dl.sourceforge.net/sourceforge/pmilter/Mail-Milter-%{V_mail_milter}.tar.gz
|
|
|
+Source3: milter.pc
|
|
|
+
|
|
|
+# build information
|
|
|
+Prefix: %{l_prefix}
|
|
|
+BuildRoot: %{l_buildroot}
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20060823
|
|
|
+PreReq: OpenPKG, openpkg >= 20060823
|
|
|
+%if "%{with_perl}" == "yes"
|
|
|
+BuildPreReq: perl, perl-openpkg
|
|
|
+PreReq: perl
|
|
|
+%endif
|
|
|
+AutoReq: no
|
|
|
+AutoReqProv: no
|
|
|
+
|
|
|
+%description
|
|
|
+ MILTER is the mail and SMTP protocol filtering API developed with
|
|
|
+ the Sendmail 8 MTA. This package provides Sendmail's original
|
|
|
+ client-side C API (libmilter) and optionally the alternative
|
|
|
+ client-side Perl APIs (Sendmail::Milter, Sendmail::PMilter,
|
|
|
+ Mail::Milter).
|
|
|
+
|
|
|
+%track
|
|
|
+ prog milter:libmilter = {
|
|
|
+ version = %{V_libmilter}
|
|
|
+ url = ftp://ftp.sendmail.org/pub/sendmail/
|
|
|
+ regex = sendmail.(\d+\.\d+\.\d+)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog milter:Sendmail-PMilter = {
|
|
|
+ version = %{V_sendmail_pmilter}
|
|
|
+ url = http://prdownloads.sourceforge.net/pmilter/
|
|
|
+ regex = Sendmail-PMilter-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+ prog milter:Mail-Milter = {
|
|
|
+ version = %{V_mail_milter}
|
|
|
+ url = http://prdownloads.sourceforge.net/pmilter/
|
|
|
+ regex = Mail-Milter-(__VER__)\.tar\.gz
|
|
|
+ }
|
|
|
+
|
|
|
+%prep
|
|
|
+ %setup -q -c
|
|
|
+%if "%{with_perl}" == "yes"
|
|
|
+ %setup -q -T -D -a 1
|
|
|
+ %setup -q -T -D -a 2
|
|
|
+%endif
|
|
|
+
|
|
|
+%build
|
|
|
+ # build C API
|
|
|
+ ( cd sendmail-%{V_libmilter}
|
|
|
+ extlibs="%{l_fsl_libs} -ldb"
|
|
|
+ case "%{l_platform -t}" in
|
|
|
+ *-sunos* ) extlibs="$extlibs -lrt" ;;
|
|
|
+ esac
|
|
|
+ ( echo "define(\`confCC', \`%{l_cc} %{l_cflags}')dnl"
|
|
|
+ echo "APPENDDEF(\`confINCDIRS', \`%{l_cppflags}')dnl"
|
|
|
+ echo "APPENDDEF(\`confLIBDIRS', \`%{l_ldflags}')dnl"
|
|
|
+ echo "APPENDDEF(\`confLIBS', \`$extlibs')dnl"
|
|
|
+ echo "define(\`confSTDIO_TYPE', \`portable')dnl"
|
|
|
+ echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DMILTER=1')dnl"
|
|
|
+ echo "APPENDDEF(\`conf_libmilter_ENVDEF', \`-D_FFR_MILTER_ROOT_UNSAFE')dnl"
|
|
|
+ ) >devtools/Site/site.config.m4
|
|
|
+ ( cd libmilter
|
|
|
+ ./Build
|
|
|
+ ) || exit $?
|
|
|
+ ) || exit $?
|
|
|
+
|
|
|
+ # build Perl API
|
|
|
+%if "%{with_perl}" == "yes"
|
|
|
+ %{l_prefix}/bin/perl-openpkg prepare
|
|
|
+ %{l_prefix}/bin/perl-openpkg -d Sendmail-PMilter-%{V_sendmail_pmilter} configure build
|
|
|
+ %{l_prefix}/bin/perl-openpkg -d Mail-Milter-%{V_mail_milter} configure build
|
|
|
+%endif
|
|
|
+
|
|
|
+%install
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+ # install C API
|
|
|
+ ( cd sendmail-%{V_libmilter}
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/include/milter \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/milter
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ include/libmilter/*.h \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/include/milter/
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ obj.*/libmilter/libmilter.a \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/
|
|
|
+ ) || exit $?
|
|
|
+ libs=`grep "^LDOPTS=" sendmail-%{V_libmilter}/obj.*/libmilter/Makefile | sed -e 's;^LDOPTS=;;'`
|
|
|
+ libs="$libs -lmilter"
|
|
|
+ case "%{l_platform -t}" in
|
|
|
+ *-sunos* ) libs="$libs -lrt" ;;
|
|
|
+ esac
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
|
|
|
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
+ -e "s;@version@;%{version};" \
|
|
|
+ -e "s;@libs@;$libs;" \
|
|
|
+ %{SOURCE milter.pc} $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
|
|
|
+
|
|
|
+ # install Perl API
|
|
|
+%if "%{with_perl}" == "yes"
|
|
|
+ %{l_prefix}/bin/perl-openpkg -d Sendmail-PMilter-%{V_sendmail_pmilter} install
|
|
|
+ %{l_prefix}/bin/perl-openpkg -d Mail-Milter-%{V_mail_milter} install
|
|
|
+ %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
|
|
|
+%else
|
|
|
+ >perl-openpkg-files
|
|
|
+%endif
|
|
|
+
|
|
|
+ # determine installation files
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
+ %{l_files_std} `cat perl-openpkg-files`
|
|
|
+
|
|
|
+%files -f files
|
|
|
+
|
|
|
+%clean
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+
|