]> git.pld-linux.org Git - packages/rt.git/blobdiff - rt.spec
- set --with-apachectl so it won't try to guess
[packages/rt.git] / rt.spec
diff --git a/rt.spec b/rt.spec
index 9fc35015dcc078892acf3f776d3b77dbb6103aa9..474cfccc1a8937df4be6e4f1656ecac526f3bf27 100644 (file)
--- a/rt.spec
+++ b/rt.spec
@@ -1,7 +1,6 @@
 # TODO:
 # - check file permissions
 # - check files in /usr/share/rt3/
-# - check BuildRequires
 # - check Requires (meta-packages for configurations with mod_perl/fcgi,
 #   apache[12]/standalone server...?)
 # - separate standalone server
 %define        perl_storable_ver                       2.08
 %define        perl_text_quoted_ver                    2.02
 %define        perl_text_wikiformat_ver                0.76
-%define        perl_tree_simple_ver                    1.04
+%define        perl_tree_simple_ver                    1.18
+%define        perl_text_template_ver                  1.45
 %define        perl_xml_rss_ver                        1.05
 #
 %include       /usr/lib/rpm/macros.perl
 Summary:       Request Tracker
 Summary(pl.UTF-8):     Request Tracker - system do śledzenia zleceń
 Name:          rt
-Version:       3.8.1
-Release:       4
+Version:       3.8.6
+Release:       1
 License:       GPL v2
 Group:         Applications
 Source0:       http://download.bestpractical.com/pub/rt/release/%{name}-%{version}.tar.gz
-# Source0-md5: 72b4419816e43bde6b50ba68374882e3
+# Source0-md5: 522f93e39c6978ba9f49efa00eb5621e
 Source1:       %{name}-apache_dir.conf
 Source2:       %{name}-apache_vhost.conf
+Source3:       %{name}-apache.conf
 Patch0:                %{name}-layout.patch
 Patch1:                %{name}-config.patch
 URL:           http://www.bestpractical.com/rt/
@@ -100,7 +101,7 @@ BuildRequires:      perl-Term-ReadKey
 BuildRequires: perl-Test-Inline
 BuildRequires: perl-Text-Autoformat
 BuildRequires: perl-Text-Quoted >= %{perl_text_quoted_ver}
-BuildRequires: perl-Text-Template
+BuildRequires: perl-Text-Template >= %{perl_text_template_ver}
 BuildRequires: perl-Text-WikiFormat >= %{perl_text_wikiformat_ver}
 BuildRequires: perl-Text-Wrapper
 BuildRequires: perl-Tie-IxHash
@@ -113,41 +114,54 @@ BuildRequires:    perl-WWW-Mechanize
 BuildRequires: perl-XML-RSS >= %{perl_xml_rss_ver}
 BuildRequires: perl-base >= 5.8.0
 BuildRequires: perl-libnet
+BuildRequires: rpm-perlprov
+Requires:      apache-base >= 2.2.0
+Requires:      apache-mod_authz_host >= 2.2.0
+Requires:      apache-mod_perl >= 2.0
+Requires:      perl-Apache-DBI
 Requires:      perl-Apache-Session >= %{perl_apache_session_ver}
 Requires:      perl-CGI >= %{perl_cgi_ver}
 Requires:      perl-CSS-Squish >= %{perl_css_squish_ver}
-Requires:      perl-CSS-Squish >= 0.06
 Requires:      perl-Calendar-Simple
 Requires:      perl-Class-ReturnValue >= %{perl_class_returnvalue_ver}
 Requires:      perl-DBD-mysql >= %{perl_dbd_mysql}
 Requires:      perl-DBI >= %{perl_dbi_ver}
 Requires:      perl-DBIx-SearchBuilder >= %{perl_dbix_searchbuilder_ver}
+Requires:      perl-Data-ICal
 Requires:      perl-Devel-StackTrace >= %{perl_devel_stacktrace_ver}
 Requires:      perl-Digest-MD5 >= %{perl_digest_md5_ver}
+Requires:      perl-Encode >= 2.38
 Requires:      perl-File-Spec >= %{perl_file_spec_ver}
