]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum.spec
- webapps paths
[packages/eventum.git] / eventum.spec
index e95d5e7cfd0c99f5f260c24d1f7301833fe4cda8..ad1749dd10dd6dbbbbdb3541484e3795d39e3be3 100644 (file)
 %bcond_with    qmail   # build the router-qmail subpackage
 
 # snapshot: DATE
-#define        _snap 20050227
+%define        _snap 20051209
 
 # release candidate
-#define _rc            RC2
+#define _rc            RC1
 
-%define        _rel    2
+%define        _rel    4.28
 
-%if 0%{?_snap}
-%if 0%{?_rc}
+%if 0%{?_rc:1}
 %define        _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
 %else
+%if 0%{?_snap}
 %define        _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
-%endif
 %else
 %define        _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
 %endif
+%endif
 
 Summary:       Eventum Issue / Bug tracking system
 Summary(pl):   Eventum - system ¶ledzenia spraw/b³êdów
 Name:          eventum
-Version:       1.6.0
+Version:       1.7.0
 Release:       %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
 License:       GPL
 Group:         Applications/WWW
 Source0:       %{_source}
-# Source0-md5: a13d95ff52264d7460c688419794ffcc
-%{?_snap:NoSource:     0}
+# Source0-md5: 439586216294bfb6f949b5fd057b0fe0
 Source1:       %{name}-apache.conf
 Source2:       %{name}-mail-queue.cron
 Source3:       %{name}-mail-download.cron
@@ -63,13 +62,14 @@ Patch4:             http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
 Patch5:                %{name}-lf.patch
 Patch6:                http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
 Patch7:                %{name}-bot-reconnect.patch
-Patch8:                http://glen.alkohol.ee/pld/eventum-priv-index.patch
-Patch9:                http://glen.alkohol.ee/pld/eventum-httpclient-clientside.patch
-Patch22:       eventum-cli-wr-separated.patch
+Patch9:                http://glen.alkohol.ee/pld/%{name}-httpclient-clientside.patch
+Patch10:       %{name}-cli-wr-separated.patch
+Patch11:       %{name}-php440.patch
+Patch12:       %{name}-htmloptions-truncate.patch
 URL:           http://dev.mysql.com/downloads/other/eventum/
 BuildRequires: rpmbuild(macros) >= 1.223
 BuildRequires: sed >= 4.0
-Requires:      php >= 4.2.0
+Requires:      php >= 3:4.2.0
 Requires:      php-gd
 Requires:      php-imap
 Requires:      php-mysql
@@ -87,7 +87,6 @@ Requires:     php-pear-Math_Stats
 Requires:      php-pear-Net_DIME
 Requires:      php-pear-Net_POP3
 Requires:      php-pear-Net_SMTP
-Requires:      php-pear-Net_SmartIRC
 Requires:      php-pear-Net_Socket
 Requires:      php-pear-Net_URL
 Requires:      php-pear-Net_UserAgent_Detect
@@ -95,16 +94,20 @@ Requires:   php-pear-PEAR
 Requires:      php-pear-Text_Diff
 Requires:      php-pear-XML_RPC
 %endif
-Requires:      apache >= 1.3.33-2
+Requires:      webapps
+Requires:      webserver = apache
 Requires:      apache(mod_dir)
 Requires(triggerpostun):       sed >= 4.0
+Conflicts:     apache1 < 1.3.33-2
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/%{name}
 %define                _libdir         %{_prefix}/lib/%{name}
 %define                _appdir %{_datadir}/%{name}
-%define                _smartyplugindir        %{php_pear_dir}/Smarty/plugins
+%define                _smartyplugindir        %{_appdir}/include/smarty
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
 
 %description
 Eventum is a user-friendly and flexible issue tracking system that can
@@ -144,7 +147,7 @@ Ten pakiet zawiera podstawow
 Summary:       Eventum setup package
 Summary(pl):   Pakiet do wstêpnej konfiguracji Eventum
 Group:         Applications/WWW
