]> git.pld-linux.org Git - packages/eventum.git/blobdiff - eventum.spec
- updated to svn 3172
[packages/eventum.git] / eventum.spec
index 6945a0703349ab3835b68333fa1312ce15b41817..1a7f67ca8bdc696864e168296959cd0e9a3eaa56 100644 (file)
@@ -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,37 +6,26 @@
 #  - 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)
-
-%bcond_with    pear    # build with system PEAR packages (or use bundled ones)
+#
+# Conditional build:
 %bcond_with    qmail   # build the router-qmail subpackage
 
-# snapshot: DATE
-#define        _snap 20051030
-
-# release candidate
-#define _rc            RC1
-
-%define        _rel    4.10
-
-%if 0%{?_rc:1}
-%define        _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
-%else
-%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
-%endif
+#define        _snap   20060921
+%define        _svn    20061207.3172
+#define        _rc             RC3
+%define        _rel    5.146
 
+%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.6.1
-Release:       %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
+Version:       1.7.1
+Release:       %{?_rc:%{_rc}.}%{_rel}%{?_snap:.%{_snap}}%{?_svn:.%{_svn}}
 License:       GPL
 Group:         Applications/WWW
-Source0:       %{_source}
-# Source0-md5: bb05ecdb46b02580ffe892e270e536b3
+#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
@@ -50,62 +37,78 @@ 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
-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
-Patch9:                http://glen.alkohol.ee/pld/eventum-httpclient-clientside.patch
-Patch10:       %{name}-hl-quot-fix.patch
-Patch11:       eventum-cli-wr-separated.patch
-Patch12:       eventum-php440.patch
-Patch13:       eventum-htmloptions-truncate.patch
-Patch14:       http://glen.alkohol.ee/pld/eventum-httpclient.patch
+Source12:      %{name}-config-setup.php
+Source13:      %{name}-upgrade.sh
+Source14:      %{name}-router-postfix.sh
+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/
-BuildRequires: rpmbuild(macros) >= 1.223
+BuildRequires: gettext-devel
+BuildRequires: rpm-php-pearprov >= 4.0.2-98
+BuildRequires: rpmbuild(macros) >= 1.268
 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}
-Requires:      php-pear-Benchmark
+Requires(triggerpostun):       /usr/bin/php
+Requires(triggerpostun):       sed >= 4.0
+Requires:      %{name}-base = %{version}-%{release}
+Requires:      Smarty >= 2.6.10-4
+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
 Requires:      php-pear-Mail
+Requires:      php-pear-Mail_Mime
 Requires:      php-pear-Math_Stats
 Requires:      php-pear-Net_DIME
-Requires:      php-pear-Net_POP3
 Requires:      php-pear-Net_SMTP
 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):       sed >= 4.0
+Requires:      smarty-gettext
+Requires:      webapps
+Requires:      webserver(access)
+Requires:      webserver(alias)
+Requires:      webserver(php) >= 4.2.0
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/%{name}
+%define                _noautoreq      'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Benchmark/.*)'
+
 %define                _libdir         %{_prefix}/lib/%{name}
-%define                _appdir %{_datadir}/%{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
@@ -126,14 +129,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
-Requires(postun):      /usr/sbin/userdel
-Requires(postun):      /usr/sbin/groupdel
-Provides:      user(eventum)
+Requires(pre): /usr/sbin/useradd
 Provides:      group(eventum)
+Provides:      user(eventum)
 
 %description base
 This package contains base directory structure for Eventum.
@@ -145,7 +148,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
@@ -161,9 +164,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
@@ -187,9 +189,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
@@ -208,8 +209,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
@@ -234,10 +234,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
@@ -265,12 +264,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-<number>@<domain>) 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-<liczba>@<domena>) 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
@@ -295,8 +316,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
@@ -323,7 +343,7 @@ Summary(pl):        Przekazywanie poczty Eventum - qmail
 Group:         Applications/Mail
 # loose dep is intentional. qmail subpackage isn't built on PLD
 # builders and there really nothing changes.
-Requires:      %{name} >= %{epoch}:%{version}-%{release}
+Requires:      %{name} >= %{version}-%{release}
 Requires:      qmail >= 1.03
 Provides:      eventum(router)
 Obsoletes:     eventum(router)
@@ -340,7 +360,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)
@@ -349,19 +369,25 @@ 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
+<http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
+
 %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
+<http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
+
 %package irc
 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} = %{epoch}:%{version}-%{release}
