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)
11 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
13 # - put useradd/groupadd macros into PLD rpm
15 %bcond_with pear # build with system PEAR packages (or use bundled ones)
21 #define _snap 20050227
24 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
26 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
31 Summary: Eventum Issue / Bug tracking system
32 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
35 Release: 0.%{?_snap:%{_snap}.}%{_rel}
37 Group: Applications/WWW
39 # Source0-md5: d326ef39b52001efcbbc0ae8db5454a5
40 Source1: %{name}-apache.conf
41 Source2: %{name}-mail-queue.cron
42 Source3: %{name}-mail-download.cron
43 Source4: %{name}-reminder.cron
44 Source5: %{name}-monitor.cron
45 Source6: %{name}-cvs.php
46 Source7: %{name}-irc.php
47 Source8: %{name}-irc.init
48 Source9: %{name}-irc.sysconfig
49 Source10: %{name}-config.php
50 Source11: %{name}-router-qmail.sh
51 Source12: http://dev.mysql.com/common/favicon.ico
52 # Source12-md5: 858be0130832da4144c08d4b59116411
53 Patch0: %{name}-paths.patch
54 Patch1: %{name}-cvs-config.patch
55 Patch2: %{name}-irc-config.patch
56 Patch3: %{name}-PEAR.patch
57 Patch4: %{name}-db-20050227.patch
58 Patch10: %{name}-charset-recent-activity.patch
59 Patch11: http://glen.alkohol.ee/pld/%{name}-cli-rpc-base64.patch
60 Patch12: http://glen.alkohol.ee/pld/%{name}-send-height.patch
61 Patch13: http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
62 Patch14: http://glen.alkohol.ee/pld/%{name}-rss-updates.patch
63 Patch15: http://glen.alkohol.ee/pld/%{name}-opera.patch
64 Patch16: %{name}-lf.patch
65 Patch17: %{name}-iss-ass-fix.patch
66 Patch18: %{name}-iss-close.patch
67 Patch19: http://glen.alkohol.ee/pld/%{name}-attach-activate-links.patch
68 Patch20: %{name}-irc-memlimit.patch
69 Patch21: http://glen.alkohol.ee/pld/eventum-link-tilde2.patch
70 Patch22: http://glen.alkohol.ee/pld/eventum-reply-timestamp.patch
71 Patch23: http://glen.alkohol.ee/pld/eventum-lf-checkins.patch
72 Patch24: eventum-strip-bcc.patch
73 Patch25: php-pear-Date-tz-baltic-hasdst.patch
74 Patch26: http://glen.alkohol.ee/pld/eventum-maq_queued_date-local.patch
75 URL: http://dev.mysql.com/downloads/other/eventum/
76 BuildRequires: rpmbuild(macros) >= 1.177
77 BuildRequires: sed >= 4.0
78 Requires: php >= 4.2.0
83 Requires: %{name}-base = %{epoch}:%{version}-%{release}
84 Requires: Smarty >= 2.6.2
86 Requires: php-pear-Benchmark
88 Requires: php-pear-Date
89 Requires: php-pear-HTTP_Request
90 Requires: php-pear-Mail
91 Requires: php-pear-Math_Stats
92 Requires: php-pear-Net_DIME
93 Requires: php-pear-Net_POP3
94 Requires: php-pear-Net_SMTP
95 Requires: php-pear-Net_SmartIRC
96 Requires: php-pear-Net_Socket
97 Requires: php-pear-Net_URL
98 Requires: php-pear-Net_UserAgent_Detect
99 Requires: php-pear-PEAR
100 Requires: php-pear-Text_Diff
101 Requires: php-pear-XML_RPC
103 Requires: apache >= 1.3.33-2
104 Requires: apache(mod_dir)
105 Requires(triggerpostun): sed >= 4.0
107 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
109 %define _sysconfdir /etc/%{name}
110 %define _libdir %{_prefix}/%{_lib}/%{name}
111 %define _appdir %{_datadir}/%{name}
112 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
114 %define _apache1dir /etc/apache
115 %define _apache2dir /etc/httpd
118 Eventum is a user-friendly and flexible issue tracking system that can
119 be used by a support department to track incoming technical support
120 requests, or by a software development team to quickly organize tasks
121 and bugs. Eventum is used by the MySQL AB Technical Support team, and
122 has allowed us to dramatically improve our response times.
125 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
126 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
127 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
128 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
129 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
133 Summary: Eventum base package
134 Summary(pl): Podstawowy pakiet Eventum
135 Group: Applications/WWW
136 Requires(pre): /bin/id
137 Requires(pre): /usr/bin/getgid
138 Requires(pre): /usr/sbin/useradd
139 Requires(pre): /usr/sbin/groupadd
140 Provides: user(eventum)
141 Provides: group(eventum)
144 This package contains base directory structure for Eventum.
146 %description base -l pl
147 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
150 Summary: Eventum setup package
151 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
152 Group: Applications/WWW
153 PreReq: %{name} = %{epoch}:%{version}-%{release}
156 Install this package to configure initial Eventum installation. You
157 should uninstall this package when you're done, as it considered
158 insecure to keep the setup files in place.
160 %description setup -l pl
161 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
162 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
163 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
166 Summary: Eventum mail queue process
167 Summary(pl): Przetwarzanie kolejki poczty Eventum
168 Group: Applications/WWW
169 Requires: %{name} = %{epoch}:%{version}-%{release}
171 Requires: php >= 4.1.0
173 %description mail-queue
174 Beginning with the first release of Eventum, emails are not directly
175 sent out from the various scripts, but rather added to a mail queue
176 table that is processed by a cron job. If an email cannot be sent, it
177 will be marked as such in the mail queue log, and the cron job script
178 will re-try to send it again the next time it runs.
180 This package contains the cron job.
182 %description mail-queue -l pl
183 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
184 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
185 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
186 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
189 Ten pakiet zawiera zadanie dla crona.
191 %package mail-download
192 Summary: Eventum email download
193 Summary(pl): ¦ci±ganie poczty Eventum
194 Group: Applications/WWW
195 Requires: %{name} = %{epoch}:%{version}-%{release}
197 Requires: php >= 4.1.0
199 %description mail-download
200 In order for Eventum's email integration feature to work, you need to
201 setup a cron job to run the script every so often.
203 This package contains the cron job.
205 %description mail-download -l pl
206 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
207 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
210 Ten pakiet zawiera zadanie dla crona.
213 Summary: Eventum Reminder System
214 Summary(pl): System przypominania dla Eventum
215 Group: Applications/WWW
216 Requires: %{name} = %{epoch}:%{version}-%{release}
217 Requires: php >= 4.1.0
220 %description reminder
221 The reminder system was designed with the objective as serving as a
222 safe net for issues that need attention. Depending on what
223 configuration you create, you may have several reminders (or alerts)
224 be sent out whenever an issue needs attention, for whatever parameter
225 you may deem necessary.
227 This package contains the cron job.
229 %description reminder -l pl
230 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
231 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
232 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
233 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
236 Ten pakiet zawiera zadanie dla crona.
239 Summary: Eventum Heartbeat Monitor
240 Summary(pl): Monitor ¿ycia dla Eventum
241 Group: Applications/WWW
242 Requires: %{name} = %{epoch}:%{version}-%{release}
243 Requires: php >= 4.1.0
248 The heartbeat monitor is a feature designed for the administrator that
249 wants to be alerted whenever a common problem in Eventum is detected,
250 like the database server not being available anymore, or maybe when
251 the recommended permissions for certain configuration files are
254 Please note that before running the heartbeat monitor, you may need to
255 customize some of the checks to be appropriate for your own system,
256 particularly the permission and file checks on
257 Monitor::checkConfiguration().
259 This package contains the cron job.
261 %description monitor -l pl
262 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
263 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
264 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
265 do plików konfiguracyjnych.
267 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
268 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
269 testów uprawnieñ i plików w Monitor::checkConfiguration().
271 Ten pakiet zawiera zadanie dla crona.
273 %package route-emails
274 Summary: Eventum Email Routing
275 Summary(pl): Przekazywanie poczty dla Eventum
276 Group: Applications/WWW
277 Requires: %{name} = %{epoch}:%{version}-%{release}
278 Requires: php >= 4.1.0
279 Requires: eventum(router)
281 %description route-emails
282 The email routing feature is used to automatically associate a thread
283 of emails into an Eventum issue. By setting up qmail (or even postfix)
284 to deliver emails sent to a specific address (usually
285 issue-<number>@<domain>) to the above script, users are able to use
286 their email clients to reply to emails coming from Eventum, and those
287 replies will be automatically associated with the issue and
288 broadcasted to the entire notification list.
290 %description route-emails -l pl
291 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
292 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
293 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
294 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
295 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
296 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
297 rozprowadzane do ca³ej listy og³oszeniowej.
300 Summary: Eventum Note Routing
301 Summary(pl): Przekazywanie notatek dla Eventum
302 Group: Applications/WWW
303 Requires: %{name} = %{epoch}:%{version}-%{release}
304 Requires: php >= 4.1.0
305 Requires: eventum(router)
307 %description route-notes
308 The note routing feature is used to automatically associate a thread
309 of notes into an Eventum issue. By setting up qmail (or even postfix)
310 to deliver emails sent to a specific address (usually
311 note-<number>@<domain>) to the above script, users are able to use
312 their email clients to reply to internal notes coming from Eventum,
313 and those replies will be automatically associated with the issue and
314 broadcasted to the notification list staff members.
316 %description route-notes -l pl
317 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
318 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
319 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
320 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
321 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
322 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
323 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
325 %package router-qmail
326 Summary: Eventum Mail Routing - qmail
327 Summary(pl): Przekazywanie poczty Eventum - qmail
328 Group: Applications/Mail
329 Requires: %{name} = %{epoch}:%{version}-%{release}
330 Requires: qmail >= 1.03
331 Provides: eventum(router)
332 Obsoletes: eventum(router)
334 %description router-qmail
335 This package provides way of routing notes and emails back to Eventum
338 %description router-qmail -l pl
339 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
342 %package router-postfix
343 Summary: Eventum Mail Routing - Postfix
344 Summary(pl): Przekazywanie poczty Eventum - Postfix
345 Group: Applications/Mail
346 Requires: %{name} = %{epoch}:%{version}-%{release}
348 Provides: eventum(router)
349 Obsoletes: eventum(router)
351 %description router-postfix
352 This package provides way of routing notes and emails back to Eventum
355 %description router-postfix -l pl
356 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
360 Summary: Eventum IRC Notification Bot
361 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
362 Group: Applications/WWW
363 Requires: %{name} = %{epoch}:%{version}-%{release}
364 Requires: php >= 4.1.0
365 Requires: php-sockets
366 Requires: rc-scripts >= 0.4.0.18
369 The IRC notification bot is a nice feature for remote teams that want
370 to handle issues and want to have a quick and easy way to get simple
371 notifications. Right now the bot notifies of the following actions:
374 - Issues that got their assignment list changed
376 NOTE: You will need to manually edit the bot.php script to set your
377 appropriate preferences, like IRC server and channel that the bot
380 %description irc -l pl
381 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
382 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
383 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
384 nastêpuj±cych zdarzeniach:
386 - zablokowanych listach
387 - sprawach, dla których zmieni³a siê lista powi±zañ
389 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
390 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
393 Summary: Eventum command-line interface
394 Summary(pl): Interfejs linii poleceñ dla Eventum
395 Group: Applications/WWW
396 Requires: %{name}-base = %{epoch}:%{version}-%{release}
397 Requires: php >= 4.1.0
401 Requires: php-pear-XML_RPC
404 The Eventum command-line interface allows you to access most of the
405 features of the web interface straight from your command shell.
407 %description cli -l pl
408 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
409 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
412 Summary: Eventum SCM integration
413 Summary(pl): Integracja SCM dla Eventum
414 Group: Applications/WWW
415 Requires: %{name}-base = %{epoch}:%{version}-%{release}
416 Requires: php >= 4.1.0
419 This feature allows your software development teams to integrate your
420 Source Control Management system with your Issue Tracking System.
422 The integration is implemented in such a way that it will be forward
423 compatible with pretty much any SCM system, such as CVS.
426 </eventum/help.php?topic=scm_integration_installation>.
428 %description scm -l pl
429 Ten pakiet pozwala zespo³om programistów na integracjê systemu
430 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
433 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
434 prawie ka¿dym systemem SCM, jak np. CVS.
436 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
437 </eventum/help.php?topic=scm_integration_installation>.
440 %setup -q %{?_snap:-n %{name}-%{_snap}}
442 find . -type f -print0 | xargs -0 sed -i -e 's,
446 %patch0 -p1 -b .paths
449 %{?with_pear:%patch3 -p1 -b .PEAR}
470 # replace in remaining scripts config.inc.php to system one
471 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
472 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
475 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
476 ' misc/download_emails.php
478 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
479 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
489 rm -rf $RPM_BUILD_ROOT
491 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
492 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
493 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
494 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
496 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
497 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
498 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
499 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
500 cp -a templates $RPM_BUILD_ROOT%{_appdir}
501 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
502 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
503 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
504 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
506 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
509 install -d $RPM_BUILD_ROOT%{_appdir}/cli
510 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
511 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
512 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
513 misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
514 cp -f misc/cli/eventumrc_example eventumrc
517 echo '#!%{_bindir}/php4 -q' > %{name}-scm
518 cat misc/scm/process_cvs_commits.php >> %{name}-scm
519 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
522 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
523 # change private key, so we can easily grep
525 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
526 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
528 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
529 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
530 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
531 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
532 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
533 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
534 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
535 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
536 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
537 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
538 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
541 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
542 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
544 # sample, not used in eventum
545 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
549 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
553 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
554 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
555 # These plugins are not in Smarty package (Smarty-2.6.2-3)
556 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
557 $RPM_BUILD_ROOT%{_smartyplugindir}
560 d=$RPM_BUILD_ROOT/var/lib/%{name}
561 echo 'root' > $d/.qmail
562 echo 'root' > $d/.qmail-default
563 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
564 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
565 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
566 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
569 rm -rf $RPM_BUILD_ROOT
572 %addusertogroup http %{name}
576 if [ -d %{_apache1dir}/conf.d ]; then
577 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
578 if [ -f /var/lock/subsys/apache ]; then
579 /etc/rc.d/init.d/apache restart 1>&2
583 if [ -d %{_apache2dir}/httpd.conf ]; then
584 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
585 if [ -f /var/lock/subsys/httpd ]; then
586 /etc/rc.d/init.d/httpd restart 1>&2
590 # check if the package is configured.
591 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
592 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
593 %banner %{name} -e <<EOF
595 You haven't yet configured Eventum!
596 Please open in browser <http://localhost/eventum/>
597 If you need access from elsewhere, you need to edit
598 %{_sysconfdir}/apache.conf and restart apache.
600 IMPORTANT: When You have configured Eventum, please uninstall the
601 setup package, so that %{name}-setup is able to secure your Eventum
607 %banner %{name} -e <<EOF
609 You haven't yet configured Eventum!
611 To setup eventum, please install %{name}-setup and open in browser
612 <http://localhost/eventum/>.
613 If you need access from elsewhere, you need to edit
614 %{_sysconfdir}/apache.conf and restart apache.
616 IMPORTANT: When You have configured Eventum, please uninstall the
617 setup package, so that %{name}-setup is able to secure your Eventum
624 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
625 %banner %{name} -e <<EOF
627 You have default private key installed!
629 Install %{name}-setup and open up http://yourserver/eventum/setup/
630 -- that will help you setup initial config.
632 when have configured Eventum, please uninstall the setup package,
633 so that %{name}-setup is able to secure your Eventum installation.
636 elif [ -d %{_appdir}/setup ]; then
637 %banner %{name} -e <<EOF
639 If you have have configured Eventum, please uninstall the setup package,
640 so that %{name}-setup is able to secure your Eventum installation.
645 # nuke Smarty templates cache after upgrade
646 rm -f /var/cache/eventum/*.php
649 if [ "$1" = "0" ]; then
651 if [ -f %{_apache1dir}/apache.conf ]; then
652 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
653 if [ -f /var/lock/subsys/apache ]; then
654 /etc/rc.d/init.d/apache restart 1>&2
658 if [ -d %{_apache2dir}/httpd.conf ]; then
659 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
660 if [ -f /var/lock/subsys/httpd ]; then
661 /etc/rc.d/init.d/httpd restart 1>&2
666 rm -f /var/cache/eventum/*.php 2>/dev/null || :
670 %groupadd -P %{name}-base -g %{gid} %{name}
671 %useradd -P %{name}-base -u %{uid} -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
674 if [ "$1" = "0" ]; then
680 CF=/etc/qmail/control/virtualdomains
681 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
682 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
683 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
685 echo "#${FQDN}:%{name}" >> $CF
687 %banner %{name}-qmail -e <<EOF
689 Added "#${FQDN}:%{name}" to $CF,
690 Please verify that it is correct and restart qmail:
691 # service qmail reload
693 Consult qmail-send(8) for more information on virtualdomains.
699 if [ "$1" = "0" ]; then
700 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
704 chmod 660 %{_sysconfdir}/{config,private_key}.php
705 chown root:eventum %{_sysconfdir}/{config,private_key}.php
708 if [ "$1" = "0" ]; then
709 chmod 640 %{_sysconfdir}/{config,private_key}.php
710 chown root:eventum %{_sysconfdir}/{config,private_key}.php
713 %triggerpostun base -- eventum-base < 1.4-2.20050222.212
714 if [ "`getent passwd %{name} | cut -d: -f6`" = "%{_appdir}" ]; then
715 /usr/sbin/usermod -d /var/lib/%{name} %{name}
718 %triggerpostun -- eventum < 1.5-0.240
719 scriptdir=%{_appdir}/upgrade/v1.4_to_1.5
720 %banner %{name}-trigger-1.5 -e <<-EOF
722 Running eventum upgrade scripts to 1.5 in $scriptdir
723 These will fail if your eventum user doesn't have ALTER privilege to database.
728 /usr/bin/php4 -q $scriptdir/database_changes.php || {
729 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
732 %triggerpostun -- eventum < 1.5.1-0.257
733 scriptdir=%{_appdir}/upgrade/v1.5_to_v1.5.1
734 %banner %{name}-trigger-1.5.1 -e <<-EOF
736 Running eventum upgrade scripts to 1.5.1 in $scriptdir
737 These will fail if your eventum user doesn't have ALTER privilege to database.
742 /usr/bin/php4 -q $scriptdir/database_changes.php || {
743 echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
747 %defattr(644,root,root,755)
748 %doc ChangeLog FAQ INSTALL README UPGRADE
749 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
750 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
751 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
752 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
753 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
754 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
756 %dir %attr(731,root,eventum) /var/log/%{name}
757 %attr(620,root,eventum) %ghost /var/log/%{name}/*
759 %dir %{_appdir}/htdocs
760 %{_appdir}/htdocs/*.php
761 %{_appdir}/htdocs/*.ico
762 %{_appdir}/htdocs/css
763 %{_appdir}/htdocs/customer
764 %{_appdir}/htdocs/images
766 %{_appdir}/htdocs/manage
767 %{_appdir}/htdocs/reports
768 %{_appdir}/htdocs/rpc
769 %{_appdir}/htdocs/misc
774 %{_smartyplugindir}/*
776 %{_appdir}/include/pear
779 %dir %{_appdir}/include
780 %{_appdir}/include/customer
781 %{_appdir}/include/jpgraph
782 %{_appdir}/include/workflow
783 %{_appdir}/include/class.[!m]*.php
784 %{_appdir}/include/class.mail.php
785 %{_appdir}/include/class.mail_queue.php
786 %{_appdir}/include/class.mime_helper.php
787 %{_appdir}/include/class.misc.php
788 %{_appdir}/include/db_access.php
789 %{_appdir}/include/jsrsServer.inc.php
791 %dir %attr(730,root,eventum) /var/run/%{name}
792 %dir %attr(730,root,eventum) /var/cache/%{name}
795 %defattr(644,root,root,755)
796 %attr(751,root,root) %dir %{_sysconfdir}
799 # qmail will ignore user, if it's home directory is not owned
800 %attr(750,eventum,eventum) %dir /var/lib/%{name}
803 %defattr(644,root,root,755)
804 %{_appdir}/htdocs/setup
807 %defattr(644,root,root,755)
808 %{_appdir}/process_mail_queue.php
809 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
812 %defattr(644,root,root,755)
813 %{_appdir}/download_emails.php
814 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
817 %defattr(644,root,root,755)
818 %{_appdir}/check_reminders.php
819 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
822 %defattr(644,root,root,755)
823 %{_appdir}/include/class.monitor.php
824 %{_appdir}/monitor.php
825 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
828 %defattr(644,root,root,755)
829 %{_appdir}/route_emails.php
832 %defattr(644,root,root,755)
833 %{_appdir}/route_drafts.php
834 %{_appdir}/route_notes.php
837 %defattr(644,root,root,755)
838 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
839 %attr(755,root,root) %{_libdir}/router-qmail
841 %files router-postfix
842 %defattr(644,root,root,755)
845 %defattr(644,root,root,755)
846 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
847 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
849 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
852 %defattr(644,root,root,755)
854 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
855 %attr(755,root,root) %{_bindir}/%{name}
859 %defattr(644,root,root,755)
860 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
861 %attr(755,root,root) %{_libdir}/scm