From 661d71efa898f0d71d6ff2d5d60e61bc318e5887 Mon Sep 17 00:00:00 2001 From: Michael van Elst Date: Fri, 10 Jan 2003 14:45:30 +0000 Subject: [PATCH] partial build now completes TODO: configuration/setup-scripts --- rt/rt.spec | 136 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 46 deletions(-) diff --git a/rt/rt.spec b/rt/rt.spec index 31c9fc900c..6f3e5a306c 100644 --- a/rt/rt.spec +++ b/rt/rt.spec @@ -23,8 +23,9 @@ ## SUCH DAMAGE. ## -%define V_real 2-0-15 -%define V_here 2.0.15 +%define V_real 2-0-15 +%define V_here 2.0.15 +%define V_log_dispatch 2.01 # package information Name: rt @@ -36,16 +37,17 @@ Distribution: OpenPKG [JUNK] Group: Database License: GPL Version: %{V_here} -Release: 20021005 +Release: 20030110 # list of sources -Source0: http://www.fsck.com/pub/rt/release/rt-%{V_real}.tar.gz +Source0: http://www.cpan.org/modules/by-module/Log/Log-Dispatch-%{V_log_dispatch}.tar.gz +Source1: http://www.fsck.com/pub/rt/release/rt-%{V_real}.tar.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20020206 -PreReq: OpenPKG, openpkg >= 20020206, perl, mysql, apache +BuildPreReq: OpenPKG, openpkg >= 20020206, perl-sys, perl-util, perl-ds, perl-text +PreReq: OpenPKG, openpkg >= 20020206, perl, mysql, apache, perl-sys, perl-util, perl-ds, perl-text AutoReq: no AutoReqProv: no @@ -57,52 +59,94 @@ AutoReqProv: no over a thousand sites around the world. %prep - %setup -q -n rt-%{V_real} + %setup -q -c + %setup -q -T -D -a 1 %build - %{l_shtool} subst \ - -e 's;^\(PERL *= *\).*;\1%{l_prefix}/bin/perl;g' \ - -e 's;^\(BIN_OWNER *= *\).*;\1%{l_musr};g' \ - -e 's;^\(RTGROUP *= *\).*;\1%{l_mgrp};g' \ - -e 's;^\(LIBS_OWNER *= *\).*;\1%{l_musr};g' \ - -e 's;^\(LIBS_GROUP *= *\).*;\1%{l_mgrp};g' \ - -e 's;^\(RT_PATH *= *\).*;\1%{l_prefix}/share/rt;g' \ - -e 's;^\(RT_LIB_PATH *= *\).*;\1%{l_prefix}/share/rt;g' \ - -e 's;^\(RT_ETC_PATH *= *\).*;\1%{l_prefix}/etc/rt;g' \ - -e 's;^\(RT_BIN_PATH *= *\).*;\1%{l_prefix}/bin;g' \ - -e 's;^\(RT_MAN_PATH *= *\).*;\1%{l_prefix}/man;g' \ - -e 's;^\(MASON_LOCAL_HTML_PATH *= *\).*;\1%{l_prefix}/share/rt/mason;g' \ - -e 's;^\(MASON_DATA_PATH *= *\).*;\1%{l_prefix}/var/rt/mason-data;g' \ - -e 's;^\(MASON_SESSION_PATH *= *\).*;\1%{l_prefix}/var/rt/mason-session;g' \ - -e 's;^\(RT_LOG_PATH *= *\).*;\1%{l_prefix}/var/rt/log;g' \ - -e 's;^\(RT_MODPERL_HANDLER *= *\).*;\1%{l_prefix}/cgi/rt/webmux.pl;g' \ - -e 's;^\(RT_FASTCGI_HANDLER *= *\).*;\1%{l_prefix}/cgi/rt/mason_handler.fcgi;g' \ - -e 's;^\(RT_SPEEDYCGI_HANDLER *= *\).*;\1%{l_prefix}/cgi/rt/mason_handler.scgi;g' \ - -e 's;^\(DB_TYPE *= *\).*;\1mysql;g' \ - -e 's;^\(DB_HOST *= *\).*;\1localhost;g' \ - -e 's;^\(DB_PORT *= *\).*;\1;g' \ - -e 's;^\(DB_HOME *= *\).*;\1%{l_prefix};g' \ - -e 's;^\(DB_DBA *= *\).*;\1root;g' \ - -e 's;^\(DB_DBA_PASSWORD *= *\).*;\1XXX;g' \ - -e 's;^\(DB_RT_HOST *= *\).*;\1localhost;g' \ - -e 's;^\(DB_DATABASE *= *\).*;\1RT;g' \ - -e 's;^\(DB_RT_USER *= *\).*;\1RT;g' \ - -e 's;^\(DB_RT_PASS *= *\).*;\1XXX;g' \ - -e 's;^\(WEB_USER *= *\).*;\1%{l_nusr};g' \ - -e 's;^\(WEB_GROUP *= *\).*;\1%{l_ngrp};g' \ - -e 's;chown;true;g' \ - -e 's;chgrp;true;g' \ - -e 's;mkdir -p;%{l_shtool} mkdir -p;g' \ - Makefile - %{l_make} %{l_mflags} + rm -rf $RPM_BUILD_ROOT + ( cd Log-Dispatch-%{V_log_dispatch} + + # perform common prolog operations + rt=%{l_prefix}/share/rt + %{l_prefix}/bin/perl-openpkg prolog + %{l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}$rt + perl="${RPM_BUILD_DIR}/perl" + echo "exec ${l_prefix}/bin/perl \\" >>$perl + echo " \"\$@\"" >>$perl + chmod a+x $perl + + # build and install individual modules + perl_args="INSTALLSITELIB=${RPM_BUILD_ROOT}$rt" + make=`%{l_prefix}/bin/rpm --eval '%{l_make} %{l_mflags}'` + make_args="PERL=${perl} FULLPERL=${perl}" + chmod -R u+rw Makefile.PL + cp Makefile.PL Makefile.PL.orig + sed -e "s:\$^X:'$perl':g" Makefile.PL + $perl Makefile.PL ${1+"$@"} $perl_args