X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=eventum.spec;h=25fc183f44394007451c6eb431ed31325fe244d6;hb=16902912829de662acf5c10719a17716a2bdfada;hp=cf31a78d90056f0e89c69bc62399ff8a758ea0a2;hpb=5e76225bd0f4cfce80b6e9d1e7afbfc7aeab9f1e;p=packages%2Feventum.git diff --git a/eventum.spec b/eventum.spec index cf31a78..25fc183 100644 --- a/eventum.spec +++ b/eventum.spec @@ -1,6 +1,4 @@ # TODO -# - system pear is incompatible, at least pear DB class seems broke Eventum -# - php5 is not tested, but not placing hard conflict on it, as it prevents php4 & php coinstallation # - discard bundled packages (from INSTALL): # - JpGraph 1.5.3 (last GPL version) # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/) @@ -8,34 +6,27 @@ # - 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 - +# +# 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 20050227 +%define _snap 20060220 -%if 0%{?_snap} -%define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz -%else -%define _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz -%endif - -%define _rel 2 +%define _rel 0.6 +%{?with_pear:%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.5.3 -Release: %{?_snap:0.%{_snap}.}%{_rel} +Version: 1.7.0 +Release: %{?_snap:4.%{_snap}.}%{?_rc:%{_rc}.}%{_rel} License: GPL Group: Applications/WWW -Source0: %{_source} -# Source0-md5: e8a5ac661d7ebdd71c8b38695c6e4af8 +#Source0: http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz +Source0: http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz +# Source0-md5: f2bc584ac2d0fd67bec954f43abe920c Source1: %{name}-apache.conf Source2: %{name}-mail-queue.cron Source3: %{name}-mail-download.cron @@ -47,10 +38,9 @@ Source8: %{name}-irc.init Source9: %{name}-irc.sysconfig Source10: %{name}-config.php Source11: %{name}-router-qmail.sh -Source12: http://dev.mysql.com/common/favicon.ico -# Source12-md5: 858be0130832da4144c08d4b59116411 -Source13: %{name}-config-setup.php -Source14: %{name}-upgrade.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 @@ -58,17 +48,32 @@ 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 +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: http://glen.alkohol.ee/pld/%{name}-link_filter-updates.patch +Patch14: http://glen.alkohol.ee/pld/%{name}-irc-mem.patch +Patch16: http://glen.alkohol.ee/pld/eventum-recent_activity-usability.patch +Patch17: http://glen.alkohol.ee/pld/eventum-upload-error-keep-popup.patch +Patch18: http://glen.alkohol.ee/pld/eventum-scm-parse-response.patch +Patch19: eventum-double-decode.patch +Patch20: http://glen.alkohol.ee/pld/eventum-keep-submitbutton.patch +Patch21: http://glen.alkohol.ee/pld/eventum-tt-unhide.patch +Patch22: %{name}-route-mem.patch URL: http://dev.mysql.com/downloads/other/eventum/ -BuildRequires: rpmbuild(macros) >= 1.200 +%{?with_pear:BuildRequires: rpm-php-pearprov >= 4.0.2-98} +BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: sed >= 4.0 -Requires: php >= 4.2.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: %{name}-base = %{epoch}:%{version}-%{release} -Requires: Smarty >= 2.6.2 +Requires: php-session %if %{with pear} Requires: php-pear-Benchmark Requires: php-pear-DB @@ -77,29 +82,32 @@ Requires: php-pear-HTTP_Request Requires: php-pear-Mail Requires: php-pear-Math_Stats Requires: php-pear-Net_DIME -Requires: php-pear-Net_POP3 Requires: php-pear-Net_SMTP -Requires: php-pear-Net_SmartIRC Requires: php-pear-Net_Socket Requires: php-pear-Net_URL Requires: php-pear-Net_UserAgent_Detect -Requires: php-pear-PEAR +Requires: php-pear-PEAR-core Requires: php-pear-Text_Diff Requires: php-pear-XML_RPC %endif -Requires: apache >= 1.3.33-2 -Requires: apache(mod_dir) +Requires(triggerpostun): /usr/bin/php Requires(triggerpostun): sed >= 4.0 +Requires: apache(mod_dir) +Requires: webapps +Requires: webserver = apache BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _sysconfdir /etc/%{name} -%define _libdir %{_prefix}/%{_lib}/%{name} -%define _appdir %{_datadir}/%{name} -%define _smartyplugindir %{php_pear_dir}/Smarty/plugins +%define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' -%define _apache1dir /etc/apache -%define _apache2dir /etc/httpd +%define _libdir %{_prefix}/lib/%{name} +%define _appdir %{_datadir}/%{name} +%define _smartyplugindir %{_appdir}/include/smarty +%define _smartydir /usr/share/php/Smarty +%define _webapps /etc/webapps +%define _webapp %{name} +%define _webappdir %{_webapps}/%{_webapp} +%define _sysconfdir /etc/%{name} %description Eventum is a user-friendly and flexible issue tracking system that can @@ -120,12 +128,14 @@ reakcji. Summary: Eventum base package Summary(pl): Podstawowy pakiet Eventum Group: Applications/WWW +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel Requires(pre): /bin/id Requires(pre): /usr/bin/getgid -Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/groupadd -Provides: user(eventum) +Requires(pre): /usr/sbin/useradd Provides: group(eventum) +Provides: user(eventum) %description base This package contains base directory structure for Eventum. @@ -137,7 +147,7 @@ Ten pakiet zawiera podstawow Summary: Eventum setup package Summary(pl): Pakiet do wstêpnej konfiguracji Eventum Group: Applications/WWW -PreReq: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} %description setup Install this package to configure initial Eventum installation. You @@ -153,9 +163,8 @@ pozostawienie plik Summary: Eventum mail queue process Summary(pl): Przetwarzanie kolejki poczty Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: crondaemon -Requires: php >= 4.1.0 %description mail-queue Beginning with the first release of Eventum, emails are not directly @@ -179,9 +188,8 @@ Ten pakiet zawiera zadanie dla crona. Summary: Eventum email download Summary(pl): ¦ci±ganie poczty Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: crondaemon -Requires: php >= 4.1.0 %description mail-download In order for Eventum's email integration feature to work, you need to @@ -200,8 +208,7 @@ Ten pakiet zawiera zadanie dla crona. Summary: Eventum Reminder System Summary(pl): System przypominania dla Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires: %{name} = %{version}-%{release} Requires: crondaemon %description reminder @@ -226,10 +233,9 @@ Ten pakiet zawiera zadanie dla crona. Summary: Eventum Heartbeat Monitor Summary(pl): Monitor ¿ycia dla Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 -Requires: php-posix +Requires: %{name} = %{version}-%{release} Requires: crondaemon +Requires: php-posix %description monitor The heartbeat monitor is a feature designed for the administrator that @@ -257,12 +263,34 @@ test Ten pakiet zawiera zadanie dla crona. +%package route-drafts +Summary: Eventum Draft Routing +Summary(pl): Przekazywanie szkiców dla Eventum +Group: Applications/WWW +Requires: %{name} = %{version}-%{release} +Requires: eventum(router) + +%description route-drafts +The draft routing feature is used to automatically associate a thread +of drafts into an Eventum issue. By setting up qmail (or even Postfix) +to deliver emails sent to a specific address (usually +draft-@) to the above script, users are able to send +drafts written in their mail client to be stored in Eventum. These +drafts will NOT broadcasted to the notification list. + +%description route-drafts -l pl +Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z +problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby +dostarcza³ pocztê wys³an± na podany adres (zwykle +draft-@) do tego skryptu umo¿liwia siê u¿ytkownikom +wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w +Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ. + %package route-emails Summary: Eventum Email Routing Summary(pl): Przekazywanie poczty dla Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires: %{name} = %{version}-%{release} Requires: eventum(router) %description route-emails @@ -287,8 +315,7 @@ rozprowadzane do ca Summary: Eventum Note Routing Summary(pl): Przekazywanie notatek dla Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires: %{name} = %{version}-%{release} Requires: eventum(router) %description route-notes @@ -313,7 +340,9 @@ spraw Summary: Eventum Mail Routing - qmail Summary(pl): Przekazywanie poczty Eventum - qmail Group: Applications/Mail -Requires: %{name} = %{epoch}:%{version}-%{release} +# loose dep is intentional. qmail subpackage isn't built on PLD +# builders and there really nothing changes. +Requires: %{name} >= %{version}-%{release} Requires: qmail >= 1.03 Provides: eventum(router) Obsoletes: eventum(router) @@ -330,7 +359,7 @@ przez qmaila. Summary: Eventum Mail Routing - Postfix Summary(pl): Przekazywanie poczty Eventum - Postfix Group: Applications/Mail -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: postfix Provides: eventum(router) Obsoletes: eventum(router) @@ -339,16 +368,23 @@ Obsoletes: eventum(router) This package provides way of routing notes and emails back to Eventum via Postfix. +The Postfix configuration instructions you can find from +. + %description router-postfix -l pl Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum przez Postfiksa. +Opis konfiguracji Postfiksa mo¿na znale¼æ pod adresem +. + %package irc Summary: Eventum IRC Notification Bot Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum Group: Applications/WWW -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires(triggerpostun): sed >= 4.0 +Requires: %{name} = %{version}-%{release} +Requires: php-pear-Net_SmartIRC Requires: php-sockets Requires: rc-scripts >= 0.4.0.18 @@ -380,12 +416,12 @@ kana Summary: Eventum command-line interface Summary(pl): Interfejs linii poleceñ dla Eventum Group: Applications/WWW -Requires: %{name}-base = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires: %{name}-base = %{version}-%{release} Requires: php-cli +Requires: php-common >= 3:4.1.0 Requires: php-curl -Requires: php-xml Requires: php-pear-XML_RPC +Requires: php-xml %description cli The Eventum command-line interface allows you to access most of the @@ -399,8 +435,10 @@ funkcji interfejsu WWW prosto z linii polece Summary: Eventum SCM integration Summary(pl): Integracja SCM dla Eventum Group: Applications/WWW -Requires: %{name}-base = %{epoch}:%{version}-%{release} -Requires: php >= 4.1.0 +Requires: %{name}-base = %{version}-%{release} +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 @@ -426,94 +464,122 @@ Szczeg %prep %setup -q %{?_snap:-n %{name}-%{_snap}} # undos the source -find . -type f -print0 | xargs -0 sed -i -e 's, -$,,' +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 + +# sample, not used in eventum +rm -f rpc/xmlrpc_client.php # packaging -%patch0 -p1 -b .paths +%patch0 -p1 %patch1 -p1 +%patch14 -p1 %patch2 -p1 -%{?with_pear:%patch3 -p1 -b .PEAR} +%{?with_pear:%patch3 -p1} # bug fixes. %patch4 -p1 %patch5 -p1 %patch6 -p1 %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 + +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/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 # replace in remaining scripts config.inc.php to system one grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e ' - s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"), + s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"), ' -sed -i -e ' - s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"), -' misc/download_emails.php 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"), + s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"), ' -find -name '*~' | xargs -r rm -v + +# remove backups from patching as we use globs to package files to buildroot +find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v %install rm -rf $RPM_BUILD_ROOT install -d \ - $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \ + $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/lib/%{name}/routed_{emails,drafts,notes} \ $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \ cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir} -cp -a misc/irc $RPM_BUILD_ROOT%{_appdir} cp -a templates $RPM_BUILD_ROOT%{_appdir} -cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include +cp -a include/{customer,custom_field,jpgraph,pear,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} -install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico -install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php -install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh +cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico +install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php +install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh # cli install -d $RPM_BUILD_ROOT%{_appdir}/cli -install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli -install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php -sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \ - misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name} -cp -f misc/cli/eventumrc_example eventumrc +cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli +cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php +install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name} +install %{name}-bot $RPM_BUILD_ROOT%{_sbindir} # scm -echo '#!%{_bindir}/php4 -q' > %{name}-scm -cat misc/scm/process_cvs_commits.php >> %{name}-scm install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm +install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php # private key -mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}} -# change private key, so we can easily grep -sed -i -e ' -s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";, -' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php +cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php -install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.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 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor -install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php 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}},' \ - %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php -# config -> $RPM_BUILD_ROOT%{_sysconfdir}/setup.php -mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php +sed -e ' +s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}}, +s,%%{PHP_PEAR_DIR}%%,%{?with_pear:%{php_pear_dir}}%{!?with_pear:%{_appdir}/includes/pear}, +s,%%{APP_PATH}%%,%{_appdir}, +s,%%{SMARTY_DIR}%%,%{_smartydir}, +s,%%{SYSCONFDIR}%%,%{_webappdir}, +' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php -# sample, not used in eventum -rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php +# config +> $RPM_BUILD_ROOT%{_webappdir}/setup.php +mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php %if %{with pear} # provided by PEAR @@ -524,10 +590,13 @@ rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear 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 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \ +cp -a \ + include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \ + include/Smarty/plugins/modifier.highlight_quoted.php \ $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 @@ -535,6 +604,9 @@ 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 +# postfix router +install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix %clean rm -rf $RPM_BUILD_ROOT @@ -543,37 +615,22 @@ 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 grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then if [ -f %{_appdir}/htdocs/setup/index.php ]; then %banner %{name} -e < If you need access from elsewhere, you need to edit -%{_sysconfdir}/apache.conf and restart apache. +%{_webappdir}/apache.conf and restart apache. IMPORTANT: When You have configured Eventum, please uninstall the setup package, so that %{name}-setup is able to secure your Eventum installation. EOF -#' vim stupidity. +#' vim syntax hack else %banner %{name} -e <. If you need access from elsewhere, you need to edit -%{_sysconfdir}/apache.conf and restart apache. +%{_webappdir}/apache.conf and restart apache. IMPORTANT: When You have configured Eventum, please uninstall the setup package, so that %{name}-setup is able to secure your Eventum installation. EOF -#' vim stupidity. +#' vim syntax hack fi -elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then +elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then %banner %{name} -e <&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 @@ -647,11 +689,10 @@ if [ "$1" = "0" ]; then %groupremove %{name} fi -%if %{with qmail} %post router-qmail CF=/etc/qmail/control/virtualdomains if ! grep -q ':%{name}\b' $CF 2>/dev/null; then - FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null) + FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null) [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost) umask 022 echo "#${FQDN}:%{name}" >> $CF @@ -671,18 +712,33 @@ fi if [ "$1" = "0" ]; then sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains fi -%endif %post setup -chmod 660 %{_sysconfdir}/{config,private_key}.php -chown root:eventum %{_sysconfdir}/{config,private_key}.php +chmod 660 %{_webappdir}/{config,private_key}.php +chown root:eventum %{_webappdir}/{config,private_key}.php %postun setup if [ "$1" = "0" ]; then - chmod 640 %{_sysconfdir}/{config,private_key}.php - chown root:eventum %{_sysconfdir}/{config,private_key}.php + chmod 640 %{_webappdir}/{config,private_key}.php + chown root:eventum %{_webappdir}/{config,private_key}.php fi +%post irc +/sbin/chkconfig --add eventum-irc +%service eventum-irc restart "Eventum IRC Bot" + +%triggerin -- apache1 +%webapp_register apache %{_webapp} + +%triggerun -- apache1 +%webapp_unregister apache %{_webapp} + +%triggerin -- apache >= 2.0.0 +%webapp_register httpd %{_webapp} + +%triggerun -- apache >= 2.0.0 +%webapp_unregister httpd %{_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. @@ -703,15 +759,93 @@ 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 <