# Conditional build:
%bcond_with order # with experimental order patch
-%define rel 1.3
-%define subver 120
-%define githash 0b3339c
+%define rel 1.9
+%define subver 287
+%define githash e48a790
%define php_min_version 5.3.3
%include /usr/lib/rpm/macros.php
Summary: Eventum Issue / Bug tracking system
Group: Applications/WWW
#Source0: https://github.com/eventum/eventum/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source0: %{name}-%{version}-%{subver}-g%{githash}.tar.gz
-# Source0-md5: dced95de62683ee778f51862cf4dde38
+# Source0-md5: 6ff7e2166e64377ae03684341bbc0ac3
Source1: %{name}-apache.conf
Source2: %{name}-mail-queue.cron
Source3: %{name}-mail-download.cron
# packaging patches that probably never go upstream
Patch100: %{name}-paths.patch
Patch101: %{name}-cvs-config.patch
-Patch105: %{name}-bot-reconnect.patch
Patch107: %{name}-gettext.patch
Patch108: autoload.patch
# some tests
Requires(post,preun): /sbin/chkconfig
Requires: %{name} = %{version}-%{release}
Requires: php(sockets)
-Requires: php-pear-Net_SmartIRC
+Requires: php-pear-Net_SmartIRC >= 1.1
Requires: rc-scripts >= 0.4.0.18
%description irc
# packaging
%patch100 -p1
%patch101 -p1
-%patch105 -p1
%patch107 -p1
%patch108 -p1
-%{__sed} -i -e "
-s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
-" upgrade/{*/,}*.php
+# cleanup vendor. keep only needed libraries.
+# (the rest are packaged with system packages)
+mv vendor vendor.dist
+vendor() {
+ local path dir
+ for path; do
+ dir=$(dirname $path)
+ test -d vendor/$dir || mkdir -p vendor/$dir
+ mv vendor.dist/$path vendor/$path
+ done
+}
+vendor autoload.php
+vendor composer/autoload_{classmap,files,namespaces,real,psr4}.php
+vendor composer/ClassLoader.php
+vendor ircmaxell/{password-compat,random-lib,security-lib}
+vendor zendframework/zend-config
# remove backups from patching as we use globs to package files to buildroot
find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
$RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
$RPM_BUILD_ROOT%{systemdtmpfilesdir}
-%{__make} install-eventum install-cli install-irc install-scm install-localization \
+%{__make} install-eventum install-cli install-scm install-localization \
sysconfdir=%{_webappdir} \
localedir=%{_localedir} \
DESTDIR=$RPM_BUILD_ROOT
ln -s %{_webappdir} $RPM_BUILD_ROOT%{_appdir}/config
-install -d $RPM_BUILD_ROOT%{_appdir}/vendor/ircmaxell
-cp -a vendor/autoload.php vendor/composer $RPM_BUILD_ROOT%{_appdir}/vendor
-rm $RPM_BUILD_ROOT%{_appdir}/vendor/composer/include_paths.php
-rm $RPM_BUILD_ROOT%{_appdir}/vendor/composer/autoload_psr4.php
-cp -a vendor/ircmaxell/{password-compat,random-lib,security-lib} $RPM_BUILD_ROOT%{_appdir}/vendor/ircmaxell
+cp -a vendor $RPM_BUILD_ROOT%{_appdir}
# unsupported locale
%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ht
%attr(755,root,root) %{_appdir}/upgrade/scm_trac_import.php
%{_appdir}/upgrade/patches
-%dir %{_appdir}/vendor
-%dir %{_appdir}/vendor/composer
-%{_appdir}/vendor/autoload.php
-%{_appdir}/vendor/composer/ClassLoader.php
-%{_appdir}/vendor/composer/autoload_*.php
-
-%dir %{_appdir}/vendor/ircmaxell
-%{_appdir}/vendor/ircmaxell/password-compat
-%{_appdir}/vendor/ircmaxell/random-lib
-%{_appdir}/vendor/ircmaxell/security-lib
+%{_appdir}/vendor
%dir %{_appdir}/lib
%{_appdir}/lib/eventum
%defattr(644,root,root,755)
%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
-%attr(755,root,root) %{_sbindir}/%{name}-irc-bot
+%attr(755,root,root) %{_appdir}/bin/irc-bot.php
%attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
%files cli