+Requires:      perl-GD-Graph
 Requires:      perl-HTML-Mason >= %{perl_html_mason_ver}
 Requires:      perl-HTML-RewriteAttributes >= %{perl_html_rewriteattributes_ver}
 Requires:      perl-HTML-Scrubber >= %{perl_html_scrubber_ver}
 Requires:      perl-HTTP-Server-Simple >= %{perl_http_server_simple_ver}
 Requires:      perl-HTTP-Server-Simple-Mason >= %{perl_http_server_simple_mason_ver}
 Requires:      perl-Locale-Maketext >= %{perl_locale_maketext_ver}
+Requires:      perl-Locale-Maketext-Fuzzy
 Requires:      perl-Locale-Maketext-Lexicon >= %{perl_locale_maketext_lexicon_ver}
 Requires:      perl-Log-Dispatch >= %{perl_log_dispatch_ver}
 Requires:      perl-MIME-tools >= %{perl_mime_tools_ver}
 Requires:      perl-MailTools >= %{perl_mailtools_ver}
 Requires:      perl-Module-Versions-Report >= %{perl_module_versions_report_ver}
+Requires:      perl-PerlIO-eol
 Requires:      perl-Storable >= %{perl_storable_ver}
 Requires:      perl-Text-Quoted >= %{perl_text_quoted_ver}
 Requires:      perl-Text-WikiFormat >= %{perl_text_wikiformat_ver}
 Requires:      perl-Tree-Simple >= %{perl_tree_simple_ver}
 Requires:      perl-XML-RSS >= %{perl_xml_rss_ver}
+Requires:      webapps
 Suggests:      perl-FCGI
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _noautoreq      'perl().*' 'perl(RT.*)' 'perl(Encode::compat)' 'perl(CGI::Fast)' 'perl(Exception::Class::Base)'
 # workarounds for bug in perl.req ("perl()") and ,,famous'' rpm's feature (RT::*)
-%define                _noautoreq      'perl().*' 'perl(RT.*)' 'perl(Encode::compat)' 'perl(CGI::Fast)
 
+%define         _webapps        /etc/webapps
+%define         _webapp         %{name}
+%define         _webappsdir     %{_webapps}/%{_webapp}
 %define                _sysconfdir     /etc/rt3
 %define                _libdir         %{perl_vendorlib}
 %define                htmldir         %{_datadir}/rt3/html
@@ -195,12 +209,14 @@ sed -i -e 's#libdir:.*#libdir:    %{_libdir}#g' config.layout
 %build
 %{__aclocal} -I m4
 %{__autoconf}
+USER=$(id -un) \
 %configure \
        --enable-layout=PLDFHS \
        htmldir=%{htmldir} \
        exp_htmldir=%{htmldir} \
        masonstatedir=%{masonstatedir} \
        masonsessiondir=%{masonstatedir} \
+       --with-apachectl=%{_sbindir}/apachectl \
        --with-speedycgi=%{_bindir}/speedycgi \
        --with-my-user-group \
        --with-db-type=mysql
@@ -209,18 +225,32 @@ sed -i -e 's#libdir:.*#libdir:    %{_libdir}#g' config.layout
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir} \
+install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_libdir}} \
        $RPM_BUILD_ROOT%{masonstatedir} \
-       $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+       $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
+       $RPM_BUILD_ROOT%{_webappsdir}
 
-%{__make} install \
+# this is make install minus fixperms
+%{__make} config-install dirs files-install instruct \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_webappsdir}/httpd.conf
+
+ln -s %{_sbindir}/rt-clean-sessions $RPM_BUILD_ROOT/etc/cron.daily/rt-clean-sessions
+
+# unneeded in installed copy
+rm -f $RPM_BUILD_ROOT%{_sbindir}/rt-test-dependencies
 
 # *.in, tests
 find $RPM_BUILD_ROOT -type f -name \*.in -exec rm '{}' \;
 
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -229,6 +259,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc README* UPGRADING docs
 %dir %{_sysconfdir}
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
+%dir %attr(750,root,http) %{_webappsdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappsdir}/httpd.conf
+%attr(755,root,root) /etc/cron.daily/rt-clean-sessions
 %attr(755,root,root) %{_bindir}/mason_handler.*
 %attr(755,root,root) %{_bindir}/rt-*
 %attr(755,root,root) %{_bindir}/standalone_httpd
This page took 0.039985 seconds and 4 git commands to generate.