From 2f6117841e3c753bf1b2f59ca217ab7cec0c0366 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 30 Dec 2002 20:40:18 +0000 Subject: [PATCH] switch to %option(s); cleanup package --- xerces-c/xerces-c.spec | 79 ++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/xerces-c/xerces-c.spec b/xerces-c/xerces-c.spec index e4eaf774e9..6866634eea 100644 --- a/xerces-c/xerces-c.spec +++ b/xerces-c/xerces-c.spec @@ -22,16 +22,19 @@ ## SUCH DAMAGE. ## +# package version +%define V_opkg 2.1.0 +%define V_dist 2_1_0 + # package options -%ifndef with_pth -%define with_pth no -%endif -%ifndef with_threads -%define with_threads no -%endif +%option with_pth no +%option with_threads no -%define V_xerces 2.1.0 -%define Vs_xerces 2_1_0 +# package option dependencies +%if "%{with_pth}" == "yes" +%undefine with_threads +%define with_threads yes +%endif # package information Name: xerces-c @@ -42,23 +45,19 @@ Packager: The OpenPKG Project Distribution: OpenPKG [EVAL] Group: Web License: Apache Software License 1.1 -Version: %{V_xerces} -Release: 20021227 +Version: %{V_opkg} +Release: 20021230 # list of sources -Source0: http://xml.apache.org/dist/xerces-c/stable/xerces-c-src%{Vs_xerces}.tar.gz +Source0: http://xml.apache.org/dist/xerces-c/stable/xerces-c-src%{V_dist}.tar.gz Patch0: xerces-c.patch Patch1: xerces-c-pth.patch -%if "%{with_pth}" == "yes" -%define with_threads yes -%endif - # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, gcc, make, autoconf, libtool -PreReq: OpenPKG +BuildPreReq: OpenPKG, openpkg >= 20021230, gcc, make, autoconf, libtool +PreReq: OpenPKG, openpkg >= 20021230 %if "%{with_pth}" == "yes" BuildPreReq: pth PreReq: pth @@ -69,12 +68,10 @@ AutoReqProv: no %description Xerces-C++ is a validating XML parser written in a portable subset of C++. - Options: - --define 'with_threads' %{with_threads}' - --define 'with_pth %{with_pth}' + %options -p12 %prep - %setup -q -n xerces-c-src%{Vs_xerces} + %setup -q -n xerces-c-src%{V_dist} %patch0 -p0 %if "%{with_pth}" == "yes" %patch1 -p0 @@ -82,32 +79,32 @@ AutoReqProv: no %build rm -rf $RPM_BUILD_ROOT - ( XERCESCROOT=`pwd` ; - export XERCESCROOT ; + ( XERCESCROOT=`pwd` + export XERCESCROOT %{l_shtool} subst \ -e 's;@l_ar@;%{l_libtool} --mode=link c++ -static -o;' \ obj/Makefile.in - cd $XERCESCROOT/src/xercesc ; - autoconf ; + cd $XERCESCROOT/src/xercesc + %{l_prefix}/bin/autoconf %if "%{with_threads}" == "yes" - os="freebsd" ; - pt="pthread" ; + os="freebsd" + pt="pthread" case "%{l_target}" in %if "%{with_pth}" == "yes" - *-freebsd*) os=freebsd ; pt=pth ;; + *-freebsd*) os=freebsd; pt=pth ;; %else - *-freebsd*) os=freebsd ; pt=pthread ;; + *-freebsd*) os=freebsd; pt=pthread ;; %endif - *-linux*) os=linux ; pt=pthread ;; - *-solaris*) os=solaris ; pt=pthread ;; - *-irix*) os=irix ; pt=sproc ;; - *-hpux-10.*) os=hp-10 ; pt=none ;; - *-hpux-11.*) os=hp-11 ; pt=none ;; - *-aix*) os=aix ; pt=pthread ;; - esac ; + *-linux*) os=linux; pt=pthread ;; + *-solaris*) os=solaris; pt=pthread ;; + *-irix*) os=irix; pt=sproc ;; + *-hpux-10.*) os=hp-10; pt=none ;; + *-hpux-11.*) os=hp-11; pt=none ;; + *-aix*) os=aix; pt=pthread ;; + esac %else - os="freebsd" ; - pt="none" ; + os="freebsd" + pt="none" case "%{l_target}" in *-freebsd*) os=freebsd ;; *-linux*) os=linux ;; @@ -134,9 +131,9 @@ AutoReqProv: no ) %install - ( XERCESCROOT=`pwd` ; - export XERCESCROOT ; - cd $XERCESCROOT/src/xercesc ; + ( XERCESCROOT=`pwd` + export XERCESCROOT + cd $XERCESCROOT/src/xercesc %{l_make} %{l_mflags} install "PREFIX=$RPM_BUILD_ROOT%{l_prefix}" ) %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}