# TODO
-# - where to put templates_c (templates cache dir)? /var/run/eventum? /var/run/php/eventum? /var/cache/eventum?
+# - 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)
-# - Smarty 2.3.0 (http://smarty.php.net)
-# - PEAR packages
# - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
# - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
# - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
# - A few other small javascript libraries
-# - Command-line Interface (misc/cli/eventum)
-# - eventum-router-qmail, eventum-router-postfix for -route-mails and -route-notes
-# - need start-stop-daemon (dpkg for now)
+# - create eventum-router-qmail, eventum-router-postfix for -route-mails and -route-notes
+# - need start-stop-daemon (from dpkg for now)
+# - use eventum user for irc bot?
+
+%bcond_with pear # build with system PEAR packages (or use bundled ones)
# snapshot: DATE
-#define _snap 20050117
+%define _snap 20050222
%if 0%{?_snap}
%define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
%define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
%endif
-%define _rel 1.74
+%define _rel 2.209
+
+%define uid 146
+%define gid 146
-Summary: Eventum Issue - a bug tracking system
+Summary: Eventum Issue / Bug tracking system
Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
Name: eventum
Version: 1.4
-Release: %{?_snap:0.%{_snap}.}%{_rel}
+Release: %{?_snap:2.%{_snap}.}%{_rel}
License: GPL
Group: Applications/WWW
Source0: %{_source}
-# Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
+# Source0-md5: 035bd8f7890260c1c058eaf1d54dcc90
Source1: %{name}-apache.conf
Source2: %{name}-mail-queue.cron
Source3: %{name}-mail-download.cron
Source6: %{name}-cvs.php
Source7: %{name}-irc.php
Source8: %{name}-irc.init
-Patch0: %{name}-rpm.patch
-Patch1: %{name}-clock-status.patch
-Patch2: %{name}-scm-encode.patch
-Patch3: %{name}-cvs-config.patch
-Patch4: %{name}-irc-config.patch
+Source9: %{name}-irc.sysconfig
+Source10: %{name}-config.php
+Patch0: %{name}-paths.patch
+Patch1: %{name}-scm-encode.patch
+Patch2: %{name}-cvs-config.patch
+Patch3: %{name}-irc-config.patch
+Patch4: %{name}-PEAR.patch
+Patch11: %{name}-scm_checkin_associated.patch
+Patch12: %{name}-mail-queue.tpl.patch
+Patch13: %{name}-maildecode.patch
+Patch14: %{name}-send-typo.patch
+Patch15: %{name}-fixes.patch
+Patch16: %{name}-rss-charset.patch
+Patch17: %{name}-scm-silence-add.patch
+Patch18: %{name}-default-TZ.patch
+Patch19: %{name}-charset-mailsubj.patch
+Patch20: %{name}-monitor-bot-process.patch
URL: http://dev.mysql.com/downloads/other/eventum/index.html
BuildRequires: rpmbuild(macros) >= 1.177
BuildRequires: sed >= 4.0
-Requires: php >= 4.1.0
+Requires: php >= 4.2.0
Requires: php-gd
Requires: php-imap
Requires: php-mysql
Requires: php-pcre
-#Requires: apache-mod_dir
-# conflict with non-confdir apache
-Conflicts: apache1 < 1.3.33-1.1
+Requires: %{name}-base = %{epoch}:%{version}-%{release}
+Requires: Smarty >= 2.6.2
+%if %{with pear}
+Requires: php-pear-Benchmark
+Requires: php-pear-DB
+Requires: php-pear-Date
+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-Text_Diff
+Requires: php-pear-XML_RPC
+%endif
+Requires: apache >= 1.3.33-2
+Requires: apache(mod_dir)
+Requires(triggerpostun): sed >= 4.0
+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 _apache1dir /etc/apache
%define _apache2dir /etc/httpd
Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
reakcji.
+%package base
+Summary: Eventum base package
+Summary(pl): Podstawowy pakiet Eventum
+Group: Applications/WWW
+
+%description base
+This package contains base directory structure for Eventum.
+
+%description base -l pl
+Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
+
%package setup
Summary: Eventum setup package
Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: crondaemon
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
%description mail-queue
Beginning with the first release of Eventum, emails are not directly
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: crondaemon
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
%description mail-download
In order for Eventum's email integration feature to work, you need to
%package reminder
Summary: Eventum Reminder System
+Summary(pl): System przypominania dla Eventum
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
Requires: crondaemon
%description reminder
This package contains the cron job.
+%description reminder -l pl
+System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
+bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
+konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
+przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
+uwa¿aæ za potrzebny.
+
+Ten pakiet zawiera zadanie dla crona.
+
%package monitor
Summary: Eventum Heartbeat Monitor
+Summary(pl): Monitor ¿ycia dla Eventum
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
+Requires: php-posix
Requires: crondaemon
%description monitor
This package contains the cron job.
+%description monitor -l pl
+Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
+chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
+Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
+do plików konfiguracyjnych.
+
+Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
+konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
+testów uprawnieñ i plików w Monitor::checkConfiguration().
+
+Ten pakiet zawiera zadanie dla crona.
+
%package route-emails
Summary: Eventum Email Routing
+Summary(pl): Przekazywanie poczty dla Eventum
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
#Requires: eventum-router
%description route-emails
replies will be automatically associated with the issue and
broadcasted to the entire notification list.
+%description route-emails -l pl
+Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
+w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
+postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
+issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
+u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
+Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
+rozprowadzane do ca³ej listy og³oszeniowej.
+
%package route-notes
Summary: Eventum Note Routing
+Summary(pl): Przekazywanie notatek dla Eventum
Group: Applications/WWW
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: php4 >= 4.1.0
+Requires: php >= 4.1.0
#Requires: eventum-router
%description route-notes
and those replies will be automatically associated with the issue and
broadcasted to the notification list staff members.
+%description route-notes -l pl
+Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
+w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
+postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
+note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
+u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
+pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
+spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
+
%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: php4 >= 4.1.0
+Requires: php >= 4.1.0
+Requires: php-sockets
# FIXME just need start-stop-daemon
Requires: dpkg
appropriate preferences, like IRC server and channel that the bot
should join.
+%description irc -l pl
+IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
+zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
+uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
+nastêpuj±cych zdarzeniach:
+- nowych sprawach
+- zablokowanych listach
+- sprawach, dla których zmieni³a siê lista powi±zañ
+
+UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
+kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
+
+%package cli
+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: php-cli
+Requires: php-curl
+Requires: php-xml
+Requires: php-pear-XML_RPC
+
+%description cli
+The Eventum command-line interface allows you to access most of the
+features of the web interface straight from your command shell.
+
+%description cli -l pl
+Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
+funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
+
%package scm
Summary: Eventum SCM integration
Summary(pl): Integracja SCM dla Eventum
Group: Applications/WWW
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: php4 >= 4.1.0
+Requires: %{name}-base = %{epoch}:%{version}-%{release}
+Requires: php >= 4.1.0
%description scm
This feature allows your software development teams to integrate your
compatible with pretty much any SCM system, such as CVS.
For installation see
-/eventum/help.php?topic=scm_integration_installation .
+</eventum/help.php?topic=scm_integration_installation>.
%description scm -l pl
Ten pakiet pozwala zespo³om programistów na integracjê systemu
prawie ka¿dym systemem SCM, jak np. CVS.
Szczegó³y na temat instalacji mo¿na przeczytaæ pod
-/eventum/help.php?topic=scm_integration_installation .
+</eventum/help.php?topic=scm_integration_installation>.
%prep
%setup -q %{?_snap:-n %{name}-%{_snap}}
-%patch0 -p1
+# undos the source
+find . -type f -print0 | xargs -0 sed -i -e 's,
+$,,'
+
+# packaging
+%patch0 -p1 -b .paths
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
+%{?with_pear:%patch4 -p1 -b .PEAR}
+
+# bug fixes.
+%patch11 -p1
+#%patch12 -p1
+#%patch13 -p1
+#%patch14 -p1
+#%patch15 -p1
+#%patch16 -p1
+#%patch17 -p1
+#%patch18 -p1
+%patch19 -p1
+%patch20 -p1
+
+# 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"),
+'
+sed -i -e '
+ s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
+' misc/download_emails.php
-%build
+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"),
+'
+
+rm -f */*~ */*/*~
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,cron.d},%{_appdir}/{locks,templates_c},/var/log}
-
-cp -a . $RPM_BUILD_ROOT%{_appdir}
-
-> $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
-
-sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
-
+install -d \
+ $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
+ $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
+ $RPM_BUILD_ROOT/var/{run,log,cache}/%{name} \
+ $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc} \
+
+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/*.php $RPM_BUILD_ROOT%{_appdir}/include
+cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
+
+# 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 's,/usr/local/bin/php,/usr/bin/php4,' misc/cli/eventum \
+ > $RPM_BUILD_ROOT%{_bindir}/%{name}
+cp -f misc/cli/eventumrc_example eventumrc
+
+# scm
+echo '#!/usr/bin/php4 -q' > %{name}-scm
+cat misc/scm/process_cvs_commits.php >> %{name}-scm
+install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
+
+# 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%{_appdir}/include/private_key.php
+' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
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
-# in conf
-mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
-ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
-ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
-mv $RPM_BUILD_ROOT%{_appdir}/include/private_key.php $RPM_BUILD_ROOT%{_sysconfdir}
-ln -s %{_sysconfdir}/private_key.php $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
+# config
+> $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
+mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
-# log directory
-mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
-ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
+# sample, not used in eventum
+rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
+
+%if %{with pear}
+# provided by PEAR
+rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
+%endif
-# in doc
-rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
-rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
+# 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 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
+ $RPM_BUILD_ROOT%{_smartyplugindir}
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+%addusertogroup http %{name}
+
%post
# apache1
-if [ -f %{_apache1dir}/apache.conf ]; then
+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
# check if the package is configured.
-if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
+if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
%banner %{name} -e <<EOF
You haven't yet configured Eventum!
fi
# apache2
if [ -d %{_apache2dir}/httpd.conf ]; then
- rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
+ 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
fi
+%postun
+# nuke cache
+rm -f /var/cache/eventum/*.php
+
+%pre base
+%groupadd -P %{name}-base %{name}
+%useradd -P %{name}-base -d %{_appdir} -g %{name} %{name} -c "Eventum User"
+
+%postun base
+if [ "$1" = "0" ]; then
+ %userremove %{name}
+ %groupremove %{name}
+fi
+
%post setup
-chmod 660 %{_sysconfdir}/{config.inc,private_key}.php
-chown root:http %{_sysconfdir}/{config.inc,private_key}.php
+chmod 660 %{_sysconfdir}/{config,private_key}.php
+chown root:http %{_sysconfdir}/{config,private_key}.php
%postun setup
if [ "$1" = "0" ]; then
- chmod 640 %{_sysconfdir}/{config.inc,private_key}.php
- chown root:http %{_sysconfdir}/{config.inc,private_key}.php
+ chmod 640 %{_sysconfdir}/{config,private_key}.php
+ chown root:http %{_sysconfdir}/{config,private_key}.php
fi
+%triggerpostun -- eventum < 1.4-2.160
+cp -f %{_sysconfdir}/config.php{,.rpmsave}
+# very loose trigger
+sed -i -e '
+/config.php/,/SQL variables/d;/_LOG/d;/APP_VERSION/d;/APP_BENCHMARK/,/content-type:/d
+' %{_sysconfdir}/config.php
+
+%triggerpostun -- eventum < 1.4-2.174
+cp -f %{_sysconfdir}/apache.conf{,.rpmsave}
+# loosely fix htdocs directory
+sed -i -e '
+s,%{_appdir},%{_appdir}/htdocs,
+' %{_sysconfdir}/apache.conf
+
+%triggerpostun mail-download -- eventum-mail-download < 1.4-2.20050222.2.200
+sed -i -e 's,%{_appdir}/misc,%{_appdir},' /etc/cron.d/eventum-mail-download
+touch /etc/cron.d/eventum-mail-download
+
+%triggerpostun mail-queue -- eventum-mail-queue < 1.4-2.20050222.2.200
+sed -i -e 's,%{_appdir}/misc,%{_appdir},' /etc/cron.d/eventum-mail-queue
+touch /etc/cron.d/eventum-mail-queue
+
+%triggerpostun monitor -- eventum-monitor < 1.4-2.20050222.2.200
+sed -i -e 's,%{_appdir}/misc,%{_appdir},' /etc/cron.d/eventum-monitor
+touch /etc/cron.d/eventum-monitor
+
+%triggerpostun reminder -- eventum-reminder < 1.4-2.20050222.2.200
+sed -i -e 's,%{_appdir}/misc,%{_appdir},' /etc/cron.d/eventum-reminder
+touch /etc/cron.d/eventum-reminder
+
+%triggerpostun -- eventum < 1.4-2.20050222.2.208
+chgrp eventum %{_sysconfdir}/{core,config,private_key,setup}.php
+
+%triggerpostun irc -- eventum-irc < 1.4-2.20050222.2.208
+chgrp eventum %{_sysconfdir}/irc.php
+
%files
%defattr(644,root,root,755)
-%doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
-%attr(751,root,root) %dir %{_sysconfdir}
+%doc ChangeLog FAQ INSTALL README UPGRADE
+%doc misc/upgrade 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,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
-%attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.conf.php
+%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
+
+%dir %attr(731,root,eventum) /var/log/%{name}
+%attr(620,root,eventum) %ghost /var/log/%{name}/*
+
+%dir %{_appdir}/htdocs
+%{_appdir}/htdocs/*.php
+%{_appdir}/htdocs/css
+%{_appdir}/htdocs/customer
+%{_appdir}/htdocs/images
+%{_appdir}/htdocs/js
+%{_appdir}/htdocs/manage
+%{_appdir}/htdocs/reports
+%{_appdir}/htdocs/rpc
+%{_appdir}/htdocs/misc
-%dir %attr(731,root,http) /var/log/%{name}
-%attr(620,root,http) %ghost /var/log/%{name}/*
-
-%dir %{_appdir}
-%{_appdir}/*.php
-%{_appdir}/css
-%{_appdir}/customer
-%{_appdir}/images
-%{_appdir}/js
-%{_appdir}/logs
-%{_appdir}/manage
-%{_appdir}/reports
-%{_appdir}/rpc
%{_appdir}/templates
-%dir %attr(730,root,http) %{_appdir}/locks
+%{_smartyplugindir}/*
+%if %{without pear}
+%{_appdir}/include/pear
+%endif
%dir %{_appdir}/include
%{_appdir}/include/customer
%{_appdir}/include/jpgraph
-%{_appdir}/include/pear
-%{_appdir}/include/Smarty
%{_appdir}/include/workflow
-%{_appdir}/include/*.php
-
-%dir %attr(730,root,http) %{_appdir}/templates_c
-
-%dir %{_appdir}/misc
-%{_appdir}/misc/cli
-%{_appdir}/misc/blank.html
+%{_appdir}/include/class.[^m]*.php
+%{_appdir}/include/class.mail.php
+%{_appdir}/include/class.mail_queue.php
+%{_appdir}/include/class.mime_helper.php
+%{_appdir}/include/class.misc.php
+%{_appdir}/include/db_access.php
+%{_appdir}/include/jsrsServer.inc.php
+
+%dir %attr(730,root,eventum) /var/run/%{name}
+%dir %attr(730,root,eventum) /var/cache/%{name}
+
+%files base
+%defattr(644,root,root,755)
+%attr(751,root,root) %dir %{_sysconfdir}
+%dir %{_libdir}
+%dir %{_appdir}
%files setup
%defattr(644,root,root,755)
-%{_appdir}/setup
+%{_appdir}/htdocs/setup
%files mail-queue
%defattr(644,root,root,755)
-%{_appdir}/misc/process_mail_queue.php
+%{_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}/misc/download_emails.php
+%{_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}/misc/check_reminders.php
+%{_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}/misc/monitor.php
+%{_appdir}/include/class.monitor.php
+%{_appdir}/monitor.php
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
%files route-emails
%defattr(644,root,root,755)
-%{_appdir}/misc/route_emails.php
+%{_appdir}/route_emails.php
%files route-notes
%defattr(644,root,root,755)
-%{_appdir}/misc/route_drafts.php
-%{_appdir}/misc/route_notes.php
+%{_appdir}/route_drafts.php
+%{_appdir}/route_notes.php
%files irc
%defattr(644,root,root,755)
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
-%{_appdir}/misc/irc
+%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(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
+%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
-%dir %{_appdir}/misc/scm
-%{_appdir}/misc/scm/process_cvs_commits.php
+%attr(755,root,root) %{_libdir}/scm