Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > eebf88dc5c0c79989b4eafd7ff2d0223 > files > 9

rt-4.0.8-6.mga3.src.rpm

#
# Copyright (c) 2005, 2006, 2007, 2008 Ralf Corsepius, Ulm, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# Supported rpmbuild options:
#
# --with gd/--without gd 
#	enable/disable gd support
#	Default: --with (had been default in rt < 3.8.0)
%bcond_without gd 

# --with graphviz/--without graphviz
#	enable/disable graphiz support
#	Default: --without (missing deps)
%bcond_with graphviz

# --with devel_mode/--without devel_mode
#	enable/disable building/installing devel files
#	Default: without (missing deps; TBA in spec)
%bcond_with devel_mode

# --with gpg/--without gpg
#	enable/disable building gpg support
#	Default: without
%bcond_with gpg

# --with tests
#	run testsuite when building the rpm
#	Default: without (doesn't work in chroots.)
%bcond_with tests

%define RT_DIR			%{_datadir}/rt
%define RT_BINDIR		%{_sbindir}
%define RT_LIBDIR		%{perl_vendorlib}
%define RT_WWWDIR		%{_datadir}/rt/html
%define RT_LOGDIR		/var/log/rt
%define RT_CACHEDIR		/var/cache/rt
%define RT_LOCALSTATEDIR	/var/lib/rt

