]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum.spec
- eventum 1.6.0-RC2
[packages/eventum.git] / eventum.spec
index 00d7eaf2d12ec338e0334df5e9ef460a141e6083..883d0998cdbc329bea24a43918f12c8887d80a88 100644 (file)
@@ -8,34 +8,37 @@
 #  - 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
+%bcond_with    qmail   # build the router-qmail subpackage
 
 # 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    0.1
-
 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
@@ -59,16 +62,17 @@ 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}-auth-repliers.patch
-Patch8:                %{name}-bot-reconnect.patch
+Patch7:                %{name}-bot-reconnect.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
 Requires:      php-imap
 Requires:      php-mysql
 Requires:      php-pcre
+Requires:      php-session
 Requires:      %{name}-base = %{epoch}:%{version}-%{release}
 Requires:      Smarty >= 2.6.2
 %if %{with pear}
@@ -96,13 +100,10 @@ BuildArch: noarch
 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
@@ -354,7 +355,7 @@ Group:              Applications/WWW
 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
@@ -434,6 +435,9 @@ Szczeg
 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
@@ -445,7 +449,7 @@ $,,'
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
+%patch22 -p1
 
 # replace in remaining scripts config.inc.php to system one
 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
@@ -458,7 +462,7 @@ 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
@@ -466,6 +470,7 @@ install -d \
        $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
@@ -534,6 +539,7 @@ cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,tex
        $RPM_BUILD_ROOT%{_smartyplugindir}
 
 # qmail router
+%if %{with qmail}
 d=$RPM_BUILD_ROOT/var/lib/%{name}
 echo 'root' > $d/.qmail
 echo 'root' > $d/.qmail-default
@@ -541,6 +547,7 @@ echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -549,21 +556,6 @@ rm -rf $RPM_BUILD_ROOT
 %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
@@ -624,28 +616,13 @@ rm -f /var/cache/eventum/*.php
 
 %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
@@ -689,6 +666,18 @@ 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.
@@ -709,6 +698,17 @@ EOF
 database_changes.php Perform database changes
 EOF
 
+%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
@@ -754,7 +754,6 @@ EOF
 %{_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}
@@ -766,6 +765,8 @@ EOF
 %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)
This page took 0.041651 seconds and 4 git commands to generate.