|
|
@@ -24,8 +24,8 @@
|
|
|
##
|
|
|
|
|
|
# package versions
|
|
|
-%define V_real 3-0-1
|
|
|
-%define V_here 3.0.1
|
|
|
+%define V_real 3-0-2
|
|
|
+%define V_here 3.0.2
|
|
|
%define V_log_dispatch 2.04
|
|
|
%define V_html_mason 1.20
|
|
|
%define V_libapreq 1.1
|
|
|
@@ -47,10 +47,23 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: Database
|
|
|
License: GPL
|
|
|
Version: %{V_here}
|
|
|
-Release: 20030503
|
|
|
+Release: 20030515
|
|
|
|
|
|
# package options
|
|
|
%option with_color_primary 336699
|
|
|
+%option with_db_mysql yes
|
|
|
+%option with_db_postgresql no
|
|
|
+%option with_db_oracle no
|
|
|
+
|
|
|
+# fixing conflicting options
|
|
|
+%if "%{with_db_oracle}" == "yes"
|
|
|
+%undefine with_db_postgresql
|
|
|
+%define with_db_postgresql no
|
|
|
+%endif
|
|
|
+%if "%{with_db_oracle}" == "yes" || "%{with_db_postgresql}" == "yes"
|
|
|
+%undefine with_db_mysql
|
|
|
+%define with_db_mysql no
|
|
|
+%endif
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://www.cpan.org/modules/by-module/Log/Log-Dispatch-%{V_log_dispatch}.tar.gz
|
|
|
@@ -85,7 +98,15 @@ PreReq: OpenPKG, openpkg >= 20020206, perl, perl-openpkg
|
|
|
PreReq: perl-sys, perl-util, perl-ds, perl-text, perl-apache
|
|
|
PreReq: perl-dbi, perl-dbix, perl-mail, perl-www
|
|
|
PreReq: apache, apache::with_mod_perl = yes
|
|
|
+%if "%{with_db_mysql}" == "yes"
|
|
|
PreReq: MYSQL, perl-dbi::with_dbd_mysql = yes
|
|
|
+%endif
|
|
|
+%if "%{with_db_postgresql}" == "yes"
|
|
|
+PreReq: postgresql, perl-dbi::with_dbd_pg = yes
|
|
|
+%endif
|
|
|
+%if "%{with_db_oracle}" == "yes"
|
|
|
+PreReq: oracle, perl-dbi::with_dbd_oracle = yes
|
|
|
+%endif
|
|
|
PreReq: MTA
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
@@ -121,6 +142,9 @@ AutoReqProv: no
|
|
|
-e 's;chmod;true;g' \
|
|
|
-e 's;mkdir -p;%{l_shtool} mkdir -p;g' \
|
|
|
rt-%{V_real}/Makefile.in
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;Locale::Maketext 1\.04;Locale::Maketext 1.03;' \
|
|
|
+ rt-%{V_real}/lib/RT/I18N.pm
|
|
|
|
|
|
%build
|
|
|
( cd rt-%{V_real}
|
|
|
@@ -133,10 +157,24 @@ AutoReqProv: no
|
|
|
--with-db-type=mysql \
|
|
|
--with-db-host=localhost \
|
|
|
--with-db-home=%{l_prefix} \
|
|
|
+%if "%{with_db_mysql}" == "yes"
|
|
|
--with-db-dba=root \
|
|
|
- --with-db-database=RT \
|
|
|
- --with-db-user=RT \
|
|
|
+ --with-db-database=rt \
|
|
|
+ --with-db-user=rt \
|
|
|
+ --with-db-pass=XXX \
|
|
|
+%endif
|
|
|
+%if "%{with_db_postgresql}" == "yes"
|
|
|
+ --with-db-dba=postgresql \
|
|
|
+ --with-db-database=rt \
|
|
|
+ --with-db-user=rt \
|
|
|
+ --with-db-pass=XXX \
|
|
|
+%endif
|
|
|
+%if "%{with_db_oracle}" == "yes"
|
|
|
+ --with-db-dba=system \
|
|
|
+ --with-db-database=rt \
|
|
|
+ --with-db-user=rt \
|
|
|
--with-db-pass=XXX \
|
|
|
+%endif
|
|
|
--with-web-user=%{l_nusr} \
|
|
|
--with-web-group=%{l_ngrp} \
|
|
|
--with-customdir=%{l_prefix}/etc/rt/local \
|
|
|
@@ -150,132 +188,40 @@ AutoReqProv: no
|
|
|
|
|
|
# perform common prolog operations
|
|
|
rt=%{l_prefix}/libexec/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
|
|
|
-
|
|
|
- ( cd Log-Dispatch-%{V_log_dispatch}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd HTML-Mason-%{V_html_mason}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd libapreq-%{V_libapreq}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd WWW-Mechanize-%{V_www_mechanize}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
|
|
|
- ( cd MLDBM-%{V_mldbm}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd HTML-Format-%{V_html_format}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd Test-Inline-%{V_test_inline}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
-
|
|
|
- ( cd Locale-Maketext-Fuzzy-%{V_locale_maketext_fuzzy}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
+ %{l_prefix}/bin/perl-openpkg prolog
|
|
|
|
|
|
- ( cd Regexp-Common-%{V_regexp_common}
|
|
|
- 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.orig >Makefile.PL
|
|
|
- $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
|
|
|
- $make $make_args pure_all
|
|
|
- $make $make_args pure_install
|
|
|
- ) || exit $?
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d Log-Dispatch-%{V_log_dispatch} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d HTML-Mason-%{V_html_mason} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d libapreq-%{V_libapreq} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d WWW-Mechanize-%{V_www_mechanize} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d MLDBM-%{V_mldbm} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d HTML-Format-%{V_html_format} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d Test-Inline-%{V_test_inline} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d Locale-Maketext-Fuzzy-%{V_locale_maketext_fuzzy} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
+ %{l_prefix}/bin/perl-openpkg install \
|
|
|
+ -d Regexp-Common-%{V_regexp_common} \
|
|
|
+ -p ${RPM_BUILD_ROOT}$rt
|
|
|
|
|
|
# perform common epilog operations
|
|
|
%{l_prefix}/bin/perl-openpkg epilog
|
|
|
@@ -309,7 +255,6 @@ AutoReqProv: no
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade/
|
|
|
%{l_shtool} install -c -m 0644 \
|
|
|
-e '/Set($WebBaseURL/s;"[^"]*";"";' \
|
|
|
- -e '/Set($WebImagesURL/s;/";";' \
|
|
|
etc/RT_Config.pm \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rt/RT_SiteConfig.pm
|
|
|
rm -f \
|
|
|
@@ -338,19 +283,28 @@ AutoReqProv: no
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/rt-test-dependencies
|
|
|
|
|
|
# setup/cleanup/upgrade script
|
|
|
+%if "%{with_db_mysql}" == "yes"
|
|
|
+ rt_db_dba=root
|
|
|
+%endif
|
|
|
+%if "%{with_db_postgresql}" == "yes"
|
|
|
+ rt_db_dba=postgresql
|
|
|
+%endif
|
|
|
+%if "%{with_db_oracle}" == "yes"
|
|
|
+ rt_db_dba=system
|
|
|
+%endif
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@rt_db_dba@;root;g' \
|
|
|
+ -e "s;@rt_db_dba@;$rt_db_dba;g" \
|
|
|
%{SOURCE rtsetup} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@rt_db_dba@;root;g' \
|
|
|
+ -e "s;@rt_db_dba@;$rt_db_dba;g" \
|
|
|
%{SOURCE rtcleanup} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@rt_db_dba@;root;g' \
|
|
|
+ -e "s;@rt_db_dba@;$rt_db_dba;g" \
|
|
|
%{SOURCE rtupgrade} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|