%define _requires_exceptions perl(RT::Tickets_SQL)\\|perl(RT->.*

Summary:	Request tracker
Name:		rt
Version:	4.0.8
Release:	%mkrel 6
Group:		System/Servers
License:	GPLv2+
URL:		http://www.bestpractical.com/rt
Source0:	http://www.bestpractical.com/pub/rt/release/rt-%{version}.tar.gz
Source4:	README.urpmi.in
Source5:	rt.logrotate.in
Source6:	README.upgrade.urpmi
Patch0:		rt-4.0-config.diff
Patch1:     rt-4-set-webpath-rt.patch
Patch2:		rt-4.0-Makefile.diff
Patch3:		rt-setup-database-fix-upgrade-datadir-path.patch
BuildArch:	noarch
# For Debian compatibility
Provides:	request-tracker3 = %{version}-%{release}
# This list is alpha sorted
BuildRequires: perl(Apache::DBI)
BuildRequires: perl(Apache::Session) >= 1.53
BuildRequires: perl(Cache::Simple::TimedExpiry)
BuildRequires: perl(Calendar::Simple)
BuildRequires: perl(CGI::Cookie) >= 1.20
BuildRequires: perl(CGI::Emulate::PSGI)
BuildRequires: perl(CGI::PSGI)
BuildRequires: perl(Class::ReturnValue) >= 0.40
BuildRequires: perl(Convert::Color)
BuildRequires: perl(CPAN)
BuildRequires: perl(CSS::Squish) >= 0.06
BuildRequires: perl(Data::ICal)
BuildRequires: perl(Date::Format)
BuildRequires: perl(DBD::mysql) >= 2.1018
BuildRequires: perl(DBI) >= 1.37
BuildRequires: perl(DBIx::SearchBuilder) >= 1.54
BuildRequires: perl(Devel::GlobalDestruction)
BuildRequires: perl(Devel::StackTrace) >= 1.19
BuildRequires: perl(Digest::base)
BuildRequires: perl(Digest::MD5) >= 2.27
BuildRequires: perl(Email::Address)
BuildRequires: perl(Encode) >= 2.13
BuildRequires: perl(Errno)
BuildRequires: perl(FCGI)
BuildRequires: perl(FCGI::ProcManager)
%{?with_devel_mode:BuildRequires: perl(File::Find)}
BuildRequires: perl(File::Glob)
BuildRequires: perl(File::ShareDir)
BuildRequires: perl(File::Spec) >= 0.8
BuildRequires: perl(File::Temp) >= 0.18
%{?with_gd:BuildRequires: perl(GD)}
%{?with_gd:BuildRequires: perl(GD::Graph)}
%{?with_gd:BuildRequires: perl(GD::Text)}
%{?with_gpg:BuildRequires: perl(GnuPG::Interface)}
%{?with_graphviz:BuildRequires: perl(GraphViz)}
BuildRequires: perl(Getopt::Long) >= 2.24
BuildRequires: perl(HTML::Entities)
%{?with_devel_mode:BuildRequires: perl(HTML::Form)}
BuildRequires: perl(HTML::FormatText)
BuildRequires: perl(HTML::Mason) >= 1.36
BuildRequires: perl(HTML::Mason::PSGIHandler)
BuildRequires: perl(HTML::Quoted)
BuildRequires: perl(HTML::RewriteAttributes) >= 0.02
BuildRequires: perl(HTML::Scrubber) >= 0.08
BuildRequires: perl(HTML::TreeBuilder)
BuildRequires: perl(HTTP::Request::Common)
BuildRequires: perl(HTTP::Server::Simple) >= 0.34
BuildRequires: perl(HTTP::Server::Simple::Mason) >= 0.09
%{?with_graphviz:BuildRequires: perl(IPC::Run)}
#{?with_devel_mode:BuildRequires: perl(IPC::Run3)}
BuildRequires: perl(IPC::Run3)
%{?with_graphviz:BuildRequires: perl(IPC::Run::SafeHandles)}
BuildRequires: perl(Locale::Maketext) >= 1.06
BuildRequires: perl(Locale::Maketext::Fuzzy)
BuildRequires: perl(Locale::Maketext::Lexicon) >= 0.32
BuildRequires: perl(Log::Dispatch) >= 2.0
%{?with_devel_mode:BuildRequires: perl(Log::Dispatch::Perl)}
BuildRequires: perl(LWP)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(Mail::Mailer) >= 1.57
BuildRequires: perl(MIME::Entity) >= 5.425
BuildRequires: perl(MIME::Types)
%{?with_devel_mode:BuildRequires: perl(Module::Refresh) >= 0.03}
BuildRequires: perl(Module::Versions::Report) >= 1.05
BuildRequires: perl(Net::CIDR)
BuildRequires: perl(Net::Server)
BuildRequires: perl(Net::Server::PreFork)
BuildRequires: perl(Net::SMTP)
%{?with_gpg:BuildRequires: perl(PerlIO::eol)}
BuildRequires: perl(Plack)
BuildRequires: perl(Plack::Handler::Starlet)
BuildRequires: perl(Pod::Usage)
BuildRequires: perl(Regexp::Common)
BuildRequires: perl(Regexp::Common::net::CIDR)
BuildRequires: perl(Regexp::IPv6)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Storable) >= 2.08
%{?with_devel_mode:BuildRequires: perl(String::ShellQuote)}
BuildRequires: perl(Term::ReadKey)
BuildRequires: perl(Term::ReadLine)
%{?with_devel_mode:BuildRequires: perl(Test::Builder) >= 0.77}
%{?with_devel_mode:BuildRequires: perl(Test::Deep)}
%{?with_devel_mode:BuildRequires: perl(Test::Expect) >= 0.31}
%{?with_devel_mode:BuildRequires: perl(Test::HTTP::Server::Simple) >= 0.09}
%{?with_devel_mode:BuildRequires: perl(Test::MockTime)}
%{?with_devel_mode:BuildRequires: perl(Test::Warn)}
%{?with_devel_mode:BuildRequires: perl(Test::WWW::Mechanize)}
BuildRequires: perl(Text::ParseWords)
BuildRequires: perl(Text::Password::Pronounceable)
BuildRequires: perl(Text::Quoted) >= 2.02
BuildRequires: perl(Text::Template)
BuildRequires: perl(Text::WikiFormat) >= 0.76
BuildRequires: perl(Text::Wrapper)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(Time::ParseDate)
BuildRequires: perl(Tree::Simple) >= 1.04
BuildRequires: perl(UNIVERSAL::require)
%{?with_devel_mode:BuildRequires: perl(WWW::Mechanize)}
BuildRequires: perl(XML::RSS) >= 1.05
%{?with_devel_mode:BuildRequires: perl(XML::Simple)}
BuildRequires: perl(Digest::SHA)
Requires(postun): coreutils
# rpm doesn't catch these:
Requires: perl(Apache::Session)
Requires: perl(Calendar::Simple)
Requires: perl(CSS::Squish)
Requires: perl(Text::Quoted)
Requires: perl(Class::Accessor)
Requires: perl(Encode)
%{?with_gd:Requires: perl(GD::Text)}
%{?with_gd:Requires: perl(GD::Graph::bars)}
%{?with_gd:Requires: perl(GD::Graph::pie)}
Requires: perl(HTML::Quoted)
Requires: perl(HTTP::Server::Simple::Mason)
Requires: perl(I18N::LangTags::List)
Requires: perl(Locale::Maketext::Fuzzy)
Requires: perl(LWP::MediaTypes)
Requires: perl(mod_perl2)
Requires: perl(Module::Versions::Report)
Requires: perl(Tree::Simple)
Requires: perl(URI) >= 1.590
# rpm fails to add these:
Provides: perl(RT::Shredder::Exceptions)
Provides: perl(RT::Shredder::Record)
Provides: perl(RT::Shredder::Transaction)
Provides: perl(RT::Tickets_Overlay_SQL)
# Split out. Technically, not actually necessary, but ... let's keep it for now.
Requires: rt-mailgate = %version
Requires: google-droid-sans-fonts
Obsoletes:  rt3
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
%global _docdir_fmt %name

