# - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
#
# Conditional build:
-%bcond_without pear # build with system PEAR packages (or use bundled ones)
%bcond_with qmail # build the router-qmail subpackage
-#
-# snapshot: DATE
-%define _snap 20060216
-
-# release candidate
-#define _rc 2
+%bcond_with order_patch # with custom issue order patch
-%define _rel 0.1
+#define _snap 20060330
+#define _rc RC3
+%define _rel 2.21
-
-%{?with_pear:%include /usr/lib/rpm/macros.php}
+%include /usr/lib/rpm/macros.php
Summary: Eventum Issue / Bug tracking system
Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
Name: eventum
-Version: 1.7.0
-Release: %{?_snap:4.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
+Version: 1.7.1
+Release: %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
License: GPL
Group: Applications/WWW
-#Source0: http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
-Source0: http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
-# Source0-md5: 608b47b9996cc7b0c9858d8710b9a6db
+#Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
+Source0: http://mysql.dataphone.se/Downloads/eventum/%{name}-%{version}.tar.gz
+# Source0-md5: e1845de39b4d9bd30ddec9c26031a7d5
Source1: %{name}-apache.conf
Source2: %{name}-mail-queue.cron
Source3: %{name}-mail-download.cron
Source12: %{name}-config-setup.php
Source13: %{name}-upgrade.sh
Source14: %{name}-router-postfix.sh
-Patch0: %{name}-paths.patch
-Patch1: %{name}-cvs-config.patch
-Patch2: %{name}-irc-config.patch
-Patch3: %{name}-PEAR.patch
-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: %{name}-perms.patch
-Patch9: http://glen.alkohol.ee/pld/%{name}-httpclient-clientside.patch
-Patch10: %{name}-cli-wr-separated.patch
-Patch12: %{name}-htmloptions-truncate.patch
-Patch13: http://glen.alkohol.ee/pld/%{name}-link_filter-updates.patch
-Patch14: http://glen.alkohol.ee/pld/%{name}-irc-mem.patch
-Patch16: http://glen.alkohol.ee/pld/eventum-recent_activity-usability.patch
-Patch17: http://glen.alkohol.ee/pld/eventum-upload-error-keep-popup.patch
-Patch18: http://glen.alkohol.ee/pld/eventum-scm-parse-response.patch
-Patch19: eventum-double-decode.patch
-Patch20: http://glen.alkohol.ee/pld/eventum-keep-submitbutton.patch
-Patch21: http://glen.alkohol.ee/pld/eventum-tt-unhide.patch
-Patch22: %{name}-route-mem.patch
+Patch0: %{name}-lf.patch
+Patch1: %{name}-perms.patch
+Patch2: %{name}-cli-wr-separated.patch
+Patch3: %{name}-scm-parse-response.patch
+Patch4: %{name}-double-decode.patch
+Patch5: %{name}-route-mem.patch
+Patch6: %{name}-scm-pluscharisbad.patch
+Patch7: %{name}-scm-updates.patch
+Patch8: %{name}-close-signature.patch
+Patch9: %{name}-list-sorting.patch
+Patch10: %{name}-workflow-handlenewnote-note_id.patch
+Patch11: %{name}-order4b.patch
+Patch12: %{name}-cli-errorcheck.patch
+Patch13: %{name}-combined.patch
+Patch14: %{name}-xml-inline.patch
+Patch15: %{name}-timetracking-advanced-logic.patch
+Patch16: %{name}-timedisplay.patch
+Patch17: %{name}-bug-17267.patch
+# packaging patches that probably never go upstream
+Patch100: %{name}-paths.patch
+Patch101: %{name}-cvs-config.patch
+Patch102: %{name}-irc-mem.patch
+Patch103: %{name}-irc-config.patch
+Patch104: %{name}-PEAR.patch
+Patch105: %{name}-httpclient-clientside.patch
+Patch106: %{name}-bot-reconnect.patch
+Patch107: %{name}-private-key.patch
URL: http://dev.mysql.com/downloads/other/eventum/
-%{?with_pear:BuildRequires: rpm-php-pearprov >= 4.0.2-98}
+BuildRequires: rpm-php-pearprov >= 4.0.2-98
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
+Requires(triggerpostun): /usr/bin/php
+Requires(triggerpostun): sed >= 4.0
Requires: %{name}-base = %{version}-%{release}
Requires: Smarty >= 2.6.10-4
+Requires: apache(mod_dir)
Requires: php >= 3:4.2.0
Requires: php-gd
Requires: php-imap
Requires: php-mysql
Requires: php-pcre
-Requires: php-session
-%if %{with pear}
Requires: php-pear-Benchmark
Requires: php-pear-DB
Requires: php-pear-Date
Requires: php-pear-HTTP_Request
Requires: php-pear-Mail
+Requires: php-pear-Mail_Mime
Requires: php-pear-Math_Stats
Requires: php-pear-Net_DIME
Requires: php-pear-Net_SMTP
Requires: php-pear-PEAR-core
Requires: php-pear-Text_Diff
Requires: php-pear-XML_RPC
-%endif
-Requires(triggerpostun): /usr/bin/php
-Requires(triggerpostun): sed >= 4.0
-Requires: apache(mod_dir)
+Requires: php-session
Requires: webapps
-Requires: webserver = apache
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl): Przetwarzanie kolejki poczty Eventum
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
-Requires: /usr/bin/php
Requires: crondaemon
%description mail-queue
Summary(pl): ¦ci±ganie poczty Eventum
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
-Requires: /usr/bin/php
Requires: crondaemon
%description mail-download
Summary(pl): System przypominania dla Eventum
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
-Requires: /usr/bin/php
Requires: crondaemon
%description reminder
Summary(pl): Monitor ¿ycia dla Eventum
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
-Requires: /usr/bin/php
Requires: crondaemon
Requires: php-posix
Summary: Eventum IRC Notification Bot
Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
Group: Applications/WWW
+Requires(post,preun): /sbin/chkconfig
Requires(triggerpostun): sed >= 4.0
Requires: %{name} = %{version}-%{release}
-Requires: /usr/bin/php
Requires: php-pear-Net_SmartIRC
Requires: php-sockets
Requires: rc-scripts >= 0.4.0.18
Requires: %{name}-base = %{version}-%{release}
Requires: php-cli
Requires: php-common >= 3:4.1.0
-Requires: php-curl
Requires: php-pear-XML_RPC
-Requires: php-xml
%description cli
The Eventum command-line interface allows you to access most of the
rm -f setup.conf.php # not to be installed by *.php glob
rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD Linux
rm -f misc/upgrade/flush_compiled_templates.php
-rm -rf misc/upgrade/*/upgrade_config.php # not needed nor supported in PLD Linux
+rm -rf misc/upgrade/*/upgrade_config.php # not needed in PLD Linux
# sample, not used in eventum
rm -f rpc/xmlrpc_client.php
-# packaging
+# bug fixes.
%patch0 -p1
%patch1 -p1
-%patch14 -p1
%patch2 -p1
-%{?with_pear:%patch3 -p1}
-
-# bug fixes.
+%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%{?with_order_patch:%patch11 -p1}
%patch12 -p1
%patch13 -p1
+%patch14 -p1
+%patch15 -p1
%patch16 -p1
%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
+
+# packaging
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
mv misc/cli/eventumrc_example eventumrc
-sed -i -e '1i#!%{_bindir}/php' misc/route_*.php
-
-sed -e '
-s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
-' < include/private_key.php > private_key.php.in
-rm -f include/private_key.php
+sed -i -e '1i#!%{_bindir}/php' misc/*.php
+chmod +x misc/*.php
+mv include/private_key.php private_key.php.in
# replace in remaining scripts config.inc.php to system one
grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
cp -a templates $RPM_BUILD_ROOT%{_appdir}
-cp -a include/{customer,custom_field,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
+cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
sed -e '
-s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},
-s,%%{PHP_PEAR_DIR}%%,%{?with_pear:%{php_pear_dir}}%{!?with_pear:%{_appdir}/includes/pear},
+s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}}%{?_rc:-%{_rc}},
+s,%%{PHP_PEAR_DIR}%%,%{php_pear_dir},
s,%%{APP_PATH}%%,%{_appdir},
s,%%{SMARTY_DIR}%%,%{_smartydir},
s,%%{SYSCONFDIR}%%,%{_webappdir},
> $RPM_BUILD_ROOT%{_webappdir}/setup.php
mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
-%if %{with pear}
-# provided by PEAR
-rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
-%endif
-
-# use system Smarty
-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 \
%triggerun -- apache1
%webapp_unregister apache %{_webapp}
-%triggerin -- apache >= 2.0.0
+%triggerin -- apache < 2.2.0, apache-base
%webapp_register httpd %{_webapp}
-%triggerun -- apache >= 2.0.0
+%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
# FIXME
%{_appdir}/htdocs/reports
%{_appdir}/htdocs/rpc
%{_appdir}/htdocs/misc
-
%{_appdir}/templates
%dir %{_appdir}/upgrade
%attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
%{_appdir}/upgrade/[!u]*
-
%{_smartyplugindir}
-%if %{without pear}
-%{_appdir}/include/pear
-%endif
%dir %{_appdir}/include
%{_appdir}/include/customer
%files mail-queue
%defattr(644,root,root,755)
-%{_appdir}/process_mail_queue.php
+%attr(755,root,root) %{_appdir}/process_mail_queue.php
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
%files mail-download
%defattr(644,root,root,755)
-%{_appdir}/download_emails.php
+%attr(755,root,root) %{_appdir}/download_emails.php
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
%files reminder
%defattr(644,root,root,755)
-%{_appdir}/check_reminders.php
+%attr(755,root,root) %{_appdir}/check_reminders.php
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
%files monitor
%defattr(644,root,root,755)
%{_appdir}/include/class.monitor.php
-%{_appdir}/monitor.php
+%attr(755,root,root) %{_appdir}/monitor.php
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
%files route-drafts