-Requires:      php >= 4.1.0
-Requires:      php-sockets
-#Requires:     php-pear-Net_SmartIRC
+Requires:      %{name} = %{version}-%{release}
+Requires:      php(sockets)
+Requires:      php-pear-Net_SmartIRC
 Requires:      rc-scripts >= 0.4.0.18
 
 %description irc
@@ -392,11 +418,9 @@ 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-curl
-Requires:      php-xml
+Requires:      php-common >= 3:4.1.0
 Requires:      php-pear-XML_RPC
 
 %description cli
@@ -411,9 +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-cli >= 4.1.0
-Requires:      php-pcre
+Requires:      %{name}-base = %{version}-%{release}
+Requires:      php(pcre)
+Requires:      php-cli
+Requires:      php-common >= 3:4.1.0
 
 %description scm
 This feature allows your software development teams to integrate your
@@ -437,114 +462,160 @@ Szczeg
 </eventum/help.php?topic=scm_integration_installation>.
 
 %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,
-$,,'
+find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
 
-rm -f setup.conf.php
-rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
-rm -rf misc/upgrade/flush_compiled_templates.php
+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
 
-# using system package
-#rm -rf include/pear/Net/SmartIRC*
+rm -r include/php-gettext
+# sample, not used in eventum
+rm rpc/xmlrpc_client.php
 
-# packaging
-%patch0 -p1 -b .paths
+# bug fixes.
+%patch0 -p1
 %patch1 -p1
-%patch2 -p1 -b .irc-config
-%{?with_pear:%patch3 -p1 -b .PEAR}
 
-# bug fixes.
+%patch2 -p1
+%patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
+cd include
 %patch7 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -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 > 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
+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 '
-       s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
+       s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.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"),
 '
+
+# 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{%{_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 \
+       $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} \
 
 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,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 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
-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
+touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
 
-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 %{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
 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
 
-# sample, not used in eventum
-rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
+sed -e '
+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},
+' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
 
-%if %{with pear}
-# provided by PEAR
-rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
-%endif
+# config
+> $RPM_BUILD_ROOT%{_webappdir}/setup.php
+mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
 
-# 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 \
@@ -562,6 +633,19 @@ 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
+
+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
@@ -571,21 +655,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 # 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 <<EOF
 
 You haven't yet configured Eventum!
 Please open in browser <http://localhost/eventum/>
 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 <<EOF
 
@@ -594,17 +678,17 @@ You haven't yet configured Eventum!
 To setup eventum, please install %{name}-setup and open in browser
 <http://localhost/eventum/>.
 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 <<EOF
 
 You have default private key installed!
@@ -644,11 +728,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
@@ -668,37 +751,44 @@ 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
-if [ -f /var/lock/subsys/eventum-irc ]; then
-       /etc/rc.d/init.d/eventum-irc restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/eventum-irc start\" to start Eventum IRC Bot." >&2
+%service eventum-irc restart "Eventum IRC Bot"
+
+%preun irc
+if [ "$1" = 0 ]; then
+       %service eventum-irc stop
+       /sbin/chkconfig --del eventum-irc
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
 
-%triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
 
-%triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%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
@@ -736,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 <<EOF
+database_changes.php Perform database changes
+EOF
+
 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
 sed -i -e '
 s,\$irc_host,$irc_server_hostname,
@@ -746,18 +841,81 @@ s,\$irc_username,$username,
 s,\$irc_password,$password,
 ' /etc/eventum/irc.php
 