%description
RT is an enterprise-grade ticketing system which enables a group of people
to intelligently and efficiently manage tasks, issues, and requests submitted
by a community of users.

%package mailgate
Summary: rt's mailgate utility
Group:   System/Servers
# rpm doesn't catch these:
Requires:	perl(Pod::Usage)
Requires:	perl(HTML::TreeBuilder)
Requires:	perl(HTML::FormatText)
Obsoletes:	rt3-mailgate

%description mailgate
%{summary}

%prep
%setup -q -n rt-%{version}

sed -e 's,@RT_CACHEDIR@,%{RT_CACHEDIR},' %{SOURCE4} \
  > README.install.urpmi
install -m 644 %{SOURCE6} .
sed -e 's,@RT_LOGDIR@,%{RT_LOGDIR},' %{SOURCE5} \
  > rt.logrotate

# Fixup the tarball shipping with broken permissions
#find . \( -name '*.pm' -o -name '*.pm.in' -o -name '*.po' -o -name '*.pod' \) \
#  -exec chmod a-x {} \;
chmod -x README C* aclocal.* config.* *.ac *.in
find etc -type f -exec chmod a-x {} \;

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

# Propagate rpms directories to config.layout
cat << \EOF >> config.layout

# Mandriva directory layout.
<Layout Mandriva>
  prefix:		%{RT_DIR}
  sysconfdir:		%{_sysconfdir}/%{name}
  plugindir:		%{_datadir}/%{name}/plugins
  libdir:		%{RT_LIBDIR}
  htmldir:		%{RT_WWWDIR}
  fontdir:		%{_datadir}/fonts
  lexdir:		${datadir}/%{name}/po
  manualdir:		%{_datadir}/doc/%{name}
  localstatedir:	%{RT_LOCALSTATEDIR}
  logfiledir:		%{RT_LOGDIR}
  masonstatedir:	%{RT_CACHEDIR}/mason_data
  sessionstatedir:	%{RT_CACHEDIR}/session_data
  customdir:		%{_prefix}/local/share/rt
  custometcdir:		%{_prefix}/local/etc/rt
  customhtmldir:	${customdir}/html
  customlexdir:		${customdir}/po
  customlibdir:		%{perl_sitelib}
  customplugindir:      ${customdir}/plugins