-PreReq:                %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description setup
 Install this package to configure initial Eventum installation. You
@@ -162,7 +165,6 @@ Summary(pl):        Przetwarzanie kolejki poczty Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      crondaemon
-Requires:      php >= 4.1.0
 
 %description mail-queue
 Beginning with the first release of Eventum, emails are not directly
@@ -188,7 +190,6 @@ Summary(pl):        
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      crondaemon
-Requires:      php >= 4.1.0
 
 %description mail-download
 In order for Eventum's email integration feature to work, you need to
@@ -208,7 +209,6 @@ Summary:    Eventum Reminder System
 Summary(pl):   System przypominania dla Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
 Requires:      crondaemon
 
 %description reminder
@@ -234,7 +234,6 @@ Summary:    Eventum Heartbeat Monitor
 Summary(pl):   Monitor ¿ycia dla Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
 Requires:      php-posix
 Requires:      crondaemon
 
@@ -269,7 +268,6 @@ Summary:    Eventum Email Routing
 Summary(pl):   Przekazywanie poczty dla Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
 Requires:      eventum(router)
 
 %description route-emails
@@ -295,7 +293,6 @@ Summary:    Eventum Note Routing
 Summary(pl):   Przekazywanie notatek dla Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
 Requires:      eventum(router)
 
 %description route-notes
@@ -320,7 +317,9 @@ spraw
 Summary:       Eventum Mail Routing - qmail
 Summary(pl):   Przekazywanie poczty Eventum - qmail
 Group:         Applications/Mail
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+# loose dep is intentional. qmail subpackage isn't built on PLD
+# builders and there really nothing changes.
+Requires:      %{name} >= %{epoch}:%{version}-%{release}
 Requires:      qmail >= 1.03
 Provides:      eventum(router)
 Obsoletes:     eventum(router)
@@ -354,10 +353,11 @@ przez Postfiksa.
 Summary:       Eventum IRC Notification Bot
 Summary(pl):   IRC-owy bot powiadamiaj±cy dla Eventum
 Group:         Applications/WWW
+Requires(triggerpostun):       sed >= 4.0
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
 Requires:      php-sockets
-PreReq:                rc-scripts >= 0.4.0.18
+#Requires:     php-pear-Net_SmartIRC
+Requires:      rc-scripts >= 0.4.0.18
 
 %description irc
 The IRC notification bot is a nice feature for remote teams that want
@@ -388,7 +388,7 @@ Summary:    Eventum command-line interface
 Summary(pl):   Interfejs linii poleceñ dla Eventum
 Group:         Applications/WWW
 Requires:      %{name}-base = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
+Requires:      php-common >= 3:4.1.0
 Requires:      php-cli
 Requires:      php-curl
 Requires:      php-xml
@@ -407,7 +407,8 @@ Summary:    Eventum SCM integration
 Summary(pl):   Integracja SCM dla Eventum
 Group:         Applications/WWW
 Requires:      %{name}-base = %{epoch}:%{version}-%{release}
-Requires:      php-cli >= 4.1.0
+Requires:      php-common >= 3:4.1.0
+Requires:      php-cli
 Requires:      php-pcre
 
 %description scm
@@ -434,16 +435,19 @@ Szczeg
 %prep
 %setup -q %{?_snap:-n %{name}-%{_snap}}
 # undos the source
-find . -type f -print0 | xargs -0 sed -i -e 's,
-$,,'
+find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
 
 rm -f setup.conf.php
 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
+rm -rf misc/upgrade/flush_compiled_templates.php
+
+# using system package
+#rm -rf include/pear/Net/SmartIRC*
 
 # packaging
 %patch0 -p1 -b .paths
 %patch1 -p1
-%patch2 -p1
+%patch2 -p1 -b .irc-config
 %{?with_pear:%patch3 -p1 -b .PEAR}
 
 # bug fixes.
