# - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
# - A few other small javascript libraries
# - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
-# - php4-pgsql crashes php (at least 4.3.11-1)
%bcond_with pear # build with system PEAR packages (or use bundled ones)
%bcond_with qmail # build the router-qmail subpackage
-%define uid 146
-%define gid 146
-
# snapshot: DATE
#define _snap 20050227
+# release candidate
+%define _rc RC2
+
+%define _rel 6
+
%if 0%{?_snap}
+%if 0%{?_rc}
+%define _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
+%else
%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
-%define _rel 1.8
-
Summary: Eventum Issue / Bug tracking system
Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
Name: eventum
-Version: 1.5.4
-Release: %{?_snap:0.%{_snap}.}%{_rel}
+Version: 1.6.0
+Release: %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
License: GPL
Group: Applications/WWW
Source0: %{_source}
-# Source0-md5: 0de0b1cfe4b92179cb7a52a819871856
+# Source0-md5: a13d95ff52264d7460c688419794ffcc
%{?_snap:NoSource: 0}
Source1: %{name}-apache.conf
Source2: %{name}-mail-queue.cron
Patch5: %{name}-lf.patch
Patch6: http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
Patch7: %{name}-bot-reconnect.patch
-Patch8: %{name}-bug-10464.patch
-Patch9: %{name}-bug-10263.patch
-Patch10: %{name}-ft-enable.patch
+Patch22: eventum-cli-wr-separated.patch
URL: http://dev.mysql.com/downloads/other/eventum/
-BuildRequires: rpmbuild(macros) >= 1.200
+BuildRequires: rpmbuild(macros) >= 1.223
BuildRequires: sed >= 4.0
Requires: php >= 4.2.0
Requires: php-gd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/%{name}
-%define _libdir %{_prefix}/%{_lib}/%{name}
+%define _libdir %{_prefix}/lib/%{name}
%define _appdir %{_datadir}/%{name}
%define _smartyplugindir %{php_pear_dir}/Smarty/plugins
-%define _apache1dir /etc/apache
-%define _apache2dir /etc/httpd
-
%description
Eventum is a user-friendly and flexible issue tracking system that can
be used by a support department to track incoming technical support
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: php >= 4.1.0
Requires: php-sockets
-Requires: rc-scripts >= 0.4.0.18
+PreReq: rc-scripts >= 0.4.0.18
%description irc
The IRC notification bot is a nice feature for remote teams that want
find . -type f -print0 | xargs -0 sed -i -e 's,
$,,'
+rm -f setup.conf.php
+rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
+
# packaging
%patch0 -p1 -b .paths
%patch1 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
+%patch22 -p1
# replace in remaining scripts config.inc.php to system one
grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
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"),
'
-find -name '*~' | xargs -r rm -v
+find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
%install
rm -rf $RPM_BUILD_ROOT
$RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
$RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
$RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
+ $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
$RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
%addusertogroup http %{name}
%post
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
- ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
-fi
-# apache2
-if [ -d %{_apache2dir}/httpd.conf ]; then
- ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
-fi
-
# check if the package is configured.
if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
if [ -f %{_appdir}/htdocs/setup/index.php ]; then
%preun
if [ "$1" = "0" ]; then
- # apache1
- if [ -f %{_apache1dir}/apache.conf ]; then
- rm -f %{_apache1dir}/conf.d/99_%{name}.conf
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
- fi
- # apache2
- if [ -d %{_apache2dir}/httpd.conf ]; then
- rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
- fi
-
# nuke cache
rm -f /var/cache/eventum/*.php 2>/dev/null || :
fi
%pre base
-%groupadd -P %{name}-base -g %{gid} %{name}
-%useradd -P %{name}-base -u %{uid} -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
+%groupadd -P %{name}-base -g 146 %{name}
+%useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
%postun base
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
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
# FIXME
# only one upgrade trigger is called if you're upgrading over two
# versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
database_changes.php Perform database changes
EOF
-%triggerpostun -- eventum < 1.5.4-1.5
+%triggerpostun -- eventum < 1.5.4-1.12
%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
database_changes.php Perform database changes
EOF
+%triggerpostun -- eventum < 1.6.0-RC2.6
+%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
+database_changes.php Perform database changes
+upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
+EOF
+
%files
%defattr(644,root,root,755)
%doc ChangeLog FAQ INSTALL README UPGRADE
%{_appdir}/include/class.mime_helper.php
%{_appdir}/include/class.misc.php
%{_appdir}/include/db_access.php
-%{_appdir}/include/jsrsServer.inc.php
%dir %attr(730,root,eventum) /var/run/%{name}
%dir %attr(730,root,eventum) /var/cache/%{name}
%dir %{_appdir}
# qmail will ignore user, if it's home directory is not owned
%attr(750,eventum,eventum) %dir /var/lib/%{name}
+# for saved routed emails
+%attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
%files setup
%defattr(644,root,root,755)