</Layout>
EOF

# Comment out the Makefile trying to change groups/owners
# Fix DESTDIR support
sed -i \
	-e 's,	chgrp,	: chrgp,g' \
	-e 's,	chown,	: chown,g' \
	-e 's,$(DESTDIR)/,$(DESTDIR),g' \
	-e 's,-o $(BIN_OWNER) -g $(RTGROUP),,g' \
Makefile.in

%build
# fastcgi requires FCGI::ProcManager
#    --with-web-handler=modperl2,fastcgi \
%configure \
    --with-apachectl=/usr/sbin/apachectl \
    --with-web-user=apache \
    --with-web-group=apache \
    --enable-layout=Mandriva \
    --with-web-handler=modperl2,fastcgi \
    --libdir=%{RT_LIBDIR} \
    %{?with_graphviz:--enable-graphviz}%{!?with_graphviz:--disable-graphviz} \
    %{?with_gd:--enable-gd}%{!?with_gd:--disable-gd} \
    %{?with_gpg:--enable-gpg}%{!?with_gpg:--disable-gpg} \
    %{?with_devel_mode:--enable-devel-mode}%{!?with_devel_mode:--disable-devel-mode}

%make

# Generate man-pages
pod2man bin/rt-mailgate > bin/rt-mailgate.1
#pod2man bin/mason_handler.fcgi > bin/mason_handler.fcgi.1

%install
rm -rf %{buildroot}

make install DESTDIR=%{buildroot}

# Cleanup the mess rt's configuration leaves behind
rm -f %{buildroot}%{_docdir}/README

# Win32 stuff
rm -f %{buildroot}%{RT_BINDIR}/mason_handler.svc

# We don't want CPAN
rm -f %{buildroot}%{_sbindir}/rt-test-dependencies

# An installed testsuite without infrastructure
rm -rf %{buildroot}%{RT_LIBDIR}/t

# Bogus
rm -f %{buildroot}%{RT_LIBDIR}/RT.pm.in

