X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=eventum.spec;h=1a7f67ca8bdc696864e168296959cd0e9a3eaa56;hb=a6016bab583b85bdb9c508bf45fd969bf794d722;hp=2c752c513d464beecb4aa7f2e7122092f78e9ed8;hpb=47175c74921ebb94eb13d267440198669f05dab9;p=packages%2Feventum.git diff --git a/eventum.spec b/eventum.spec index 2c752c5..1a7f67c 100644 --- a/eventum.spec +++ b/eventum.spec @@ -8,25 +8,24 @@ # - 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 20060318 -%define _rel 0.1 +#define _snap 20060921 +%define _svn 20061207.3172 +#define _rc RC3 +%define _rel 5.146 -%{?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: %{?_rc:%{_rc}.}%{_rel}%{?_snap:.%{_snap}}%{?_svn:.%{_svn}} License: GPL Group: Applications/WWW -#Source0: http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz -Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz -# Source0-md5: a9d1c01ee5ad396729e75262bdae558c +#Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz +Source0: %{name}-%{_svn}.tar.bz2 +# Source0-md5: ab9893cd124b8229973907b58080de7f Source1: %{name}-apache.conf Source2: %{name}-mail-queue.cron Source3: %{name}-mail-download.cron @@ -41,43 +40,43 @@ Source11: %{name}-router-qmail.sh 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: %{name}-link_filter-updates.patch -Patch14: %{name}-irc-mem.patch -Patch16: %{name}-recent_activity-usability.patch -Patch17: http://glen.alkohol.ee/pld/%{name}-upload-error-keep-popup.patch -Patch18: http://glen.alkohol.ee/pld/%{name}-scm-parse-response.patch -Patch19: %{name}-double-decode.patch -Patch20: http://glen.alkohol.ee/pld/%{name}-keep-submitbutton.patch -Patch21: http://glen.alkohol.ee/pld/%{name}-tt-unhide.patch -Patch22: %{name}-route-mem.patch -Patch23: http://glen.alkohol.ee/pld/%{name}-msgid-case.patch -Patch24: http://glen.alkohol.ee/pld/%{name}-route-and-download.patch +Source15: %{name}.logrotate +Source16: %{name}-lighttpd.conf +Patch0: %{name}-lf.patch +Patch1: %{name}-perms.patch +Patch2: %{name}-timetracking-advanced-logic.patch +Patch3: %{name}-email-notify-display.patch +Patch4: %{name}-backtraces.patch +Patch5: %{name}-errorhandler.patch +Patch7: %{name}-mem2.patch +# packaging patches that probably never go upstream +Patch100: %{name}-paths.patch +Patch101: %{name}-cvs-config.patch +Patch102: %{name}-irc-config.patch +Patch103: %{name}-PEAR.patch +Patch104: %{name}-httpclient-clientside.patch +Patch105: %{name}-bot-reconnect.patch +Patch106: %{name}-private-key.patch +Patch107: %{name}-mem-limits.patch +Patch108: %{name}-gettext.patch +# some tests +Patch200: %{name}-fixed-nav.patch URL: http://dev.mysql.com/downloads/other/eventum/ -%{?with_pear:BuildRequires: rpm-php-pearprov >= 4.0.2-98} +BuildRequires: gettext-devel +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: 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: apache(mod_dir) +Requires: php(gd) +Requires: php(imap) +Requires: php(mbstring) +Requires: php(mysql) +Requires: php(pcre) +Requires: php(session) Requires: php-pear-DB Requires: php-pear-Date Requires: php-pear-HTTP_Request @@ -92,16 +91,15 @@ Requires: php-pear-Net_UserAgent_Detect 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: smarty-gettext Requires: webapps -Requires: webserver = apache +Requires: webserver(access) +Requires: webserver(alias) +Requires: webserver(php) >= 4.2.0 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' +%define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Benchmark/.*)' %define _libdir %{_prefix}/lib/%{name} %define _appdir %{_datadir}/%{name} @@ -238,7 +236,7 @@ Summary(pl): Monitor 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 @@ -385,10 +383,11 @@ Opis konfiguracji Postfiksa mo 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: php(sockets) Requires: php-pear-Net_SmartIRC -Requires: php-sockets Requires: rc-scripts >= 0.4.0.18 %description irc @@ -422,9 +421,7 @@ Group: Applications/WWW 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 @@ -439,9 +436,9 @@ Summary: Eventum SCM integration Summary(pl): Integracja SCM dla Eventum Group: Applications/WWW Requires: %{name}-base = %{version}-%{release} +Requires: php(pcre) Requires: php-cli Requires: php-common >= 3:4.1.0 -Requires: php-pcre %description scm This feature allows your software development teams to integrate your @@ -465,56 +462,78 @@ Szczeg . %prep -%setup -q %{?_snap:-n %{name}-%{_snap}} +%setup -q %{?_snap:-n %{name}-%{_snap}}%{?_svn:-n %{name}} # undos the source find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,' -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 setup.conf.php # not to be installed by *.php glob +rm benchmark.php +rm -r misc/upgrade/*v1.[123]* # too old to support in PLD Linux +rm misc/upgrade/flush_compiled_templates.php +rm -r misc/upgrade/*/upgrade_config.php # not needed in PLD Linux +rm -r misc/upgrade/*/index.html # not needed in PLD Linux +rm -r include/php-gettext # sample, not used in eventum -rm -f rpc/xmlrpc_client.php +rm rpc/xmlrpc_client.php -# packaging +# bug fixes. %patch0 -p1 %patch1 -p1 -%patch14 -p1 -%patch2 -p1 -%{?with_pear:%patch3 -p1} -# bug fixes. +%patch2 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 +cd include %patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch12 -p1 -%patch13 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 +cd - + +#%patch200 -p1 + +# packaging +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 +%patch107 -p1 +%patch108 -p1 + +cat <<'EOF'> mysql-permissions.sql +# use this schema if you want to grant permissions manually instead of using setup +# this schema is extracted from setup/index.php. +GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password'; +EOF + +mv misc/localization/de{_DE,} +mv misc/localization/es{_ES,} +mv misc/localization/fi{_FI,} +mv misc/localization/fr{_FR,} +mv misc/localization/it{_IT,} +mv misc/localization/nl{_NL,} +mv misc/localization/ru{_RU,} +mv misc/localization/sv{_SE,} + +# oops, the file got truncated - quick fix +cp misc/localization/eventum.po misc/localization/de/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/es/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/fi/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/fr/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/nl/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/ru/LC_MESSAGES/eventum.po +cp misc/localization/eventum.po misc/localization/en_US/LC_MESSAGES/eventum.po 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/scm/process_cvs_commits.php > process_cvs_commits +cat misc/scm/process_svn_commits.php > process_svn_commits sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot mv misc/cli/eventumrc_example eventumrc sed -i -e '1i#!%{_bindir}/php' misc/*.php chmod +x misc/*.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 +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 ' @@ -528,12 +547,19 @@ grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e ' # remove backups from patching as we use globs to package files to buildroot find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v +%build +cd misc/localization +for a in */LC_MESSAGES; do + msgfmt -o $a/eventum.mo $a/eventum.po +done + %install rm -rf $RPM_BUILD_ROOT install -d \ $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_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/{run,cache,lib}/%{name} \ + $RPM_BUILD_ROOT/var/log/{archiv/,}%{name} \ $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \ $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \ @@ -541,7 +567,7 @@ cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_ap 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} @@ -558,14 +584,18 @@ install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name} install %{name}-bot $RPM_BUILD_ROOT%{_sbindir} # scm -install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm -install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php +install process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits +install process_svn_commits $RPM_BUILD_ROOT%{_libdir}/process_svn_commits +ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm +install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php # private key cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php +touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf +install %{SOURCE16} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder @@ -575,8 +605,8 @@ install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc 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}}%{?_svn:-%{_svn}}, +s,%%{PHP_PEAR_DIR}%%,%{php_pear_dir}, s,%%{APP_PATH}%%,%{_appdir}, s,%%{SMARTY_DIR}%%,%{_smartydir}, s,%%{SYSCONFDIR}%%,%{_webappdir}, @@ -586,13 +616,6 @@ 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 \ @@ -613,6 +636,17 @@ install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail # postfix router install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix +install -D %{SOURCE15} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} +# locale +cd misc/localization +for a in */LC_MESSAGES; do + install -d $RPM_BUILD_ROOT%{_datadir}/locale/$a + cp -a $a/%{name}.mo $RPM_BUILD_ROOT%{_datadir}/locale/$a +done +cd - + +%find_lang %{name} + %clean rm -rf $RPM_BUILD_ROOT @@ -732,18 +766,30 @@ fi /sbin/chkconfig --add eventum-irc %service eventum-irc restart "Eventum IRC Bot" -%triggerin -- apache1 +%preun irc +if [ "$1" = 0 ]; then + %service eventum-irc stop + /sbin/chkconfig --del eventum-irc +fi + +%triggerin -- apache1 < 1.3.37-3, apache1-base %webapp_register apache %{_webapp} -%triggerun -- apache1 +%triggerun -- apache1 < 1.3.37-3, apache1-base %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} +%triggerin -- lighttpd +%webapp_register lighttpd %{_webapp} + +%triggerun -- lighttpd +%webapp_unregister lighttpd %{_webapp} + # 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. @@ -780,6 +826,11 @@ EOF database_changes.php Perform database changes EOF +%triggerpostun -- eventum < 1.7.1-4.132.20061119.3143 +%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.7.1_to_v2.0 <