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 # Source12-md5: 858be0130832da4144c08d4b59116411
50 Patch0: %{name}-paths.patch
51 Patch1: %{name}-cvs-config.patch
52 Patch2: %{name}-irc-config.patch
53 Patch3: %{name}-PEAR.patch
54 Patch4: %{name}-db-20050227.patch
55 Patch10: %{name}-charset-recent-activity.patch
56 Patch11: http://glen.alkohol.ee/pld/eventum-cli-rpc-base64.patch
57 Patch12: http://glen.alkohol.ee/pld/eventum-send-height.patch
58 Patch13: http://glen.alkohol.ee/pld/eventum-reply-subject.patch
59 Patch14: http://glen.alkohol.ee/pld/eventum-rss-updates.patch
60 Patch15: http://glen.alkohol.ee/pld/eventum-opera.patch
61 Patch16: eventum-lf.patch
62 Patch17: eventum-iss-ass-fix.patch
63 Patch18: eventum-iss-close.patch
64 URL: http://dev.mysql.com/downloads/other/eventum/
65 BuildRequires: rpmbuild(macros) >= 1.177
66 BuildRequires: sed >= 4.0
67 Requires: php >= 4.2.0
72 Requires: %{name}-base = %{epoch}:%{version}-%{release}
73 Requires: Smarty >= 2.6.2
75 Requires: php-pear-Benchmark
77 Requires: php-pear-Date
78 Requires: php-pear-HTTP_Request
79 Requires: php-pear-Mail
80 Requires: php-pear-Math_Stats
81 Requires: php-pear-Net_DIME
82 Requires: php-pear-Net_POP3
83 Requires: php-pear-Net_SMTP
84 Requires: php-pear-Net_SmartIRC
85 Requires: php-pear-Net_Socket
86 Requires: php-pear-Net_URL
87 Requires: php-pear-Net_UserAgent_Detect
88 Requires: php-pear-PEAR
89 Requires: php-pear-Text_Diff
90 Requires: php-pear-XML_RPC
92 Requires: apache >= 1.3.33-2
93 Requires: apache(mod_dir)
94 Requires(triggerpostun): sed >= 4.0
96 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
98 %define _sysconfdir /etc/%{name}
99 %define _libdir %{_prefix}/%{_lib}/%{name}
100 %define _appdir %{_datadir}/%{name}
101 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
103 %define _apache1dir /etc/apache
104 %define _apache2dir /etc/httpd
107 Eventum is a user-friendly and flexible issue tracking system that can
108 be used by a support department to track incoming technical support
109 requests, or by a software development team to quickly organize tasks
110 and bugs. Eventum is used by the MySQL AB Technical Support team, and
111 has allowed us to dramatically improve our response times.
114 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
115 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
116 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
117 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
118 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
122 Summary: Eventum base package
123 Summary(pl): Podstawowy pakiet Eventum
124 Group: Applications/WWW
127 This package contains base directory structure for Eventum.
129 %description base -l pl
130 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
133 Summary: Eventum setup package
134 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
135 Group: Applications/WWW
136 PreReq: %{name} = %{epoch}:%{version}-%{release}
139 Install this package to configure initial Eventum installation. You
140 should uninstall this package when you're done, as it considered
141 insecure to keep the setup files in place.
143 %description setup -l pl
144 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
145 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
146 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
149 Summary: Eventum mail queue process
150 Summary(pl): Przetwarzanie kolejki poczty Eventum
151 Group: Applications/WWW
152 Requires: %{name} = %{epoch}:%{version}-%{release}
154 Requires: php >= 4.1.0
156 %description mail-queue
157 Beginning with the first release of Eventum, emails are not directly
158 sent out from the various scripts, but rather added to a mail queue
159 table that is processed by a cron job. If an email cannot be sent, it
160 will be marked as such in the mail queue log, and the cron job script
161 will re-try to send it again the next time it runs.
163 This package contains the cron job.
165 %description mail-queue -l pl
166 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
167 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
168 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
169 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
172 Ten pakiet zawiera zadanie dla crona.
174 %package mail-download
175 Summary: Eventum email download
176 Summary(pl): ¦ci±ganie poczty Eventum
177 Group: Applications/WWW
178 Requires: %{name} = %{epoch}:%{version}-%{release}
180 Requires: php >= 4.1.0
182 %description mail-download
183 In order for Eventum's email integration feature to work, you need to
184 setup a cron job to run the script every so often.
186 This package contains the cron job.
188 %description mail-download -l pl
189 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
190 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
193 Ten pakiet zawiera zadanie dla crona.
196 Summary: Eventum Reminder System
197 Summary(pl): System przypominania dla Eventum
198 Group: Applications/WWW
199 Requires: %{name} = %{epoch}:%{version}-%{release}
200 Requires: php >= 4.1.0
203 %description reminder
204 The reminder system was designed with the objective as serving as a
205 safe net for issues that need attention. Depending on what
206 configuration you create, you may have several reminders (or alerts)
207 be sent out whenever an issue needs attention, for whatever parameter
208 you may deem necessary.
210 This package contains the cron job.
212 %description reminder -l pl
213 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
214 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
215 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
216 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
219 Ten pakiet zawiera zadanie dla crona.
222 Summary: Eventum Heartbeat Monitor
223 Summary(pl): Monitor ¿ycia dla Eventum
224 Group: Applications/WWW
225 Requires: %{name} = %{epoch}:%{version}-%{release}
226 Requires: php >= 4.1.0
231 The heartbeat monitor is a feature designed for the administrator that
232 wants to be alerted whenever a common problem in Eventum is detected,
233 like the database server not being available anymore, or maybe when
234 the recommended permissions for certain configuration files are
237 Please note that before running the heartbeat monitor, you may need to
238 customize some of the checks to be appropriate for your own system,
239 particularly the permission and file checks on
240 Monitor::checkConfiguration().
242 This package contains the cron job.
244 %description monitor -l pl
245 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
246 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
247 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
248 do plików konfiguracyjnych.
250 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
251 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
252 testów uprawnieñ i plików w Monitor::checkConfiguration().
254 Ten pakiet zawiera zadanie dla crona.
256 %package route-emails
257 Summary: Eventum Email Routing
258 Summary(pl): Przekazywanie poczty dla Eventum
259 Group: Applications/WWW
260 Requires: %{name} = %{epoch}:%{version}-%{release}
261 Requires: php >= 4.1.0
262 Requires: eventum(router)
264 %description route-emails
265 The email routing feature is used to automatically associate a thread
266 of emails into an Eventum issue. By setting up qmail (or even postfix)
267 to deliver emails sent to a specific address (usually
268 issue-<number>@<domain>) to the above script, users are able to use
269 their email clients to reply to emails coming from Eventum, and those
270 replies will be automatically associated with the issue and
271 broadcasted to the entire notification list.
273 %description route-emails -l pl
274 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
275 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
276 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
277 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
278 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
279 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
280 rozprowadzane do ca³ej listy og³oszeniowej.
283 Summary: Eventum Note Routing
284 Summary(pl): Przekazywanie notatek dla Eventum
285 Group: Applications/WWW
286 Requires: %{name} = %{epoch}:%{version}-%{release}
287 Requires: php >= 4.1.0
288 Requires: eventum(router)
290 %description route-notes
291 The note routing feature is used to automatically associate a thread
292 of notes into an Eventum issue. By setting up qmail (or even postfix)
293 to deliver emails sent to a specific address (usually
294 note-<number>@<domain>) to the above script, users are able to use
295 their email clients to reply to internal notes coming from Eventum,
296 and those replies will be automatically associated with the issue and
297 broadcasted to the notification list staff members.
299 %description route-notes -l pl
300 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
301 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
302 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
303 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
304 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
305 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
306 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
308 %package router-qmail
309 Summary: Eventum Mail Routing - qmail
310 Summary(pl): Przekazywanie poczty Eventum - qmail
311 Group: Applications/Mail
312 Requires: %{name} = %{epoch}:%{version}-%{release}
313 Requires: qmail >= 1.03
314 Provides: eventum(router)
315 Obsoletes: eventum(router)
317 %description router-qmail
318 This package provides way of routing notes and emails back to Eventum
321 %description router-qmail -l pl
322 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
325 %package router-postfix
326 Summary: Eventum Mail Routing - Postfix
327 Summary(pl): Przekazywanie poczty Eventum - Postfix
328 Group: Applications/Mail
329 Requires: %{name} = %{epoch}:%{version}-%{release}
331 Provides: eventum(router)
332 Obsoletes: eventum(router)
334 %description router-postfix
335 This package provides way of routing notes and emails back to Eventum
338 %description router-postfix -l pl
339 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
343 Summary: Eventum IRC Notification Bot
344 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
345 Group: Applications/WWW
346 Requires: %{name} = %{epoch}:%{version}-%{release}
347 Requires: php >= 4.1.0
348 Requires: php-sockets
349 Requires: rc-scripts >= 0.4.0.18
352 The IRC notification bot is a nice feature for remote teams that want
353 to handle issues and want to have a quick and easy way to get simple
354 notifications. Right now the bot notifies of the following actions:
357 - Issues that got their assignment list changed
359 NOTE: You will need to manually edit the bot.php script to set your
360 appropriate preferences, like IRC server and channel that the bot
363 %description irc -l pl
364 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
365 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
366 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
367 nastêpuj±cych zdarzeniach:
369 - zablokowanych listach
370 - sprawach, dla których zmieni³a siê lista powi±zañ
372 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
373 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
376 Summary: Eventum command-line interface
377 Summary(pl): Interfejs linii poleceñ dla Eventum
378 Group: Applications/WWW
379 Requires: %{name}-base = %{epoch}:%{version}-%{release}
380 Requires: php >= 4.1.0
384 Requires: php-pear-XML_RPC
387 The Eventum command-line interface allows you to access most of the
388 features of the web interface straight from your command shell.
390 %description cli -l pl
391 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
392 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
395 Summary: Eventum SCM integration
396 Summary(pl): Integracja SCM dla Eventum
397 Group: Applications/WWW
398 Requires: %{name}-base = %{epoch}:%{version}-%{release}
399 Requires: php >= 4.1.0
402 This feature allows your software development teams to integrate your
403 Source Control Management system with your Issue Tracking System.
405 The integration is implemented in such a way that it will be forward
406 compatible with pretty much any SCM system, such as CVS.
409 </eventum/help.php?topic=scm_integration_installation>.
411 %description scm -l pl
412 Ten pakiet pozwala zespo³om programistów na integracjê systemu
413 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
416 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
417 prawie ka¿dym systemem SCM, jak np. CVS.
419 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
420 </eventum/help.php?topic=scm_integration_installation>.
423 %setup -q %{?_snap:-n %{name}-%{_snap}}
425 find . -type f -print0 | xargs -0 sed -i -e 's,
429 %patch0 -p1 -b .paths
432 %{?with_pear:%patch3 -p1 -b .PEAR}
446 # replace in remaining scripts config.inc.php to system one
447 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
448 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
451 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
452 ' misc/download_emails.php
454 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
455 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
461 rm -rf $RPM_BUILD_ROOT
463 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
464 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
465 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
466 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
468 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
469 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
470 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
471 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
472 cp -a templates $RPM_BUILD_ROOT%{_appdir}
473 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
474 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
475 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
476 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
478 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
481 install -d $RPM_BUILD_ROOT%{_appdir}/cli
482 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
483 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
484 sed -e 's,/usr/local/bin/php,/usr/bin/php4,' misc/cli/eventum \
485 > $RPM_BUILD_ROOT%{_bindir}/%{name}
486 cp -f misc/cli/eventumrc_example eventumrc
489 echo '#!/usr/bin/php4 -q' > %{name}-scm
490 cat misc/scm/process_cvs_commits.php >> %{name}-scm
491 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
494 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
495 # change private key, so we can easily grep
497 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
498 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
500 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
501 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
502 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
503 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
504 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
505 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
506 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
507 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
508 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
509 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
510 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
513 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
514 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
516 # sample, not used in eventum
517 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
521 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
525 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
526 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
527 # These plugins are not in Smarty package (Smarty-2.6.2-3)
528 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
529 $RPM_BUILD_ROOT%{_smartyplugindir}
532 d=$RPM_BUILD_ROOT/var/lib/%{name}
533 echo 'root' > $d/.qmail
534 echo 'root' > $d/.qmail-default
535 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
536 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
537 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
538 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
541 rm -rf $RPM_BUILD_ROOT
544 %addusertogroup http %{name}
548 if [ -d %{_apache1dir}/conf.d ]; then
549 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
550 if [ -f /var/lock/subsys/apache ]; then
551 /etc/rc.d/init.d/apache restart 1>&2
555 if [ -d %{_apache2dir}/httpd.conf ]; then
556 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
557 if [ -f /var/lock/subsys/httpd ]; then
558 /etc/rc.d/init.d/httpd restart 1>&2
562 # check if the package is configured.
563 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
564 %banner %{name} -e <<EOF
566 You haven't yet configured Eventum!
568 Install %{name}-setup and open up http://yourserver/eventum/
569 -- that will help you setup initial config.
571 when have configured Eventum, please uninstall the setup package,
572 so that %{name}-setup is able to secure your Eventum installation.
577 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
578 %banner %{name} -e <<EOF
580 You have default private key installed!
582 Install %{name}-setup and open up http://yourserver/eventum/setup/
583 -- that will help you setup initial config.
585 when have configured Eventum, please uninstall the setup package,
586 so that %{name}-setup is able to secure your Eventum installation.
589 elif [ -d %{_appdir}/setup ]; then
590 %banner %{name} -e <<EOF
592 If you have have configured Eventum, please uninstall the setup package,
593 so that %{name}-setup is able to secure your Eventum installation.
598 # nuke Smarty templates cache after upgrade
599 rm -f /var/cache/eventum/*.php
602 if [ "$1" = "0" ]; then
604 if [ -f %{_apache1dir}/apache.conf ]; then
605 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
606 if [ -f /var/lock/subsys/apache ]; then
607 /etc/rc.d/init.d/apache restart 1>&2
611 if [ -d %{_apache2dir}/httpd.conf ]; then
612 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
613 if [ -f /var/lock/subsys/httpd ]; then
614 /etc/rc.d/init.d/httpd restart 1>&2
621 rm -f /var/cache/eventum/*.php
624 %groupadd -P %{name}-base %{name}
625 %useradd -P %{name}-base -d /var/lib/%{name} -g %{name} %{name} -c "Eventum User"
628 if [ "$1" = "0" ]; then
634 CF=/etc/qmail/control/virtualdomains
635 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
636 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
637 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
639 echo "#${FQDN}:%{name}" >> $CF
641 %banner %{name}-qmail -e <<EOF
643 Added "#${FQDN}:%{name}" to $CF,
644 Please verify that it is correct and restart qmail:
645 # service qmail reload
647 Consult qmail-send(8) for more information on virtualdomains.
653 if [ "$1" = "0" ]; then
654 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
658 chmod 660 %{_sysconfdir}/{config,private_key}.php
659 chown root:eventum %{_sysconfdir}/{config,private_key}.php
662 if [ "$1" = "0" ]; then
663 chmod 640 %{_sysconfdir}/{config,private_key}.php
664 chown root:eventum %{_sysconfdir}/{config,private_key}.php
667 %triggerpostun base -- eventum-base < 1.4-2.20050222.212
668 if [ "`getent passwd %{name} | cut -d: -f6`" = "%{_appdir}" ]; then
669 /usr/sbin/usermod -d /var/lib/%{name} %{name}
672 %triggerpostun -- eventum < 1.5-0.240
673 scriptdir=%{_appdir}/upgrade/v1.4_to_1.5
674 %banner %{name}-trigger-1.5 -e <<-EOF
676 Running eventum upgrade scripts to 1.5 in $scriptdir
677 These will fail if your eventum user doesn't have ALTER privilege to database.
682 /usr/bin/php4 -q $scriptdir/database_changes.php || {
683 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
686 %triggerpostun -- eventum < 1.5.1-0.257
687 scriptdir=%{_appdir}/upgrade/v1.5_to_v1.5.1
688 %banner %{name}-trigger-1.5.1 -e <<-EOF
690 Running eventum upgrade scripts to 1.5.1 in $scriptdir
691 These will fail if your eventum user doesn't have ALTER privilege to database.
696 /usr/bin/php4 -q $scriptdir/database_changes.php || {
697 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
701 %defattr(644,root,root,755)
702 %doc ChangeLog FAQ INSTALL README UPGRADE
703 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
704 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
705 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
706 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
707 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
708 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
710 %dir %attr(731,root,eventum) /var/log/%{name}
711 %attr(620,root,eventum) %ghost /var/log/%{name}/*
713 %dir %{_appdir}/htdocs
714 %{_appdir}/htdocs/*.php
715 %{_appdir}/htdocs/*.ico
716 %{_appdir}/htdocs/css
717 %{_appdir}/htdocs/customer
718 %{_appdir}/htdocs/images
720 %{_appdir}/htdocs/manage
721 %{_appdir}/htdocs/reports
722 %{_appdir}/htdocs/rpc
723 %{_appdir}/htdocs/misc
728 %{_smartyplugindir}/*
730 %{_appdir}/include/pear
733 %dir %{_appdir}/include
734 %{_appdir}/include/customer
735 %{_appdir}/include/jpgraph
736 %{_appdir}/include/workflow
737 %{_appdir}/include/class.[!m]*.php
738 %{_appdir}/include/class.mail.php
739 %{_appdir}/include/class.mail_queue.php
740 %{_appdir}/include/class.mime_helper.php
741 %{_appdir}/include/class.misc.php
742 %{_appdir}/include/db_access.php
743 %{_appdir}/include/jsrsServer.inc.php
745 %dir %attr(730,root,eventum) /var/run/%{name}
746 %dir %attr(730,root,eventum) /var/cache/%{name}
749 %defattr(644,root,root,755)
750 %attr(751,root,root) %dir %{_sysconfdir}
753 # qmail will ignore user, if it's home directory is not owned
754 %attr(750,eventum,eventum) %dir /var/lib/%{name}
757 %defattr(644,root,root,755)
758 %{_appdir}/htdocs/setup
761 %defattr(644,root,root,755)
762 %{_appdir}/process_mail_queue.php
763 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
766 %defattr(644,root,root,755)
767 %{_appdir}/download_emails.php
768 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
771 %defattr(644,root,root,755)
772 %{_appdir}/check_reminders.php
773 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
776 %defattr(644,root,root,755)
777 %{_appdir}/include/class.monitor.php
778 %{_appdir}/monitor.php
779 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
782 %defattr(644,root,root,755)
783 %{_appdir}/route_emails.php
786 %defattr(644,root,root,755)
787 %{_appdir}/route_drafts.php
788 %{_appdir}/route_notes.php
791 %defattr(644,root,root,755)
792 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
793 %attr(755,root,root) %{_libdir}/router-qmail
795 %files router-postfix
796 %defattr(644,root,root,755)
799 %defattr(644,root,root,755)
800 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
801 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
803 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
806 %defattr(644,root,root,755)
808 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
809 %attr(755,root,root) %{_bindir}/%{name}
813 %defattr(644,root,root,755)
814 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
815 %attr(755,root,root) %{_libdir}/scm