# Unsupported
rm -f %{buildroot}%{RT_BINDIR}/*.scgi

# Install apache configuration
mkdir -p %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/rt.conf <<EOF
# rt configuration file 

Alias /rt /usr/share/rt/html

<Location /rt>

  Require all granted

  AllowOverride All
  Options ExecCGI FollowSymLinks

  RewriteEngine On
  RedirectMatch permanent (.*)/$ \$1/index.html
  AddDefaultCharset UTF-8
  SetHandler modperl
  PerlResponseHandler Plack::Handler::Apache2
  PerlSetVar psgi_app /usr/sbin/rt-server
</Location>

<Perl>
  use Plack::Handler::Apache2;
  Plack::Handler::Apache2->preload("/usr/sbin/rt-server");
</Perl>
EOF

mkdir -p %{buildroot}%{_mandir}/man1
install -m 0644 bin/rt-mailgate.1 \
  %{buildroot}%{_mandir}/man1

# Until rt-4.0.5-2mga, rt-mailgate was in /usr/sbin
ln -s %{_bindir}/rt-mailgate %{buildroot}/%{_sbindir}

install -d -m755 %{buildroot}%{RT_LOGDIR}

# install log rotation stuff
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 rt.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/rt

install -d -m755 %{buildroot}%{RT_LOCALSTATEDIR}

install -d -m755 %{buildroot}%{_sysconfdir}/rt/upgrade
cp -R etc/upgrade/* %{buildroot}%{_sysconfdir}/rt/upgrade
rm -f %{buildroot}%{_sysconfdir}/rt/upgrade/*.in

# Fix permissions
find %{buildroot}%{RT_WWWDIR} \
  -type f -exec chmod a-x {} \;

rm -Rf %{buildroot}/%{RT_LIBDIR}/RT/Test*
rm -Rf %{buildroot}/%{_datadir}/fonts
%check
# The tests don't work:
# - Require to be run as root
# - Require an operational rt system
# - Require packages which are n/a in Fedora
%{?with_tests:make test}

%postun
if [ "$1" = "0" ]; then
  rm -rf %{RT_CACHEDIR}
fi
                    
%files
%defattr(-,root,root,-)
%doc COPYING README README.install.urpmi README.upgrade.urpmi
%{_bindir}/*
%{_sbindir}/*
%exclude %{_sbindir}/rt-mailgate
%exclude %{_bindir}/rt-mailgate
%{_mandir}/man1/*
%exclude %{_mandir}/man1/rt-mailgate*
%{RT_LIBDIR}/*
%attr(0700,apache,apache) %{RT_LOGDIR}

%dir %{_sysconfdir}/rt
%attr(-,root,root)%{_sysconfdir}/rt/upgrade
%attr(-,root,root)%{_sysconfdir}/rt/acl*
%attr(-,root,root)%{_sysconfdir}/rt/schema*
%attr(-,root,root)%{_sysconfdir}/rt/init*
%config(noreplace) %attr(0640,root,apache) %{_sysconfdir}/rt/RT_SiteConfig.pm
%config %attr(0640,root,apache) %{_sysconfdir}/rt/RT_Config.pm

%config(noreplace) %{_sysconfdir}/logrotate.d/rt

%dir %{_datadir}/rt
%{_datadir}/%{name}/po
%{RT_WWWDIR}
%config(noreplace) %{_webappconfdir}/rt.conf

%dir %{RT_CACHEDIR}
%attr(0770,apache,apache) %{RT_CACHEDIR}/mason_data
%attr(0770,apache,apache) %{RT_CACHEDIR}/session_data

%if "%{RT_LOCALSTATEDIR}" != "%{RT_CACHEDIR}"
%dir %{RT_LOCALSTATEDIR}
%endif

#{_datadir}/fonts/Droid*

%files mailgate
%defattr(-,root,root,-)
%{_bindir}/rt-mailgate
%{_sbindir}/rt-mailgate
%{_mandir}/man1/rt-mailgate*


%changelog

* Fri Feb 08 2013 nanardon <nanardon> 4.0.8-6.mga3
+ Revision: 395655
- another apache config fix

* Thu Feb 07 2013 nanardon <nanardon> 4.0.8-5.mga3
+ Revision: 395085
- fix apache redirection (protect $ against shell eval)

* Wed Feb 06 2013 nanardon <nanardon> 4.0.8-4.mga3
+ Revision: 394870
- replace Directory by Location in apache config to make rt working

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Dec 22 2012 kamil <kamil> 4.0.8-2.mga3
+ Revision: 333987
- fix broken httpd file

* Sat Dec 22 2012 kamil <kamil> 4.0.8-1.mga3
+ Revision: 333981
- version 4.0.8

  + buchan <buchan>
    - New version 4.0.7

* Sun Sep 09 2012 guillomovitch <guillomovitch> 4.0.6-5.mga3
+ Revision: 291087
- use herein document for webapp configuration file
- make webapp configuration file compatible with apache 2.4
- use proper macro for webapp configuration file location

* Tue Sep 04 2012 jquelin <jquelin> 4.0.6-4.mga3
+ Revision: 287937
- remove bogus requires

* Wed Aug 29 2012 jquelin <jquelin> 4.0.6-3.mga3
+ Revision: 285425
- remove /bin/rm from spec file

* Mon Aug 13 2012 pterjan <pterjan> 4.0.6-2.mga3
+ Revision: 281160
- file requires are evil

* Sun Jun 17 2012 buchan <buchan> 4.0.6-1.mga3
+ Revision: 261248
- BR perl(FCGI)
- New version 4.0.6
- Add readme for upgrade
- Stricter require on rt-mailgate, and ensure no rt-mailgate parts are in rt
- Stricter perl-URI BR

* Mon Apr 23 2012 buchan <buchan> 4.0.5-2.mga2
+ Revision: 233078
- Add manual require on HTML::Quoted
- Change some paths in our layout to make installation of extensions consistent
- rt-mailgate starts moving to /usr/bin as a result
- Update distro-specific information
- Make rt-setup-database --action upgrade work without other options (datadir)
- Require google-droid-sans-fonts instead of shipping the fonts again
- cleanup of old cruft
- Try and avoid bad dep on RT::Tickets_SQL
- RT_Config should not be noreplace, can break some upgrades
- Drop unnecessary apache-devel BR, use a more generic mod_perl dep, and set docdir
 explicitly, to improve compatibility with other RPM-based distros

* Wed Feb 22 2012 buchan <buchan> 4.0.5-1.mga2
+ Revision: 212304
- Drop empty %%post
- Some BRs were missed in 4.0.4
- New version 4.0.5
- Perl statements for preloading plack must be outside location tag
- New version 4.0.4
- Many new BRs
- Change WebPath from /rt3 to /rt, incl. RedirectMatch so browsers get the new path
- Update default http config to use Plack (but still mod_perl by default)
- Fix permissions on configu files, apache must be able to read them
- Dont include local directories, in order to pass rpmlints FHS policy
- Suppress empty %%post while still keeping it when necessary
- Provide a value for mdkversion on Mageia
- Drop pod2man buildrequires, it is provided by perl
- imported package rt


* Wed Dec 21 2011 Buchan Milne <bgmilne@mandriva.org> 3.8.11-1mdv2012.0
+ Revision: 744125
- update to new version 3.8.11

* Tue May 10 2011 Buchan Milne <bgmilne@mandriva.org> 3.8.10-1
+ Revision: 673249
- BR Digest::SHA
- update to new version 3.8.10
- New version 3.8.9

  + Oden Eriksson <oeriksson@mandriva.com>
    - the mass rebuild of 2010.1 packages

* Sun Feb 07 2010 Guillaume Rousse <guillomovitch@mandriva.org> 3.8.1-5mdv2010.1
+ Revision: 501711
- obsoletes rt3
- package renaming
- rename to rt
- rely on filetrigger for reloading apache configuration begining with 2010.1, rpm-helper macros otherwise

* Tue Sep 15 2009 Thierry Vignaud <tv@mandriva.org> 3.8.1-4mdv2010.0
+ Revision: 442765
- rebuild

* Thu Dec 04 2008 Oden Eriksson <oeriksson@mandriva.com> 3.8.1-3mdv2009.1
+ Revision: 310054
- whoops! fix the apache config as well..., duh!
- woops!, forgot to restart apache

* Thu Dec 04 2008 Oden Eriksson <oeriksson@mandriva.com> 3.8.1-1mdv2009.1
+ Revision: 310048
- rpmlint fixes
- fix deps (apache-devel)
- import rt3


* Fri Feb 09 2007 Michael Scherer <misc@mandriva.org> 3.6.3-1mdv2007.0
+ Revision: 118341
- update to 3.6.3
- Import rt

* Fri Jul 21 2006 Michael Scherer <misc@mandriva.org> 3.4.5-1mdv2007.0
- New version 3.4.5

* Fri Jan 06 2006 Michael Scherer <misc@mandriva.org> 3.4.4-2mdk
- remove the ifModule line from apache config file, as reported by Anne Nicolas
- complete the Readme.Mandriva file
- remove dependencie that are now detected by the script
- correct rpmlint error

* Sat Oct 15 2005 Michael Scherer <misc@mandriva.org> 3.4.4-1mdk
- first package, based on fedora package from Ralf Corsépius <rc040203@freenet.de> 
- Birthday build for rgs \o/