@@ -451,17 +455,15 @@ rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
 %patch9 -p1
-%patch22 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
 
 # replace in remaining scripts config.inc.php to system one
 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
        s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
 '
-sed -i -e '
-       s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
-' misc/download_emails.php
 
 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
        s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
@@ -512,6 +514,7 @@ s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
@@ -539,7 +542,9 @@ rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
 # These plugins are not in Smarty package (Smarty-2.6.2-3)
-cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
+cp -a \
+       include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
+       include/Smarty/plugins/modifier.highlight_quoted.php \
        $RPM_BUILD_ROOT%{_smartyplugindir}
 
 # qmail router
@@ -670,17 +675,25 @@ if [ "$1" = "0" ]; then
        chown root:eventum %{_sysconfdir}/{config,private_key}.php
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
+%post irc
+/sbin/chkconfig --add eventum-irc
+if [ -f /var/lock/subsys/eventum-irc ]; then
+       /etc/rc.d/init.d/eventum-irc restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/eventum-irc start\" to start Eventum IRC Bot." >&2
+fi
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
+%webapp_register httpd %{_webapp}
 
 %triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%webapp_unregister httpd %{_webapp}
 
 # FIXME
 # only one upgrade trigger is called if you're upgrading over two
@@ -713,11 +726,81 @@ database_changes.php Perform database changes
 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
 EOF
 
+%triggerpostun -- eventum < 1.6.1-0.2
+%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
+database_changes.php Perform database changes
+EOF
+
+%triggerpostun irc -- eventum-irc < 1.6.1-3.14
+sed -i -e '
+s,\$irc_host,$irc_server_hostname,
+s,\$irc_port,$irc_server_port,
+s,\$irc_nick,$nickname,
+s,\$irc_realname,$realname,
+s,\$irc_username,$username,
+s,\$irc_password,$password,
+' /etc/eventum/irc.php
+
+%triggerpostun -- eventum < 1.7.0-0.20051130.4.25
+# migrate from apache-config macros
+if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
+       if [ -d /etc/apache/webapps.d ]; then
+               cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
+       fi
+
+       if [ -d /etc/httpd/webapps.d ]; then
+               cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
+       fi
+fi
+
+if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
+       /usr/sbin/webapp register apache %{_webapp}
+       rm -f /etc/apache/conf.d/99_%{_webapp}.conf
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache reload 1>&2
+       fi
+fi
+if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
+       /usr/sbin/webapp register httpd %{_webapp}
+       rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd reload 1>&2
+       fi
+fi
+
+%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
+database_changes.php Perform database changes
+set_root_message_ids.php Set iss_root_message_id
+EOF
+
+# regular configs
+for i in apache.conf config.php private_key.php setup.php; do
+       if [ -f /etc/eventum/$i.rpmsave ]; then
+               mv -f %{_sysconfdir}/$i{,.rpmnew}
+               mv -f /etc/eventum/$i.rpmsave %{_sysconfdir}/$i
+       fi
+done
+
+%triggerpostun cli -- %{name}-cli < 1.6.1-4.16
+if [ -f /etc/eventum/cli.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/cli.php{,.rpmnew}
+       mv -f /etc/eventum/cli.php.rpmsave %{_sysconfdir}/cli.php
+fi
+
+%triggerpostun irc -- %{name}-irc < 1.6.1-4.17
+if [ -f /etc/eventum/irc.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/irc.php{,.rpmnew}
+       mv -f /etc/eventum/irc.php.rpmsave %{_sysconfdir}/irc.php
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog FAQ INSTALL README UPGRADE
 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
@@ -743,7 +826,7 @@ EOF
 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
 %{_appdir}/upgrade/[!u]*
 
-%{_smartyplugindir}/*
+%{_smartyplugindir}
 %if %{without pear}
 %{_appdir}/include/pear
 %endif
This page took 0.036869 seconds and 4 git commands to generate.