]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum.spec
adapter
[packages/eventum.git] / eventum.spec
index 59196d44bcd9ce7caa70467efb75b77793404717..5db69004b50e4628fe7d71c7fed40dbadb8615dd 100644 (file)
 %bcond_without order   # with experimental order patch
 
 %define                php_min_version 5.1.2
-%define                subver  148
-%define                githash 78b3368
-%define                rel             4.1
 %include       /usr/lib/rpm/macros.php
 Summary:       Eventum Issue / Bug tracking system
 Summary(pl.UTF-8):     Eventum - system śledzenia spraw/błędów
 Name:          eventum
-Version:       2.3.3
-#Release:      %{rel}
-Release:       %{rel}.%{subver}.g%{githash}
-License:       GPL
+Version:       2.3.4
+Release:       1
+License:       GPL v2
 Group:         Applications/WWW
-#Source0:      http://launchpad.net/eventum/trunk/%{version}/+download/%{name}-%{version}.tar.gz
-Source0:       %{name}-%{version}-%{subver}-g%{githash}.tar.gz
-# Source0-md5: b2ba583bf2eac981bea70cfe41756f8e
+Source0:       https://launchpad.net/eventum/trunk/%{version}/+download/%{name}-%{version}.tar.gz
+# Source0-md5: f64a6cd054356513f6ff701be765600e
 Source1:       %{name}-apache.conf
 Source2:       %{name}-mail-queue.cron
 Source3:       %{name}-mail-download.cron
@@ -45,7 +40,7 @@ Patch0:               %{name}-lf.patch
 Patch2:                %{name}-order.patch
 Patch3:                group-users.patch
 Patch4:                https://github.com/glensc/eventum/compare/cf_escape.patch
-# Patch4-md5:  d3d7865b785ebe3b05b18e2005cf843c
+# Patch4-md5:  17688773ec035fb162b6a8ad2c7cfa76
 # packaging patches that probably never go upstream
 Patch100:      %{name}-paths.patch
 Patch101:      %{name}-cvs-config.patch
@@ -54,21 +49,23 @@ Patch107:   %{name}-gettext.patch
 # some tests
 Patch200:      %{name}-fixed-nav.patch
 URL:           http://eventum.mysql.org/
+BuildRequires: /usr/bin/php
 BuildRequires: gettext-devel
 BuildRequires: rpm-php-pearprov >= 4.0.2-98
-BuildRequires: rpmbuild(macros) >= 1.461
+BuildRequires: rpmbuild(macros) >= 1.654
 BuildRequires: sed >= 4.0
 Requires:      %{name}-base = %{version}-%{release}
 Requires:      Smarty >= 2.6.10-4
 Requires:      php(core) >= %{php_min_version}
-Requires:      php-filter
-Requires:      php-gd
-Requires:      php-iconv
-Requires:      php-imap
-Requires:      php-json
-Requires:      php-mbstring
-Requires:      php-mysql
-Requires:      php-pcre
+Requires:      php(filter)
+Requires:      php(gd)
+Requires:      php(iconv)
+Requires:      php(imap)
+Requires:      php(json)
+Requires:      php(mbstring)
+Requires:      php(mysql)
+Requires:      php(pcre)
+Requires:      php(session)
 Requires:      php-pear-DB
 Requires:      php-pear-Date
 Requires:      php-pear-Mail
@@ -83,7 +80,6 @@ Requires:     php-pear-Net_UserAgent_Detect
 Requires:      php-pear-PEAR-core
 Requires:      php-pear-Text_Diff
 Requires:      php-pear-XML_RPC
-Requires:      php-session
 Requires:      smarty-gettext
 Requires:      webapps
 Requires:      webserver(access)
@@ -96,12 +92,12 @@ Conflicts:  logrotate < 3.8.0
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _noautopear     pear(../init.php) pear(init.php) pear(/usr/share/eventum/init.php) pear(/etc/webapps/.*) pear(%{_appdir}/.*) pear(jpgraph_dir.php) pear(.*Smarty.class.php) pear(Services/JSON.php) pear(class.date_helper.php) pear(sphinxapi.php) pear(Net/LDAP2.php)
+%define                _noautoreq_pear ../init.php init.php /usr/share/eventum/init.php /etc/webapps/.* %{_appdir}/.* jpgraph_dir.php .*Smarty.class.php Services/JSON.php class.date_helper.php sphinxapi.php Net/LDAP2.php
 
 # exclude optional php dependencies
 %define                _noautophp      php-gnupg php-hash php-pecl-http php-tk
 
-%define                _noautoreq      %{_noautophp} %{_noautopear}
+%define                _noautoreq      %{_noautophp}
 
 %define                _libdir         %{_prefix}/lib/%{name}
 %define                _appdir         %{_datadir}/%{name}
@@ -237,7 +233,7 @@ Summary(pl.UTF-8):  Monitor życia dla Eventum
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
 Requires:      crondaemon
-Requires:      php-posix
+Requires:      php(posix)
 
 %description monitor
 The heartbeat monitor is a feature designed for the administrator that
@@ -367,8 +363,8 @@ Summary(pl.UTF-8):  IRC-owy bot powiadamiający dla Eventum
 Group:         Applications/WWW
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name} = %{version}-%{release}
+Requires:      php(sockets)
 Requires:      php-pear-Net_SmartIRC
-Requires:      php-sockets
 Requires:      rc-scripts >= 0.4.0.18
 
 %description irc
@@ -418,8 +414,8 @@ Summary(pl.UTF-8):  Integracja SCM dla Eventum
 Group:         Applications/WWW
 Requires:      %{name}-base = %{version}-%{release}
 Requires:      php(core) >= %{php_min_version}
+Requires:      php(pcre)
 Requires:      php-cli
-Requires:      php-pcre
 
 %description scm
 This feature allows your software development teams to integrate your
@@ -455,7 +451,7 @@ Sphinx search integration for Eventum.
 This package contains the cron job.
 
 %prep
-%setup -q -n %{name}-%{version}-%{subver}-g%{githash}
+%setup -q
 
 # GPL v2
 rm docs/COPYING
@@ -548,7 +544,7 @@ cp -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 # postfix router
 install -p %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
 
-install %{SOURCE17} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE17} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ht
 
@@ -579,7 +575,8 @@ for a in cli.log errors.log irc_bot.log login_attempts.log; do
        fi
 done
 
-# database update
+# run database update if configured
+test -s %{_webappdir}/config.php && \
 %{_appdir}/upgrade/update-database.php || :
 
 # nuke Smarty templates cache after upgrade
@@ -610,7 +607,7 @@ chmod 660 %{_webappdir}/{config,private_key}.php
 chown root:http %{_webappdir}/{config,private_key}.php
 
 %postun setup
-if [ "$1" = "0" ]; then
+if [ "$1" = "0" ] && [ -f %{_webappdir}/config.php ]; then
        chmod 640 %{_webappdir}/{config,private_key}.php
        chown root:http %{_webappdir}/{config,private_key}.php
 fi
This page took 0.032604 seconds and 4 git commands to generate.