-%files
+%triggerpostun -- eventum < 1.7.0-2.0.48
+# migrate from apache-config macros
+if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
+       if [ -d /etc/apache/webapps.d ]; then
+               cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
+       fi
+
+       if [ -d /etc/httpd/webapps.d ]; then
+               cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
+       fi
+fi
+
+if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
+       /usr/sbin/webapp register apache %{_webapp}
+       rm -f /etc/apache/conf.d/99_%{_webapp}.conf
+       %service -q apache reload
+fi
+if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
+       /usr/sbin/webapp register httpd %{_webapp}
+       rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
+       %service -q httpd reload
+fi
+
+%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
+database_changes.php Perform database changes
+set_root_message_ids.php Set iss_root_message_id
+EOF
+
+# regular configs
+for i in apache.conf config.php private_key.php setup.php; do
+       if [ -f /etc/eventum/$i.rpmsave ]; then
+               mv -f %{_webappdir}/$i{,.rpmnew}
+               mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
+       fi
+done
+
+%triggerpostun cli -- %{name}-cli < 1.7.0-3.4
+if [ -f %{_webappdir}/cli.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/cli.php{,.rpmnew}
+       mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
+fi
+
+%triggerpostun irc -- %{name}-irc < 1.7.0-3.4
+if [ -f %{_webappdir}/irc.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/irc.php{,.rpmnew}
+       mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
+fi
+
+%triggerpostun scm -- %{name}-scm < 1.7.1-2.70.20060724
+if [ -f %{_sysconfdir}/cvs.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/scm.php{,.rpmnew}
+       mv -f %{_sysconfdir}/cvs.php.rpmsave %{_sysconfdir}/scm.php
+fi
+ln -sf process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc ChangeLog FAQ INSTALL README UPGRADE
-%doc docs/* rpc/xmlrpc_client.php setup/schema.sql
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
-%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
-%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
-%attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
-%attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
+%doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
+%doc docs/* setup/schema.sql mysql-permissions.sql
+%attr(751,root,root) %dir %{_webappdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
+%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
+%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
+%attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
+%attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
 
 %dir %attr(731,root,eventum) /var/log/%{name}
 %attr(620,root,eventum) %ghost /var/log/%{name}/*
+%dir %attr(750,root,root) /var/log/archiv/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 
 %dir %{_appdir}/htdocs
 %{_appdir}/htdocs/*.php
@@ -770,19 +928,15 @@ s,\$irc_password,$password,
 %{_appdir}/htdocs/reports
 %{_appdir}/htdocs/rpc
 %{_appdir}/htdocs/misc
-
 %{_appdir}/templates
 %dir %{_appdir}/upgrade
 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
 %{_appdir}/upgrade/[!u]*
-
 %{_smartyplugindir}
-%if %{without pear}
-%{_appdir}/include/pear
-%endif
 
 %dir %{_appdir}/include
 %{_appdir}/include/customer
+%{_appdir}/include/custom_field
 %{_appdir}/include/jpgraph
 %{_appdir}/include/workflow
 %{_appdir}/include/class.[!m]*.php
@@ -802,8 +956,10 @@ s,\$irc_password,$password,
 %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
+# saved mail copies
 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
+%attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
+%attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
 
 %files setup
 %defattr(644,root,root,755)
@@ -811,33 +967,36 @@ s,\$irc_password,$password,
 
 %files mail-queue
 %defattr(644,root,root,755)
-%{_appdir}/process_mail_queue.php
+%attr(755,root,root) %{_appdir}/process_mail_queue.php
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
 
 %files mail-download
 %defattr(644,root,root,755)
-%{_appdir}/download_emails.php
+%attr(755,root,root) %{_appdir}/download_emails.php
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
 
 %files reminder
 %defattr(644,root,root,755)
-%{_appdir}/check_reminders.php
+%attr(755,root,root) %{_appdir}/check_reminders.php
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
 
 %files monitor
 %defattr(644,root,root,755)
 %{_appdir}/include/class.monitor.php
-%{_appdir}/monitor.php
+%attr(755,root,root) %{_appdir}/monitor.php
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
 
+%files route-drafts
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_appdir}/route_drafts.php
+
 %files route-emails
 %defattr(644,root,root,755)
-%{_appdir}/route_emails.php
+%attr(755,root,root) %{_appdir}/route_emails.php
 
 %files route-notes
 %defattr(644,root,root,755)
-%{_appdir}/route_drafts.php
-%{_appdir}/route_notes.php
+%attr(755,root,root) %{_appdir}/route_notes.php
 
 %if %{with qmail}
 %files router-qmail
@@ -848,22 +1007,26 @@ s,\$irc_password,$password,
 
 %files router-postfix
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/router-postfix
 
 %files irc
 %defattr(644,root,root,755)
 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
-%{_appdir}/irc
+%attr(755,root,root) %{_sbindir}/%{name}-bot
 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
 
 %files cli
 %defattr(644,root,root,755)
 %doc eventumrc
-%attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
+%config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
 %attr(755,root,root) %{_bindir}/%{name}
 %{_appdir}/cli
 
 %files scm
 %defattr(644,root,root,755)
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
-%attr(755,root,root) %{_libdir}/scm
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
+%attr(755,root,root) %{_libdir}/process_cvs_commits
+%attr(755,root,root) %{_libdir}/process_svn_commits
+# legacy
+%ghost %{_libdir}/scm
This page took 0.092093 seconds and 4 git commands to generate.