2 # - system pear is incompatible, at least pear DB class seems broke Eventum
3 # - php5 is not tested, but not placing hard conflict on it, as it prevents php4 & php coinstallation
4 # - discard bundled packages (from INSTALL):
5 # - JpGraph 1.5.3 (last GPL version)
6 # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
7 # - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
8 # - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
9 # - A few other small javascript libraries
10 # - need start-stop-daemon (from dpkg for now)
12 %bcond_with pear # build with system PEAR packages (or use bundled ones)
18 #define _snap 20050227
21 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
23 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
28 Summary: Eventum Issue / Bug tracking system
29 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
32 Release: 0.%{?_snap:%{_snap}.}%{_rel}
34 Group: Applications/WWW
36 # Source0-md5: d326ef39b52001efcbbc0ae8db5454a5
37 Source1: %{name}-apache.conf
38 Source2: %{name}-mail-queue.cron
39 Source3: %{name}-mail-download.cron
40 Source4: %{name}-reminder.cron
41 Source5: %{name}-monitor.cron
42 Source6: %{name}-cvs.php
43 Source7: %{name}-irc.php
44 Source8: %{name}-irc.init
45 Source9: %{name}-irc.sysconfig
46 Source10: %{name}-config.php
47 Source11: %{name}-router-qmail.sh
48 Source12: http://dev.mysql.com/common/favicon.ico
49 Patch0: %{name}-paths.patch
50 Patch1: %{name}-cvs-config.patch
51 Patch2: %{name}-irc-config.patch
52 Patch3: %{name}-PEAR.patch
53 Patch4: %{name}-db-20050227.patch
54 Patch10: %{name}-charset-recent-activity.patch
55 Patch11: http://glen.alkohol.ee/pld/eventum-cli-rpc-base64.patch
56 Patch12: http://glen.alkohol.ee/pld/eventum-send-height.patch
57 Patch13: http://glen.alkohol.ee/pld/eventum-reply-subject.patch
58 Patch14: http://glen.alkohol.ee/pld/eventum-rss-updates.patch
59 Patch15: http://glen.alkohol.ee/pld/eventum-opera.patch
60 Patch16: eventum-lf.patch
61 Patch17: eventum-iss-ass-fix.patch
62 Patch18: eventum-iss-close.patch
63 URL: http://dev.mysql.com/downloads/other/eventum/
64 BuildRequires: rpmbuild(macros) >= 1.177
65 BuildRequires: sed >= 4.0
66 Requires: php >= 4.2.0
71 Requires: %{name}-base = %{epoch}:%{version}-%{release}
72 Requires: Smarty >= 2.6.2
74 Requires: php-pear-Benchmark
76 Requires: php-pear-Date
77 Requires: php-pear-HTTP_Request
78 Requires: php-pear-Mail
79 Requires: php-pear-Math_Stats
80 Requires: php-pear-Net_DIME
81 Requires: php-pear-Net_POP3
82 Requires: php-pear-Net_SMTP
83 Requires: php-pear-Net_SmartIRC
84 Requires: php-pear-Net_Socket
85 Requires: php-pear-Net_URL
86 Requires: php-pear-Net_UserAgent_Detect
87 Requires: php-pear-PEAR
88 Requires: php-pear-Text_Diff
89 Requires: php-pear-XML_RPC
91 Requires: apache >= 1.3.33-2
92 Requires: apache(mod_dir)
93 Requires(triggerpostun): sed >= 4.0
95 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 %define _sysconfdir /etc/%{name}
98 %define _libdir %{_prefix}/%{_lib}/%{name}
99 %define _appdir %{_datadir}/%{name}
100 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
102 %define _apache1dir /etc/apache
103 %define _apache2dir /etc/httpd
106 Eventum is a user-friendly and flexible issue tracking system that can
107 be used by a support department to track incoming technical support
108 requests, or by a software development team to quickly organize tasks
109 and bugs. Eventum is used by the MySQL AB Technical Support team, and
110 has allowed us to dramatically improve our response times.
113 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
114 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
115 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
116 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
117 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
121 Summary: Eventum base package
122 Summary(pl): Podstawowy pakiet Eventum
123 Group: Applications/WWW
126 This package contains base directory structure for Eventum.
128 %description base -l pl
129 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
132 Summary: Eventum setup package
133 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
134 Group: Applications/WWW
135 PreReq: %{name} = %{epoch}:%{version}-%{release}
138 Install this package to configure initial Eventum installation. You
139 should uninstall this package when you're done, as it considered
140 insecure to keep the setup files in place.
142 %description setup -l pl
143 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
144 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
145 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
148 Summary: Eventum mail queue process
149 Summary(pl): Przetwarzanie kolejki poczty Eventum
150 Group: Applications/WWW
151 Requires: %{name} = %{epoch}:%{version}-%{release}
153 Requires: php >= 4.1.0
155 %description mail-queue
156 Beginning with the first release of Eventum, emails are not directly
157 sent out from the various scripts, but rather added to a mail queue
158 table that is processed by a cron job. If an email cannot be sent, it
159 will be marked as such in the mail queue log, and the cron job script
160 will re-try to send it again the next time it runs.
162 This package contains the cron job.
164 %description mail-queue -l pl
165 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
166 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
167 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
168 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
171 Ten pakiet zawiera zadanie dla crona.
173 %package mail-download
174 Summary: Eventum email download
175 Summary(pl): ¦ci±ganie poczty Eventum
176 Group: Applications/WWW
177 Requires: %{name} = %{epoch}:%{version}-%{release}
179 Requires: php >= 4.1.0
181 %description mail-download
182 In order for Eventum's email integration feature to work, you need to
183 setup a cron job to run the script every so often.
185 This package contains the cron job.
187 %description mail-download -l pl
188 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
189 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
192 Ten pakiet zawiera zadanie dla crona.
195 Summary: Eventum Reminder System
196 Summary(pl): System przypominania dla Eventum
197 Group: Applications/WWW
198 Requires: %{name} = %{epoch}:%{version}-%{release}
199 Requires: php >= 4.1.0
202 %description reminder
203 The reminder system was designed with the objective as serving as a
204 safe net for issues that need attention. Depending on what
205 configuration you create, you may have several reminders (or alerts)
206 be sent out whenever an issue needs attention, for whatever parameter
207 you may deem necessary.
209 This package contains the cron job.
211 %description reminder -l pl
212 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
213 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
214 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
215 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
218 Ten pakiet zawiera zadanie dla crona.
221 Summary: Eventum Heartbeat Monitor
222 Summary(pl): Monitor ¿ycia dla Eventum
223 Group: Applications/WWW
224 Requires: %{name} = %{epoch}:%{version}-%{release}
225 Requires: php >= 4.1.0
230 The heartbeat monitor is a feature designed for the administrator that
231 wants to be alerted whenever a common problem in Eventum is detected,
232 like the database server not being available anymore, or maybe when
233 the recommended permissions for certain configuration files are
236 Please note that before running the heartbeat monitor, you may need to
237 customize some of the checks to be appropriate for your own system,
238 particularly the permission and file checks on
239 Monitor::checkConfiguration().
241 This package contains the cron job.
243 %description monitor -l pl
244 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
245 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
246 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
247 do plików konfiguracyjnych.
249 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
250 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
251 testów uprawnieñ i plików w Monitor::checkConfiguration().
253 Ten pakiet zawiera zadanie dla crona.
255 %package route-emails
256 Summary: Eventum Email Routing
257 Summary(pl): Przekazywanie poczty dla Eventum
258 Group: Applications/WWW
259 Requires: %{name} = %{epoch}:%{version}-%{release}
260 Requires: php >= 4.1.0
261 Requires: eventum(router)
263 %description route-emails
264 The email routing feature is used to automatically associate a thread
265 of emails into an Eventum issue. By setting up qmail (or even postfix)
266 to deliver emails sent to a specific address (usually
267 issue-<number>@<domain>) to the above script, users are able to use
268 their email clients to reply to emails coming from Eventum, and those
269 replies will be automatically associated with the issue and
270 broadcasted to the entire notification list.
272 %description route-emails -l pl
273 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
274 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
275 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
276 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
277 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
278 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
279 rozprowadzane do ca³ej listy og³oszeniowej.
282 Summary: Eventum Note Routing
283 Summary(pl): Przekazywanie notatek dla Eventum
284 Group: Applications/WWW
285 Requires: %{name} = %{epoch}:%{version}-%{release}
286 Requires: php >= 4.1.0
287 Requires: eventum(router)
289 %description route-notes
290 The note routing feature is used to automatically associate a thread
291 of notes into an Eventum issue. By setting up qmail (or even postfix)
292 to deliver emails sent to a specific address (usually
293 note-<number>@<domain>) to the above script, users are able to use
294 their email clients to reply to internal notes coming from Eventum,
295 and those replies will be automatically associated with the issue and
296 broadcasted to the notification list staff members.
298 %description route-notes -l pl
299 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
300 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
301 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
302 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
303 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
304 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
305 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
307 %package router-qmail
308 Summary: Eventum Mail Routing - qmail
309 Summary(pl): Przekazywanie poczty Eventum - qmail
310 Group: Applications/Mail
311 Requires: %{name} = %{epoch}:%{version}-%{release}
312 Requires: qmail >= 1.03
313 Provides: eventum(router)
314 Obsoletes: eventum(router)
316 %description router-qmail
317 This package provides way of routing notes and emails back to Eventum
320 %description router-qmail -l pl
321 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
324 %package router-postfix
325 Summary: Eventum Mail Routing - Postfix
326 Summary(pl): Przekazywanie poczty Eventum - Postfix
327 Group: Applications/Mail
328 Requires: %{name} = %{epoch}:%{version}-%{release}
330 Provides: eventum(router)
331 Obsoletes: eventum(router)
333 %description router-postfix
334 This package provides way of routing notes and emails back to Eventum
337 %description router-postfix -l pl
338 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
342 Summary: Eventum IRC Notification Bot
343 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
344 Group: Applications/WWW
345 Requires: %{name} = %{epoch}:%{version}-%{release}
346 Requires: php >= 4.1.0
347 Requires: php-sockets
348 Requires: rc-scripts >= 0.4.0.18
351 The IRC notification bot is a nice feature for remote teams that want
352 to handle issues and want to have a quick and easy way to get simple
353 notifications. Right now the bot notifies of the following actions:
356 - Issues that got their assignment list changed
358 NOTE: You will need to manually edit the bot.php script to set your
359 appropriate preferences, like IRC server and channel that the bot
362 %description irc -l pl
363 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
364 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
365 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
366 nastêpuj±cych zdarzeniach:
368 - zablokowanych listach
369 - sprawach, dla których zmieni³a siê lista powi±zañ
371 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
372 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
375 Summary: Eventum command-line interface
376 Summary(pl): Interfejs linii poleceñ dla Eventum
377 Group: Applications/WWW
378 Requires: %{name}-base = %{epoch}:%{version}-%{release}
379 Requires: php >= 4.1.0
383 Requires: php-pear-XML_RPC
386 The Eventum command-line interface allows you to access most of the
387 features of the web interface straight from your command shell.
389 %description cli -l pl
390 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
391 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
394 Summary: Eventum SCM integration
395 Summary(pl): Integracja SCM dla Eventum
396 Group: Applications/WWW
397 Requires: %{name}-base = %{epoch}:%{version}-%{release}
398 Requires: php >= 4.1.0
401 This feature allows your software development teams to integrate your
402 Source Control Management system with your Issue Tracking System.
404 The integration is implemented in such a way that it will be forward
405 compatible with pretty much any SCM system, such as CVS.
408 </eventum/help.php?topic=scm_integration_installation>.
410 %description scm -l pl
411 Ten pakiet pozwala zespo³om programistów na integracjê systemu
412 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
415 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
416 prawie ka¿dym systemem SCM, jak np. CVS.
418 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
419 </eventum/help.php?topic=scm_integration_installation>.
422 %setup -q %{?_snap:-n %{name}-%{_snap}}
424 find . -type f -print0 | xargs -0 sed -i -e 's,
428 %patch0 -p1 -b .paths
431 %{?with_pear:%patch3 -p1 -b .PEAR}
445 # replace in remaining scripts config.inc.php to system one
446 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
447 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
450 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
451 ' misc/download_emails.php
453 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
454 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
460 rm -rf $RPM_BUILD_ROOT
462 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
463 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
464 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
465 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
467 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
468 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
469 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
470 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
471 cp -a templates $RPM_BUILD_ROOT%{_appdir}
472 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
473 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
474 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
475 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
477 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
480 install -d $RPM_BUILD_ROOT%{_appdir}/cli
481 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
482 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
483 sed -e 's,/usr/local/bin/php,/usr/bin/php4,' misc/cli/eventum \
484 > $RPM_BUILD_ROOT%{_bindir}/%{name}
485 cp -f misc/cli/eventumrc_example eventumrc
488 echo '#!/usr/bin/php4 -q' > %{name}-scm
489 cat misc/scm/process_cvs_commits.php >> %{name}-scm
490 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
493 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
494 # change private key, so we can easily grep
496 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
497 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
499 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
500 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
501 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
502 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
503 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
504 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
505 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
506 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
507 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
508 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
509 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
512 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
513 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
515 # sample, not used in eventum
516 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
520 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
524 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
525 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
526 # These plugins are not in Smarty package (Smarty-2.6.2-3)
527 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
528 $RPM_BUILD_ROOT%{_smartyplugindir}
531 d=$RPM_BUILD_ROOT/var/lib/%{name}
532 echo 'root' > $d/.qmail
533 echo 'root' > $d/.qmail-default
534 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
535 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
536 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
537 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
540 rm -rf $RPM_BUILD_ROOT
543 %addusertogroup http %{name}
547 if [ -d %{_apache1dir}/conf.d ]; then
548 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
549 if [ -f /var/lock/subsys/apache ]; then
550 /etc/rc.d/init.d/apache restart 1>&2
554 if [ -d %{_apache2dir}/httpd.conf ]; then
555 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
556 if [ -f /var/lock/subsys/httpd ]; then
557 /etc/rc.d/init.d/httpd restart 1>&2
561 # check if the package is configured.
562 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
563 %banner %{name} -e <<EOF
565 You haven't yet configured Eventum!
567 Install %{name}-setup and open up http://yourserver/eventum/
568 -- that will help you setup initial config.
570 when have configured Eventum, please uninstall the setup package,
571 so that %{name}-setup is able to secure your Eventum installation.
576 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
577 %banner %{name} -e <<EOF
579 You have default private key installed!
581 Install %{name}-setup and open up http://yourserver/eventum/setup/
582 -- that will help you setup initial config.
584 when have configured Eventum, please uninstall the setup package,
585 so that %{name}-setup is able to secure your Eventum installation.
588 elif [ -d %{_appdir}/setup ]; then
589 %banner %{name} -e <<EOF
591 If you have have configured Eventum, please uninstall the setup package,
592 so that %{name}-setup is able to secure your Eventum installation.
597 # nuke Smarty templates cache after upgrade
598 rm -f /var/cache/eventum/*.php
601 if [ "$1" = "0" ]; then
603 if [ -f %{_apache1dir}/apache.conf ]; then
604 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
605 if [ -f /var/lock/subsys/apache ]; then
606 /etc/rc.d/init.d/apache restart 1>&2
610 if [ -d %{_apache2dir}/httpd.conf ]; then
611 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
612 if [ -f /var/lock/subsys/httpd ]; then
613 /etc/rc.d/init.d/httpd restart 1>&2
620 rm -f /var/cache/eventum/*.php
623 %groupadd -P %{name}-base %{name}
624 %useradd -P %{name}-base -d /var/lib/%{name} -g %{name} %{name} -c "Eventum User"
627 if [ "$1" = "0" ]; then
633 CF=/etc/qmail/control/virtualdomains
634 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
635 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
636 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
638 echo "#${FQDN}:%{name}" >> $CF
640 %banner %{name}-qmail -e <<EOF
642 Added "#${FQDN}:%{name}" to $CF,
643 Please verify that it is correct and restart qmail:
644 # service qmail reload
646 Consult qmail-send(8) for more information on virtualdomains.
652 if [ "$1" = "0" ]; then
653 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
657 chmod 660 %{_sysconfdir}/{config,private_key}.php
658 chown root:eventum %{_sysconfdir}/{config,private_key}.php
661 if [ "$1" = "0" ]; then
662 chmod 640 %{_sysconfdir}/{config,private_key}.php
663 chown root:eventum %{_sysconfdir}/{config,private_key}.php
666 %triggerpostun base -- eventum-base < 1.4-2.20050222.212
667 if [ "`getent passwd %{name} | cut -d: -f6`" = "%{_appdir}" ]; then
668 /usr/sbin/usermod -d /var/lib/%{name} %{name}
671 %triggerpostun -- eventum < 1.5-0.240
672 scriptdir=%{_appdir}/upgrade/v1.4_to_1.5
673 %banner %{name}-trigger-1.5 -e <<-EOF
675 Running eventum upgrade scripts to 1.5 in $scriptdir
676 These will fail if your eventum user doesn't have ALTER privilege to database.
681 /usr/bin/php4 -q $scriptdir/database_changes.php || {
682 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
685 %triggerpostun -- eventum < 1.5.1-0.257
686 scriptdir=%{_appdir}/upgrade/v1.5_to_v1.5.1
687 %banner %{name}-trigger-1.5.1 -e <<-EOF
689 Running eventum upgrade scripts to 1.5.1 in $scriptdir
690 These will fail if your eventum user doesn't have ALTER privilege to database.
695 /usr/bin/php4 -q $scriptdir/database_changes.php || {
696 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
700 %defattr(644,root,root,755)
701 %doc ChangeLog FAQ INSTALL README UPGRADE
702 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
703 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
704 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
705 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
706 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
707 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
709 %dir %attr(731,root,eventum) /var/log/%{name}
710 %attr(620,root,eventum) %ghost /var/log/%{name}/*
712 %dir %{_appdir}/htdocs
713 %{_appdir}/htdocs/*.php
714 %{_appdir}/htdocs/*.ico
715 %{_appdir}/htdocs/css
716 %{_appdir}/htdocs/customer
717 %{_appdir}/htdocs/images
719 %{_appdir}/htdocs/manage
720 %{_appdir}/htdocs/reports
721 %{_appdir}/htdocs/rpc
722 %{_appdir}/htdocs/misc
727 %{_smartyplugindir}/*
729 %{_appdir}/include/pear
732 %dir %{_appdir}/include
733 %{_appdir}/include/customer
734 %{_appdir}/include/jpgraph
735 %{_appdir}/include/workflow
736 %{_appdir}/include/class.[!m]*.php
737 %{_appdir}/include/class.mail.php
738 %{_appdir}/include/class.mail_queue.php
739 %{_appdir}/include/class.mime_helper.php
740 %{_appdir}/include/class.misc.php
741 %{_appdir}/include/db_access.php
742 %{_appdir}/include/jsrsServer.inc.php
744 %dir %attr(730,root,eventum) /var/run/%{name}
745 %dir %attr(730,root,eventum) /var/cache/%{name}
748 %defattr(644,root,root,755)
749 %attr(751,root,root) %dir %{_sysconfdir}
752 # qmail will ignore user, if it's home directory is not owned
753 %attr(750,eventum,eventum) %dir /var/lib/%{name}
756 %defattr(644,root,root,755)
757 %{_appdir}/htdocs/setup
760 %defattr(644,root,root,755)
761 %{_appdir}/process_mail_queue.php
762 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
765 %defattr(644,root,root,755)
766 %{_appdir}/download_emails.php
767 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
770 %defattr(644,root,root,755)
771 %{_appdir}/check_reminders.php
772 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
775 %defattr(644,root,root,755)
776 %{_appdir}/include/class.monitor.php
777 %{_appdir}/monitor.php
778 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
781 %defattr(644,root,root,755)
782 %{_appdir}/route_emails.php
785 %defattr(644,root,root,755)
786 %{_appdir}/route_drafts.php
787 %{_appdir}/route_notes.php
790 %defattr(644,root,root,755)
791 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
792 %attr(755,root,root) %{_libdir}/router-qmail
794 %files router-postfix
795 %defattr(644,root,root,755)
798 %defattr(644,root,root,755)
799 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
800 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
802 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
805 %defattr(644,root,root,755)
807 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
808 %attr(755,root,root) %{_bindir}/%{name}
812 %defattr(644,root,root,755)
813 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
814 %attr(755,root,root) %{_libdir}/scm