OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 27-Oct-2003 10:19:05
Branch: HEAD Handle: 2003102709190302
Modified files:
openpkg-src/openpkg-import
openpkg-import.spec
openpkg-web news.txt
Log:
modify and improve option logic to overcome some current openpkg build
tool limitations described in Check-in [13019]
Summary:
Revision Changes Path
1.3 +19 -10 openpkg-src/openpkg-import/openpkg-import.spec
1.7178 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg-import/openpkg-import.spec
============================================================================
$ cvs diff -u -r1.2 -r1.3 openpkg-import.spec
--- openpkg-src/openpkg-import/openpkg-import.spec 6 Oct 2003 13:42:09 -0000
1.2
+++ openpkg-src/openpkg-import/openpkg-import.spec 27 Oct 2003 09:19:05 -0000
1.3
@@ -32,11 +32,12 @@
Distribution: OpenPKG [EVAL]
Group: System
License: GPL
-Version: 20031006
-Release: 20031006
+Version: 20031027
+Release: 20031027
# package options
-%option with_mta no
+%option with_mta no
+%option with_mta_path sendmail
# build information
Prefix: %{l_prefix}
@@ -45,7 +46,7 @@
PreReq: OpenPKG, openpkg >= 20030908
AutoReq: no
AutoReqProv: no
-%if "%{with_mta}" != "no"
+%if "%{with_mta}" == "yes"
Provides: MTA
Conflicts: exim, postfix, sendmail, ssmtp
%endif
@@ -68,14 +69,22 @@
exit 1
%endif
-%if "%{with_mta}" != "no"
- # with_MTA hunts for sendmail
- sendmail="%{with_mta}"
- if [ ".$sendmail" = .yes ]; then
- sendmail=`%{l_shtool} path -p/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib
sendmail`
+%if "%{with_mta}" == "yes"
+ # with_mta tries with_mta_path when absolute or hunts for with_mta_path in
well known places
+ sendmail="%{with_mta_path}"
+ set -x
+ case "$sendmail" in
+ /* ) break ;;
+ * ) sendmail=`%{l_shtool} path -p/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib
$sendmail || true` ;;
+ esac
+ set -x
+ if [ ".$sendmail" = . ]; then
+ echo "mta \"%{with_mta_path}\" requested but not found." |\
+ %{l_rpmtool} msg -b -t error 1>&2
+ exit 1
fi
if [ ! -x "$sendmail" ]; then
- echo "MTA requested; sendmail hunted; no executable found." |\
+ echo "mta \"%{with_mta_path}\" requested but \"$sendmail\" not executable."
|\
%{l_rpmtool} msg -b -t error 1>&2
exit 1
fi
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7177 -r1.7178 news.txt
--- openpkg-web/news.txt 26 Oct 2003 19:04:00 -0000 1.7177
+++ openpkg-web/news.txt 27 Oct 2003 09:19:03 -0000 1.7178
@@ -1,3 +1,4 @@
+27-Oct-2003: Upgraded package: P<openpkg-import-20031027-20031027>
26-Oct-2003: Upgraded package: P<dia-0.92.1-20031026>
26-Oct-2003: Upgraded package: P<vim-6.2.133-20031026>
26-Oct-2003: Upgraded package: P<perl-dns-20031026-20031026>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]