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 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
12 %bcond_with pear # build with system PEAR packages (or use bundled ones)
13 %bcond_with qmail # build the router-qmail subpackage
16 #define _snap 20050227
24 %define _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
27 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
29 %define _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
33 Summary: Eventum Issue / Bug tracking system
34 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
37 Release: %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
39 Group: Applications/WWW
41 # Source0-md5: bb05ecdb46b02580ffe892e270e536b3
42 Source1: %{name}-apache.conf
43 Source2: %{name}-mail-queue.cron
44 Source3: %{name}-mail-download.cron
45 Source4: %{name}-reminder.cron
46 Source5: %{name}-monitor.cron
47 Source6: %{name}-cvs.php
48 Source7: %{name}-irc.php
49 Source8: %{name}-irc.init
50 Source9: %{name}-irc.sysconfig
51 Source10: %{name}-config.php
52 Source11: %{name}-router-qmail.sh
53 Source12: http://dev.mysql.com/common/favicon.ico
54 # Source12-md5: 858be0130832da4144c08d4b59116411
55 Source13: %{name}-config-setup.php
56 Source14: %{name}-upgrade.sh
57 Patch0: %{name}-paths.patch
58 Patch1: %{name}-cvs-config.patch
59 Patch2: %{name}-irc-config.patch
60 Patch3: %{name}-PEAR.patch
61 Patch4: http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
62 Patch5: %{name}-lf.patch
63 Patch6: http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
64 Patch7: %{name}-bot-reconnect.patch
65 Patch9: http://glen.alkohol.ee/pld/eventum-httpclient-clientside.patch
66 Patch22: eventum-cli-wr-separated.patch
67 URL: http://dev.mysql.com/downloads/other/eventum/
68 BuildRequires: rpmbuild(macros) >= 1.223
69 BuildRequires: sed >= 4.0
70 Requires: php >= 4.2.0
76 Requires: %{name}-base = %{epoch}:%{version}-%{release}
77 Requires: Smarty >= 2.6.2
79 Requires: php-pear-Benchmark
81 Requires: php-pear-Date
82 Requires: php-pear-HTTP_Request
83 Requires: php-pear-Mail
84 Requires: php-pear-Math_Stats
85 Requires: php-pear-Net_DIME
86 Requires: php-pear-Net_POP3
87 Requires: php-pear-Net_SMTP
88 Requires: php-pear-Net_SmartIRC
89 Requires: php-pear-Net_Socket
90 Requires: php-pear-Net_URL
91 Requires: php-pear-Net_UserAgent_Detect
92 Requires: php-pear-PEAR
93 Requires: php-pear-Text_Diff
94 Requires: php-pear-XML_RPC
96 Requires: apache >= 1.3.33-2
97 Requires: apache(mod_dir)
98 Requires(triggerpostun): sed >= 4.0
100 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102 %define _sysconfdir /etc/%{name}
103 %define _libdir %{_prefix}/lib/%{name}
104 %define _appdir %{_datadir}/%{name}
105 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
108 Eventum is a user-friendly and flexible issue tracking system that can
109 be used by a support department to track incoming technical support
110 requests, or by a software development team to quickly organize tasks
111 and bugs. Eventum is used by the MySQL AB Technical Support team, and
112 has allowed us to dramatically improve our response times.
115 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
116 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
117 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
118 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
119 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
123 Summary: Eventum base package
124 Summary(pl): Podstawowy pakiet Eventum
125 Group: Applications/WWW
126 Requires(pre): /bin/id
127 Requires(pre): /usr/bin/getgid
128 Requires(pre): /usr/sbin/useradd
129 Requires(pre): /usr/sbin/groupadd
130 Requires(postun): /usr/sbin/userdel
131 Requires(postun): /usr/sbin/groupdel
132 Provides: user(eventum)
133 Provides: group(eventum)
136 This package contains base directory structure for Eventum.
138 %description base -l pl
139 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
142 Summary: Eventum setup package
143 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
144 Group: Applications/WWW
145 PreReq: %{name} = %{epoch}:%{version}-%{release}
148 Install this package to configure initial Eventum installation. You
149 should uninstall this package when you're done, as it considered
150 insecure to keep the setup files in place.
152 %description setup -l pl
153 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
154 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
155 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
158 Summary: Eventum mail queue process
159 Summary(pl): Przetwarzanie kolejki poczty Eventum
160 Group: Applications/WWW
161 Requires: %{name} = %{epoch}:%{version}-%{release}
163 Requires: php >= 4.1.0
165 %description mail-queue
166 Beginning with the first release of Eventum, emails are not directly
167 sent out from the various scripts, but rather added to a mail queue
168 table that is processed by a cron job. If an email cannot be sent, it
169 will be marked as such in the mail queue log, and the cron job script
170 will re-try to send it again the next time it runs.
172 This package contains the cron job.
174 %description mail-queue -l pl
175 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
176 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
177 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
178 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
181 Ten pakiet zawiera zadanie dla crona.
183 %package mail-download
184 Summary: Eventum email download
185 Summary(pl): ¦ci±ganie poczty Eventum
186 Group: Applications/WWW
187 Requires: %{name} = %{epoch}:%{version}-%{release}
189 Requires: php >= 4.1.0
191 %description mail-download
192 In order for Eventum's email integration feature to work, you need to
193 setup a cron job to run the script every so often.
195 This package contains the cron job.
197 %description mail-download -l pl
198 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
199 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
202 Ten pakiet zawiera zadanie dla crona.
205 Summary: Eventum Reminder System
206 Summary(pl): System przypominania dla Eventum
207 Group: Applications/WWW
208 Requires: %{name} = %{epoch}:%{version}-%{release}
209 Requires: php >= 4.1.0
212 %description reminder
213 The reminder system was designed with the objective as serving as a
214 safe net for issues that need attention. Depending on what
215 configuration you create, you may have several reminders (or alerts)
216 be sent out whenever an issue needs attention, for whatever parameter
217 you may deem necessary.
219 This package contains the cron job.
221 %description reminder -l pl
222 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
223 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
224 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
225 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
228 Ten pakiet zawiera zadanie dla crona.
231 Summary: Eventum Heartbeat Monitor
232 Summary(pl): Monitor ¿ycia dla Eventum
233 Group: Applications/WWW
234 Requires: %{name} = %{epoch}:%{version}-%{release}
235 Requires: php >= 4.1.0
240 The heartbeat monitor is a feature designed for the administrator that
241 wants to be alerted whenever a common problem in Eventum is detected,
242 like the database server not being available anymore, or maybe when
243 the recommended permissions for certain configuration files are
246 Please note that before running the heartbeat monitor, you may need to
247 customize some of the checks to be appropriate for your own system,
248 particularly the permission and file checks on
249 Monitor::checkConfiguration().
251 This package contains the cron job.
253 %description monitor -l pl
254 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
255 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
256 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
257 do plików konfiguracyjnych.
259 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
260 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
261 testów uprawnieñ i plików w Monitor::checkConfiguration().
263 Ten pakiet zawiera zadanie dla crona.
265 %package route-emails
266 Summary: Eventum Email Routing
267 Summary(pl): Przekazywanie poczty dla Eventum
268 Group: Applications/WWW
269 Requires: %{name} = %{epoch}:%{version}-%{release}
270 Requires: php >= 4.1.0
271 Requires: eventum(router)
273 %description route-emails
274 The email routing feature is used to automatically associate a thread
275 of emails into an Eventum issue. By setting up qmail (or even postfix)
276 to deliver emails sent to a specific address (usually
277 issue-<number>@<domain>) to the above script, users are able to use
278 their email clients to reply to emails coming from Eventum, and those
279 replies will be automatically associated with the issue and
280 broadcasted to the entire notification list.
282 %description route-emails -l pl
283 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
284 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
285 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
286 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
287 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
288 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
289 rozprowadzane do ca³ej listy og³oszeniowej.
292 Summary: Eventum Note Routing
293 Summary(pl): Przekazywanie notatek dla Eventum
294 Group: Applications/WWW
295 Requires: %{name} = %{epoch}:%{version}-%{release}
296 Requires: php >= 4.1.0
297 Requires: eventum(router)
299 %description route-notes
300 The note routing feature is used to automatically associate a thread
301 of notes into an Eventum issue. By setting up qmail (or even postfix)
302 to deliver emails sent to a specific address (usually
303 note-<number>@<domain>) to the above script, users are able to use
304 their email clients to reply to internal notes coming from Eventum,
305 and those replies will be automatically associated with the issue and
306 broadcasted to the notification list staff members.
308 %description route-notes -l pl
309 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
310 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
311 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
312 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
313 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
314 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
315 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
317 %package router-qmail
318 Summary: Eventum Mail Routing - qmail
319 Summary(pl): Przekazywanie poczty Eventum - qmail
320 Group: Applications/Mail
321 Requires: %{name} = %{epoch}:%{version}-%{release}
322 Requires: qmail >= 1.03
323 Provides: eventum(router)
324 Obsoletes: eventum(router)
326 %description router-qmail
327 This package provides way of routing notes and emails back to Eventum
330 %description router-qmail -l pl
331 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
334 %package router-postfix
335 Summary: Eventum Mail Routing - Postfix
336 Summary(pl): Przekazywanie poczty Eventum - Postfix
337 Group: Applications/Mail
338 Requires: %{name} = %{epoch}:%{version}-%{release}
340 Provides: eventum(router)
341 Obsoletes: eventum(router)
343 %description router-postfix
344 This package provides way of routing notes and emails back to Eventum
347 %description router-postfix -l pl
348 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
352 Summary: Eventum IRC Notification Bot
353 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
354 Group: Applications/WWW
355 Requires: %{name} = %{epoch}:%{version}-%{release}
356 Requires: php >= 4.1.0
357 Requires: php-sockets
358 Requires(triggerpostun): sed >= 4.0
359 PreReq: rc-scripts >= 0.4.0.18
362 The IRC notification bot is a nice feature for remote teams that want
363 to handle issues and want to have a quick and easy way to get simple
364 notifications. Right now the bot notifies of the following actions:
367 - Issues that got their assignment list changed
369 NOTE: You will need to manually edit the bot.php script to set your
370 appropriate preferences, like IRC server and channel that the bot
373 %description irc -l pl
374 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
375 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
376 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
377 nastêpuj±cych zdarzeniach:
379 - zablokowanych listach
380 - sprawach, dla których zmieni³a siê lista powi±zañ
382 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
383 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
386 Summary: Eventum command-line interface
387 Summary(pl): Interfejs linii poleceñ dla Eventum
388 Group: Applications/WWW
389 Requires: %{name}-base = %{epoch}:%{version}-%{release}
390 Requires: php >= 4.1.0
394 Requires: php-pear-XML_RPC
397 The Eventum command-line interface allows you to access most of the
398 features of the web interface straight from your command shell.
400 %description cli -l pl
401 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
402 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
405 Summary: Eventum SCM integration
406 Summary(pl): Integracja SCM dla Eventum
407 Group: Applications/WWW
408 Requires: %{name}-base = %{epoch}:%{version}-%{release}
409 Requires: php-cli >= 4.1.0
413 This feature allows your software development teams to integrate your
414 Source Control Management system with your Issue Tracking System.
416 The integration is implemented in such a way that it will be forward
417 compatible with pretty much any SCM system, such as CVS.
420 </eventum/help.php?topic=scm_integration_installation>.
422 %description scm -l pl
423 Ten pakiet pozwala zespo³om programistów na integracjê systemu
424 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
427 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
428 prawie ka¿dym systemem SCM, jak np. CVS.
430 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
431 </eventum/help.php?topic=scm_integration_installation>.
434 %setup -q %{?_snap:-n %{name}-%{_snap}}
436 find . -type f -print0 | xargs -0 sed -i -e 's,
440 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
443 %patch0 -p1 -b .paths
446 %{?with_pear:%patch3 -p1 -b .PEAR}
456 # replace in remaining scripts config.inc.php to system one
457 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
458 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
461 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
462 ' misc/download_emails.php
464 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
465 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
467 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
470 rm -rf $RPM_BUILD_ROOT
472 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
473 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
474 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
475 $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
476 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
478 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
479 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
480 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
481 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
482 cp -a templates $RPM_BUILD_ROOT%{_appdir}
483 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
484 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
485 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
486 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
488 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
489 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
490 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
493 install -d $RPM_BUILD_ROOT%{_appdir}/cli
494 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
495 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
496 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
497 misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
498 cp -f misc/cli/eventumrc_example eventumrc
501 echo '#!%{_bindir}/php4 -q' > %{name}-scm
502 cat misc/scm/process_cvs_commits.php >> %{name}-scm
503 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
506 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
507 # change private key, so we can easily grep
509 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
510 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
512 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
513 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
514 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
515 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
516 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
517 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
518 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
519 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
520 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
521 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
522 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
525 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
526 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
528 # sample, not used in eventum
529 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
533 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
537 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
538 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
539 # These plugins are not in Smarty package (Smarty-2.6.2-3)
540 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
541 $RPM_BUILD_ROOT%{_smartyplugindir}
545 d=$RPM_BUILD_ROOT/var/lib/%{name}
546 echo 'root' > $d/.qmail
547 echo 'root' > $d/.qmail-default
548 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
549 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
550 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
551 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
555 rm -rf $RPM_BUILD_ROOT
558 %addusertogroup http %{name}
561 # check if the package is configured.
562 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
563 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
564 %banner %{name} -e <<EOF
566 You haven't yet configured Eventum!
567 Please open in browser <http://localhost/eventum/>
568 If you need access from elsewhere, you need to edit
569 %{_sysconfdir}/apache.conf and restart apache.
571 IMPORTANT: When You have configured Eventum, please uninstall the
572 setup package, so that %{name}-setup is able to secure your Eventum
578 %banner %{name} -e <<EOF
580 You haven't yet configured Eventum!
582 To setup eventum, please install %{name}-setup and open in browser
583 <http://localhost/eventum/>.
584 If you need access from elsewhere, you need to edit
585 %{_sysconfdir}/apache.conf and restart apache.
587 IMPORTANT: When You have configured Eventum, please uninstall the
588 setup package, so that %{name}-setup is able to secure your Eventum
595 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
596 %banner %{name} -e <<EOF
598 You have default private key installed!
600 Install %{name}-setup and open up http://yourserver/eventum/setup/
601 -- that will help you setup initial config.
603 when have configured Eventum, please uninstall the setup package,
604 so that %{name}-setup is able to secure your Eventum installation.
607 elif [ -d %{_appdir}/setup ]; then
608 %banner %{name} -e <<EOF
610 If you have have configured Eventum, please uninstall the setup package,
611 so that %{name}-setup is able to secure your Eventum installation.
616 # nuke Smarty templates cache after upgrade
617 rm -f /var/cache/eventum/*.php
620 if [ "$1" = "0" ]; then
622 rm -f /var/cache/eventum/*.php 2>/dev/null || :
626 %groupadd -P %{name}-base -g 146 %{name}
627 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
630 if [ "$1" = "0" ]; then
637 CF=/etc/qmail/control/virtualdomains
638 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
639 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
640 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
642 echo "#${FQDN}:%{name}" >> $CF
644 %banner %{name}-qmail -e <<EOF
646 Added "#${FQDN}:%{name}" to $CF,
647 Please verify that it is correct and restart qmail:
648 # service qmail reload
650 Consult qmail-send(8) for more information on virtualdomains.
656 if [ "$1" = "0" ]; then
657 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
662 chmod 660 %{_sysconfdir}/{config,private_key}.php
663 chown root:eventum %{_sysconfdir}/{config,private_key}.php
666 if [ "$1" = "0" ]; then
667 chmod 640 %{_sysconfdir}/{config,private_key}.php
668 chown root:eventum %{_sysconfdir}/{config,private_key}.php
671 %triggerin -- apache1 >= 1.3.33-2
672 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
674 %triggerun -- apache1 >= 1.3.33-2
675 %apache_config_uninstall -v 1
677 %triggerin -- apache >= 2.0.0
678 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
680 %triggerun -- apache >= 2.0.0
681 %apache_config_uninstall -v 2
684 # only one upgrade trigger is called if you're upgrading over two
685 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
686 # use common trigger (the highest version and rpmvercmp from poldek?)
687 %triggerpostun -- eventum < 1.5.1-0.257
688 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
689 database_changes.php Perform database changes
692 %triggerpostun -- eventum < 1.5.2-0.289
693 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
694 database_changes.php Perform database changes
695 set_priority_ranks.php Fix the ranking of priority values
698 %triggerpostun -- eventum < 1.5.3-0.291
699 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
700 database_changes.php Perform database changes
703 %triggerpostun -- eventum < 1.5.4-1.12
704 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
705 database_changes.php Perform database changes
708 %triggerpostun -- eventum < 1.6.0-RC2.6
709 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
710 database_changes.php Perform database changes
711 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
714 %triggerpostun -- eventum < 1.6.1-0.2
715 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
716 database_changes.php Perform database changes
719 %triggerpostun irc -- eventum-irc < 1.6.1
721 s,\$irc_host,$irc_server_hostname,
722 s,\$irc_port,$irc_server_port,
723 s,\$irc_nick,$nickname,
724 s,\$irc_realname,$realname,
725 s,\$irc_username,$username,
726 ' /etc/eventum/irc.php
729 %defattr(644,root,root,755)
730 %doc ChangeLog FAQ INSTALL README UPGRADE
731 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
732 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
733 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
734 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
735 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
736 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
738 %dir %attr(731,root,eventum) /var/log/%{name}
739 %attr(620,root,eventum) %ghost /var/log/%{name}/*
741 %dir %{_appdir}/htdocs
742 %{_appdir}/htdocs/*.php
743 %{_appdir}/htdocs/*.ico
744 %{_appdir}/htdocs/css
745 %{_appdir}/htdocs/customer
746 %{_appdir}/htdocs/images
748 %{_appdir}/htdocs/manage
749 %{_appdir}/htdocs/reports
750 %{_appdir}/htdocs/rpc
751 %{_appdir}/htdocs/misc
754 %dir %{_appdir}/upgrade
755 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
756 %{_appdir}/upgrade/[!u]*
758 %{_smartyplugindir}/*
760 %{_appdir}/include/pear
763 %dir %{_appdir}/include
764 %{_appdir}/include/customer
765 %{_appdir}/include/jpgraph
766 %{_appdir}/include/workflow
767 %{_appdir}/include/class.[!m]*.php
768 %{_appdir}/include/class.mail.php
769 %{_appdir}/include/class.mail_queue.php
770 %{_appdir}/include/class.mime_helper.php
771 %{_appdir}/include/class.misc.php
772 %{_appdir}/include/db_access.php
774 %dir %attr(730,root,eventum) /var/run/%{name}
775 %dir %attr(730,root,eventum) /var/cache/%{name}
778 %defattr(644,root,root,755)
779 %attr(751,root,root) %dir %{_sysconfdir}
782 # qmail will ignore user, if it's home directory is not owned
783 %attr(750,eventum,eventum) %dir /var/lib/%{name}
784 # for saved routed emails
785 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
788 %defattr(644,root,root,755)
789 %{_appdir}/htdocs/setup
792 %defattr(644,root,root,755)
793 %{_appdir}/process_mail_queue.php
794 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
797 %defattr(644,root,root,755)
798 %{_appdir}/download_emails.php
799 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
802 %defattr(644,root,root,755)
803 %{_appdir}/check_reminders.php
804 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
807 %defattr(644,root,root,755)
808 %{_appdir}/include/class.monitor.php
809 %{_appdir}/monitor.php
810 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
813 %defattr(644,root,root,755)
814 %{_appdir}/route_emails.php
817 %defattr(644,root,root,755)
818 %{_appdir}/route_drafts.php
819 %{_appdir}/route_notes.php
823 %defattr(644,root,root,755)
824 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
825 %attr(755,root,root) %{_libdir}/router-qmail
828 %files router-postfix
829 %defattr(644,root,root,755)
832 %defattr(644,root,root,755)
833 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
834 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
836 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
839 %defattr(644,root,root,755)
841 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
842 %attr(755,root,root) %{_bindir}/%{name}
846 %defattr(644,root,root,755)
847 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
848 %attr(755,root,root) %{_libdir}/scm