|
|
|
|
##
|
|
|
|
|
## rt.spec -- OpenPKG RPM Specification
|
|
|
|
|
## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
|
|
|
|
|
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
|
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@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 versions
|
|
|
|
|
%define V_real 3-0-0
|
|
|
|
|
%define V_here 3.0.0
|
|
|
|
|
%define V_log_dispatch 2.04
|
|
|
|
|
%define V_html_mason 1.19
|
|
|
|
|
%define V_libapreq 1.1
|
|
|
|
|
%define V_www_mechanize 0.38
|
|
|
|
|
%define V_mldbm 2.01
|
|
|
|
|
%define V_html_format 2.03
|
|
|
|
|
%define V_test_inline 0.15
|
|
|
|
|
%define V_locale_maketext_lexicon 0.16
|
|
|
|
|
%define V_locale_maketext_fuzzy 0.02
|
|
|
|
|
%define V_regexp_common 2.112
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: rt
|
|
|
|
|
Summary: Request Tracker
|
|
|
|
|
URL: http://www.fsck.com/projects/rt/
|
|
|
|
|
Vendor: Fsck
|
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [EVAL]
|
|
|
|
|
Group: Database
|
|
|
|
|
License: GPL
|
|
|
|
|
Version: %{V_here}
|
|
|
|
|
Release: 20030402
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: http://www.cpan.org/modules/by-module/Log/Log-Dispatch-%{V_log_dispatch}.tar.gz
|
|
|
|
|
Source1: http://www.cpan.org/modules/by-authors/id/J/JI/JIMW/libapreq-%{V_libapreq}.tar.gz
|
|
|
|
|
Source2: http://www.cpan.org/modules/by-module/HTML/HTML-Mason-%{V_html_mason}.tar.gz
|
|
|
|
|
Source3: http://www.cpan.org/modules/by-authors/id/P/PE/PETDANCE/WWW-Mechanize-%{V_www_mechanize}.tar.gz
|
|
|
|
|
Source4: http://www.cpan.org/modules/by-authors/id/C/CH/CHAMAS/MLDBM-%{V_mldbm}.tar.gz
|
|
|
|
|
Source5: http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/HTML-Format-%{V_html_format}.tar.gz
|
|
|
|
|
Source6: http://www.cpan.org/modules/by-authors/id/M/MS/MSCHWERN/Test-Inline-%{V_test_inline}.tar.gz
|
|
|
|
|
Source7: http://www.cpan.org/modules/by-authors/id/A/AU/AUTRIJUS/Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon}.tar.gz
|
|
|
|
|
Source8: http://www.cpan.org/modules/by-authors/id/A/AU/AUTRIJUS/Locale-Maketext-Fuzzy-%{V_locale_maketext_fuzzy}.tar.gz
|
|
|
|
|
Source9: http://www.cpan.org/modules/by-authors/id/A/AB/ABIGAIL/Regexp-Common-%{V_regexp_common}.tar.gz
|
|
|
|
|
Source10: http://www.fsck.com/pub/rt/release/rt-%{V_real}.tar.gz
|
|
|
|
|
Source11: rc.rt
|
|
|
|
|
Source12: rtsetup
|
|
|
|
|
Source13: rtcleanup
|
|
|
|
|
Source14: rtupgrade
|
|
|
|
|
Source15: rtapachectl
|
|
|
|
|
Source16: rtapache.conf
|
|
|
|
|
Source17: config.layout
|
|
|
|
|
Source18: rt-mailgate.sh
|
|
|
|
|
Patch0: rt.patch
|
|
|
|
|
|
|
|
|
|
# build information
|
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, perl, perl-openpkg
|
|
|
|
|
BuildPreReq: perl-sys, perl-util, perl-ds, perl-text, perl-apache
|
|
|
|
|
BuildPreReq: perl-dbi, perl-dbix, perl-mail, perl-www
|
|
|
|
|
BuildPreReq: apache, apache::with_mod_perl = yes
|
|
|
|
|
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
|
|
|
|
|
PreReq: MYSQL, perl-dbi::with_dbd_mysql = yes
|
|
|
|
|
PreReq: MTA
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
RT is an industrial-grade ticketing system. It lets a group of
|
|
|
|
|
people intelligently and efficiently manage requests submitted by a
|
|
|
|
|
community of users. RT is used by systems administrators, customer
|
|
|
|
|
support staffs, NOCs, developers and even marketing departments at
|
|
|
|
|
over a thousand sites around the world.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c
|
|
|
|
|
%setup -q -T -D -a 1
|
|
|
|
|
%setup -q -T -D -a 2
|
|
|
|
|
%setup -q -T -D -a 3
|
|
|
|
|
%setup -q -T -D -a 4
|
|
|
|
|
%setup -q -T -D -a 5
|
|
|
|
|
%setup -q -T -D -a 6
|
|
|
|
|
%setup -q -T -D -a 7
|
|
|
|
|
%setup -q -T -D -a 8
|
|
|
|
|
%setup -q -T -D -a 9
|
|
|
|
|
%setup -q -T -D -a 10
|
|
|
|
|
( cd rt-%{V_real}
|
|
|
|
|
%patch0 -p0
|
|
|
|
|
) || exit $?
|
|
|
|
|
%{l_shtool} install -c -m 0644 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};' \
|
|
|
|
|
%{SOURCE config.layout} rt-%{V_real}/.
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;chown;true;g' \
|
|
|
|
|
-e 's;chgrp;true;g' \
|
|
|
|
|
-e 's;chmod;true;g' \
|
|
|
|
|
-e 's;mkdir -p;%{l_shtool} mkdir -p;g' \
|
|
|
|
|
rt-%{V_real}/Makefile.in
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
( cd rt-%{V_real}
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
|
|
|
|
|
etc/RT_Config.pm.in
|
|
|
|
|
PERL=%{l_prefix}/bin/perl
|
|
|
|
|
./configure \
|
|
|
|
|
--enable-layout=OPKG \
|
|
|
|
|
--with-db-type=mysql \
|
|
|
|
|
--with-db-host=localhost \
|
|
|
|
|
--with-db-home=%{l_prefix} \
|
|
|
|
|
--with-db-dba=root \
|
|
|
|
|
--with-db-database=RT \
|
|
|
|
|
--with-db-user=RT \
|
|
|
|
|
--with-db-pass=XXX \
|
|
|
|
|
--with-web-user=%{l_nusr} \
|
|
|
|
|
--with-web-group=%{l_ngrp}
|
|
|
|
|
) || exit $?
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
# 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 $?
|
|
|
|
|
|
|
|
|
|
( 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 $?
|
|
|
|
|
|
|
|
|
|
# perform common epilog operations
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg epilog
|
|
|
|
|
|
|
|
|
|
%{l_shtool} mkdir -f -p -m 0755 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rt \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/cgi/rt \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/rt \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/local/lib \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/rt/mason-data \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/rt/mason-session \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/rt/log \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/rt/run
|
|
|
|
|
|
|
|
|
|
( cd rt-%{V_real}
|
|
|
|
|
%{l_make} \
|
|
|
|
|
config-install \
|
|
|
|
|
dirs \
|
|
|
|
|
libs-install \
|
|
|
|
|
etc-install \
|
|
|
|
|
bin-install \
|
|
|
|
|
sbin-install \
|
|
|
|
|
html-install \
|
|
|
|
|
doc-install \
|
|
|
|
|
DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
%{l_shtool} install -c -m 0644 \
|
|
|
|
|
etc/upgrade/* \
|
|
|
|
|
$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 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
|
|
|
|
|
ln -s \
|
|
|
|
|
%{l_prefix}/etc/rt/RT_SiteConfig.pm \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
|
|
|
|
|
) || exit $?
|
|
|
|
|
|
|
|
|
|
# remove Win32 handler
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*.svc
|
|
|
|
|
|
|
|
|
|
# remove dependency check script
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/rt-test-dependencies
|
|
|
|
|
|
|
|
|
|
# setup/cleanup/upgrade script
|
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
|
-e 's;@rt_db_dba@;root;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' \
|
|
|
|
|
%{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' \
|
|
|
|
|
%{SOURCE rtupgrade} \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|
|
|
|
|
|
|
# startup script
|
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
|
-e 's;@l_rusr@;%{l_rusr};g' \
|
|
|
|
|
-e 's;@l_rgrp@;%{l_rgrp};g' \
|
|
|
|
|
%{SOURCE rc.rt} \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
|
|
|
# apachectl wrapper
|
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
|
%{SOURCE rtapachectl} \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/
|
|
|
|
|
|
|
|
|
|
# apache config
|
|
|
|
|
l_hostname=`%{l_shtool} echo -e %h`
|
|
|
|
|
l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
|
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
|
-e 's;@l_rusr@;%{l_rusr};g' \
|
|
|
|
|
-e 's;@l_rgrp@;%{l_rgrp};g' \
|
|
|
|
|
-e "s;@l_hostname@;$l_hostname;g" \
|
|
|
|
|
-e "s;@l_domainname@;$l_domainname;g" \
|
|
|
|
|
%{SOURCE rtapache.conf} \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/
|
|
|
|
|
|
|
|
|
|
# better places
|
|
|
|
|
mv \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/webmux.pl \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/mason_handler.fcgi \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/cgi/rt/
|
|
|
|
|
mv \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/rt-crontool \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/
|
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
|
|
%{SOURCE rt-mailgate.sh} \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate
|
|
|
|
|
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
|
%{l_files_std} \
|
|
|
|
|
'%{l_prefix}/libexec/rt' \
|
|
|
|
|
'%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-setup-database' \
|
|
|
|
|
'%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-crontool' \
|
|
|
|
|
'%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/RT_SiteConfig.pm' \
|
|
|
|
|
'%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data' \
|
|
|
|
|
'%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data/*' \
|
|
|
|
|
'%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-session' \
|
|
|
|
|
'%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/log' \
|
|
|
|
|
'%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/run'
|
|
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
|
# activate in MTA configuration
|
|
|
|
|
mta_aliases_file=`%{l_prefix}/etc/rc --query mta_aliases_file`
|
|
|
|
|
mta_aliases_update=`%{l_prefix}/etc/rc --query mta_aliases_update`
|
|
|
|
|
if [ ".$mta_aliases_file" != . ]; then
|
|
|
|
|
(
|
|
|
|
|
echo "rt: \"|%{l_prefix}/bin/rt-mailgate --action correspond --queue general --url http://127.0.0.1:8380/\""
|
|
|
|
|
echo "rt-comment: \"|%{l_prefix}/bin/rt-mailgate --action comment --queue general --url http://127.0.0.1:8380/\""
|
|
|
|
|
) | %{l_rpmtool} config -a -i "%{l_prefix}:%{name}" $mta_aliases_file
|
|
|
|
|
fi
|
|
|
|
|
if [ ".$mta_aliases_update" != . ]; then
|
|
|
|
|
eval $mta_aliases_update
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
( echo "To complete installation of the RT package please check the"
|
|
|
|
|
echo "file '$RPM_INSTALL_PREFIX/etc/rt/RT_SiteConfig.pm'. In particular"
|
|
|
|
|
echo "you have to assign a password to the RT database user."
|
|
|
|
|
echo "If you have an old RT database you can erase it with:"
|
|
|
|
|
echo "$RPM_INSTALL_PREFIX/sbin/rtcleanup"
|
|
|
|
|
echo "If you start with a new installation of RT then run the command:"
|
|
|
|
|
echo "$RPM_INSTALL_PREFIX/sbin/rtsetup"
|
|
|
|
|
echo "DON'T FORGET TO SET A ADMINISTRATOR PASSWORD"
|
|
|
|
|
echo "Default settings are: user 'root', password 'password'"
|
|
|
|
|
echo "If you upgrade from an earlier 3.x-RT-Version then run:"
|
|
|
|
|
echo "$RPM_INSTALL_PREFIX/sbin/rtupgrade old-rt-version"
|
|
|
|
|
echo "to update RTs system tables"
|
|
|
|
|
) | %{l_rpmtool} msg -b -t notice
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
# stop perhaps still running server
|
|
|
|
|
$RPM_INSTALL_PREFIX/etc/rc rt stop
|
|
|
|
|
|
|
|
|
|
# deactivate in MTA configuration
|
|
|
|
|
mta_aliases_file=`%{l_prefix}/etc/rc --query mta_aliases_file`
|
|
|
|
|
mta_aliases_update=`%{l_prefix}/etc/rc --query mta_aliases_update`
|
|
|
|
|
if [ ".$mta_aliases_file" != . ]; then
|
|
|
|
|
%{l_rpmtool} config -r -i "%{l_prefix}:%{name}" $mta_aliases_file
|
|
|
|
|
fi
|
|
|
|
|
if [ ".$mta_aliases_update" != . ]; then
|
|
|
|
|
eval $mta_aliases_update
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/var/rt/mason-session/*
|
|
|
|
|
rm -rf $RPM_INSTALL_PREFIX/var/rt/mason-data/*/*
|
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/var/rt/log/*
|
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/var/rt/run/apache.pid
|
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/var/rt/run/ssl_scache
|
|
|
|
|
fi
|