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 20051209
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: 439586216294bfb6f949b5fd057b0fe0
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/%{name}-httpclient-clientside.patch
66 Patch10: %{name}-cli-wr-separated.patch
67 Patch11: %{name}-php440.patch
68 Patch12: %{name}-htmloptions-truncate.patch
69 URL: http://dev.mysql.com/downloads/other/eventum/
70 BuildRequires: rpmbuild(macros) >= 1.223
71 BuildRequires: sed >= 4.0
72 Requires: php >= 3:4.2.0
78 Requires: %{name}-base = %{epoch}:%{version}-%{release}
79 Requires: Smarty >= 2.6.2
81 Requires: php-pear-Benchmark
83 Requires: php-pear-Date
84 Requires: php-pear-HTTP_Request
85 Requires: php-pear-Mail
86 Requires: php-pear-Math_Stats
87 Requires: php-pear-Net_DIME
88 Requires: php-pear-Net_POP3
89 Requires: php-pear-Net_SMTP
90 Requires: php-pear-Net_Socket
91 Requires: php-pear-Net_URL
92 Requires: php-pear-Net_UserAgent_Detect
93 Requires: php-pear-PEAR
94 Requires: php-pear-Text_Diff
95 Requires: php-pear-XML_RPC
98 Requires: webserver = apache
99 Requires: apache(mod_dir)
100 Requires(triggerpostun): sed >= 4.0
101 Conflicts: apache1 < 1.3.33-2
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define _libdir %{_prefix}/lib/%{name}
106 %define _appdir %{_datadir}/%{name}
107 %define _smartyplugindir %{_appdir}/include/smarty
108 %define _webapps /etc/webapps
109 %define _webapp %{name}
110 %define _sysconfdir %{_webapps}/%{_webapp}
113 Eventum is a user-friendly and flexible issue tracking system that can
114 be used by a support department to track incoming technical support
115 requests, or by a software development team to quickly organize tasks
116 and bugs. Eventum is used by the MySQL AB Technical Support team, and
117 has allowed us to dramatically improve our response times.
120 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
121 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
122 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
123 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
124 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
128 Summary: Eventum base package
129 Summary(pl): Podstawowy pakiet Eventum
130 Group: Applications/WWW
131 Requires(pre): /bin/id
132 Requires(pre): /usr/bin/getgid
133 Requires(pre): /usr/sbin/useradd
134 Requires(pre): /usr/sbin/groupadd
135 Requires(postun): /usr/sbin/userdel
136 Requires(postun): /usr/sbin/groupdel
137 Provides: user(eventum)
138 Provides: group(eventum)
141 This package contains base directory structure for Eventum.
143 %description base -l pl
144 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
147 Summary: Eventum setup package
148 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
149 Group: Applications/WWW
150 Requires: %{name} = %{epoch}:%{version}-%{release}
153 Install this package to configure initial Eventum installation. You
154 should uninstall this package when you're done, as it considered
155 insecure to keep the setup files in place.
157 %description setup -l pl
158 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
159 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
160 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
163 Summary: Eventum mail queue process
164 Summary(pl): Przetwarzanie kolejki poczty Eventum
165 Group: Applications/WWW
166 Requires: %{name} = %{epoch}:%{version}-%{release}
169 %description mail-queue
170 Beginning with the first release of Eventum, emails are not directly
171 sent out from the various scripts, but rather added to a mail queue
172 table that is processed by a cron job. If an email cannot be sent, it
173 will be marked as such in the mail queue log, and the cron job script
174 will re-try to send it again the next time it runs.
176 This package contains the cron job.
178 %description mail-queue -l pl
179 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
180 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
181 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
182 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
185 Ten pakiet zawiera zadanie dla crona.
187 %package mail-download
188 Summary: Eventum email download
189 Summary(pl): ¦ci±ganie poczty Eventum
190 Group: Applications/WWW
191 Requires: %{name} = %{epoch}:%{version}-%{release}
194 %description mail-download
195 In order for Eventum's email integration feature to work, you need to
196 setup a cron job to run the script every so often.
198 This package contains the cron job.
200 %description mail-download -l pl
201 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
202 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
205 Ten pakiet zawiera zadanie dla crona.
208 Summary: Eventum Reminder System
209 Summary(pl): System przypominania dla Eventum
210 Group: Applications/WWW
211 Requires: %{name} = %{epoch}:%{version}-%{release}
214 %description reminder
215 The reminder system was designed with the objective as serving as a
216 safe net for issues that need attention. Depending on what
217 configuration you create, you may have several reminders (or alerts)
218 be sent out whenever an issue needs attention, for whatever parameter
219 you may deem necessary.
221 This package contains the cron job.
223 %description reminder -l pl
224 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
225 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
226 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
227 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
230 Ten pakiet zawiera zadanie dla crona.
233 Summary: Eventum Heartbeat Monitor
234 Summary(pl): Monitor ¿ycia dla Eventum
235 Group: Applications/WWW
236 Requires: %{name} = %{epoch}:%{version}-%{release}
241 The heartbeat monitor is a feature designed for the administrator that
242 wants to be alerted whenever a common problem in Eventum is detected,
243 like the database server not being available anymore, or maybe when
244 the recommended permissions for certain configuration files are
247 Please note that before running the heartbeat monitor, you may need to
248 customize some of the checks to be appropriate for your own system,
249 particularly the permission and file checks on
250 Monitor::checkConfiguration().
252 This package contains the cron job.
254 %description monitor -l pl
255 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
256 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
257 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
258 do plików konfiguracyjnych.
260 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
261 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
262 testów uprawnieñ i plików w Monitor::checkConfiguration().
264 Ten pakiet zawiera zadanie dla crona.
266 %package route-emails
267 Summary: Eventum Email Routing
268 Summary(pl): Przekazywanie poczty dla Eventum
269 Group: Applications/WWW
270 Requires: %{name} = %{epoch}:%{version}-%{release}
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: eventum(router)
298 %description route-notes
299 The note routing feature is used to automatically associate a thread
300 of notes into an Eventum issue. By setting up qmail (or even postfix)
301 to deliver emails sent to a specific address (usually
302 note-<number>@<domain>) to the above script, users are able to use
303 their email clients to reply to internal notes coming from Eventum,
304 and those replies will be automatically associated with the issue and
305 broadcasted to the notification list staff members.
307 %description route-notes -l pl
308 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
309 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
310 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
311 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
312 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
313 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
314 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
316 %package router-qmail
317 Summary: Eventum Mail Routing - qmail
318 Summary(pl): Przekazywanie poczty Eventum - qmail
319 Group: Applications/Mail
320 # loose dep is intentional. qmail subpackage isn't built on PLD
321 # builders and there really nothing changes.
322 Requires: %{name} >= %{epoch}:%{version}-%{release}
323 Requires: qmail >= 1.03
324 Provides: eventum(router)
325 Obsoletes: eventum(router)
327 %description router-qmail
328 This package provides way of routing notes and emails back to Eventum
331 %description router-qmail -l pl
332 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
335 %package router-postfix
336 Summary: Eventum Mail Routing - Postfix
337 Summary(pl): Przekazywanie poczty Eventum - Postfix
338 Group: Applications/Mail
339 Requires: %{name} = %{epoch}:%{version}-%{release}
341 Provides: eventum(router)
342 Obsoletes: eventum(router)
344 %description router-postfix
345 This package provides way of routing notes and emails back to Eventum
348 %description router-postfix -l pl
349 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
353 Summary: Eventum IRC Notification Bot
354 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
355 Group: Applications/WWW
356 Requires(triggerpostun): sed >= 4.0
357 Requires: %{name} = %{epoch}:%{version}-%{release}
358 Requires: php-sockets
359 #Requires: php-pear-Net_SmartIRC
360 Requires: rc-scripts >= 0.4.0.18
363 The IRC notification bot is a nice feature for remote teams that want
364 to handle issues and want to have a quick and easy way to get simple
365 notifications. Right now the bot notifies of the following actions:
368 - Issues that got their assignment list changed
370 NOTE: You will need to manually edit the bot.php script to set your
371 appropriate preferences, like IRC server and channel that the bot
374 %description irc -l pl
375 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
376 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
377 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
378 nastêpuj±cych zdarzeniach:
380 - zablokowanych listach
381 - sprawach, dla których zmieni³a siê lista powi±zañ
383 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
384 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
387 Summary: Eventum command-line interface
388 Summary(pl): Interfejs linii poleceñ dla Eventum
389 Group: Applications/WWW
390 Requires: %{name}-base = %{epoch}:%{version}-%{release}
391 Requires: php-common >= 3:4.1.0
395 Requires: php-pear-XML_RPC
398 The Eventum command-line interface allows you to access most of the
399 features of the web interface straight from your command shell.
401 %description cli -l pl
402 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
403 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
406 Summary: Eventum SCM integration
407 Summary(pl): Integracja SCM dla Eventum
408 Group: Applications/WWW
409 Requires: %{name}-base = %{epoch}:%{version}-%{release}
410 Requires: php-common >= 3:4.1.0
415 This feature allows your software development teams to integrate your
416 Source Control Management system with your Issue Tracking System.
418 The integration is implemented in such a way that it will be forward
419 compatible with pretty much any SCM system, such as CVS.
422 </eventum/help.php?topic=scm_integration_installation>.
424 %description scm -l pl
425 Ten pakiet pozwala zespo³om programistów na integracjê systemu
426 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
429 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
430 prawie ka¿dym systemem SCM, jak np. CVS.
432 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
433 </eventum/help.php?topic=scm_integration_installation>.
436 %setup -q %{?_snap:-n %{name}-%{_snap}}
438 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
441 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
442 rm -rf misc/upgrade/flush_compiled_templates.php
444 # using system package
445 #rm -rf include/pear/Net/SmartIRC*
448 %patch0 -p1 -b .paths
450 %patch2 -p1 -b .irc-config
451 %{?with_pear:%patch3 -p1 -b .PEAR}
463 # replace in remaining scripts config.inc.php to system one
464 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
465 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
468 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
469 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
471 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
474 rm -rf $RPM_BUILD_ROOT
476 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
477 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
478 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
479 $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
480 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
482 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
483 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
484 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
485 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
486 cp -a templates $RPM_BUILD_ROOT%{_appdir}
487 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
488 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
489 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
490 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
492 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
493 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
494 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
497 install -d $RPM_BUILD_ROOT%{_appdir}/cli
498 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
499 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
500 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
501 misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
502 cp -f misc/cli/eventumrc_example eventumrc
505 echo '#!%{_bindir}/php4 -q' > %{name}-scm
506 cat misc/scm/process_cvs_commits.php >> %{name}-scm
507 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
510 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
511 # change private key, so we can easily grep
513 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
514 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
516 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
517 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
518 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
519 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
520 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
521 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
522 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
523 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
524 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
525 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
526 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
527 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
530 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
531 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
533 # sample, not used in eventum
534 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
538 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
542 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
543 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
544 # These plugins are not in Smarty package (Smarty-2.6.2-3)
546 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
547 include/Smarty/plugins/modifier.highlight_quoted.php \
548 $RPM_BUILD_ROOT%{_smartyplugindir}
552 d=$RPM_BUILD_ROOT/var/lib/%{name}
553 echo 'root' > $d/.qmail
554 echo 'root' > $d/.qmail-default
555 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
556 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
557 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
558 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
562 rm -rf $RPM_BUILD_ROOT
565 %addusertogroup http %{name}
568 # check if the package is configured.
569 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
570 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
571 %banner %{name} -e <<EOF
573 You haven't yet configured Eventum!
574 Please open in browser <http://localhost/eventum/>
575 If you need access from elsewhere, you need to edit
576 %{_sysconfdir}/apache.conf and restart apache.
578 IMPORTANT: When You have configured Eventum, please uninstall the
579 setup package, so that %{name}-setup is able to secure your Eventum
585 %banner %{name} -e <<EOF
587 You haven't yet configured Eventum!
589 To setup eventum, please install %{name}-setup and open in browser
590 <http://localhost/eventum/>.
591 If you need access from elsewhere, you need to edit
592 %{_sysconfdir}/apache.conf and restart apache.
594 IMPORTANT: When You have configured Eventum, please uninstall the
595 setup package, so that %{name}-setup is able to secure your Eventum
602 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
603 %banner %{name} -e <<EOF
605 You have default private key installed!
607 Install %{name}-setup and open up http://yourserver/eventum/setup/
608 -- that will help you setup initial config.
610 when have configured Eventum, please uninstall the setup package,
611 so that %{name}-setup is able to secure your Eventum installation.
614 elif [ -d %{_appdir}/setup ]; then
615 %banner %{name} -e <<EOF
617 If you have have configured Eventum, please uninstall the setup package,
618 so that %{name}-setup is able to secure your Eventum installation.
623 # nuke Smarty templates cache after upgrade
624 rm -f /var/cache/eventum/*.php
627 if [ "$1" = "0" ]; then
629 rm -f /var/cache/eventum/*.php 2>/dev/null || :
633 %groupadd -P %{name}-base -g 146 %{name}
634 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
637 if [ "$1" = "0" ]; then
644 CF=/etc/qmail/control/virtualdomains
645 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
646 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
647 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
649 echo "#${FQDN}:%{name}" >> $CF
651 %banner %{name}-qmail -e <<EOF
653 Added "#${FQDN}:%{name}" to $CF,
654 Please verify that it is correct and restart qmail:
655 # service qmail reload
657 Consult qmail-send(8) for more information on virtualdomains.
663 if [ "$1" = "0" ]; then
664 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
669 chmod 660 %{_sysconfdir}/{config,private_key}.php
670 chown root:eventum %{_sysconfdir}/{config,private_key}.php
673 if [ "$1" = "0" ]; then
674 chmod 640 %{_sysconfdir}/{config,private_key}.php
675 chown root:eventum %{_sysconfdir}/{config,private_key}.php
679 /sbin/chkconfig --add eventum-irc
680 if [ -f /var/lock/subsys/eventum-irc ]; then
681 /etc/rc.d/init.d/eventum-irc restart >&2
683 echo "Run \"/etc/rc.d/init.d/eventum-irc start\" to start Eventum IRC Bot." >&2
686 %triggerin -- apache1
687 %webapp_register apache %{_webapp}
689 %triggerun -- apache1
690 %webapp_unregister apache %{_webapp}
692 %triggerin -- apache >= 2.0.0
693 %webapp_register httpd %{_webapp}
695 %triggerun -- apache >= 2.0.0
696 %webapp_unregister httpd %{_webapp}
699 # only one upgrade trigger is called if you're upgrading over two
700 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
701 # use common trigger (the highest version and rpmvercmp from poldek?)
702 %triggerpostun -- eventum < 1.5.1-0.257
703 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
704 database_changes.php Perform database changes
707 %triggerpostun -- eventum < 1.5.2-0.289
708 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
709 database_changes.php Perform database changes
710 set_priority_ranks.php Fix the ranking of priority values
713 %triggerpostun -- eventum < 1.5.3-0.291
714 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
715 database_changes.php Perform database changes
718 %triggerpostun -- eventum < 1.5.4-1.12
719 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
720 database_changes.php Perform database changes
723 %triggerpostun -- eventum < 1.6.0-RC2.6
724 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
725 database_changes.php Perform database changes
726 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
729 %triggerpostun -- eventum < 1.6.1-0.2
730 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
731 database_changes.php Perform database changes
734 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
736 s,\$irc_host,$irc_server_hostname,
737 s,\$irc_port,$irc_server_port,
738 s,\$irc_nick,$nickname,
739 s,\$irc_realname,$realname,
740 s,\$irc_username,$username,
741 s,\$irc_password,$password,
742 ' /etc/eventum/irc.php
744 %triggerpostun -- eventum < 1.7.0-0.20051130.4.25
745 # migrate from apache-config macros
746 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
747 if [ -d /etc/apache/webapps.d ]; then
748 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
749 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
752 if [ -d /etc/httpd/webapps.d ]; then
753 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
754 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
758 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
759 /usr/sbin/webapp register apache %{_webapp}
760 rm -f /etc/apache/conf.d/99_%{_webapp}.conf
761 if [ -f /var/lock/subsys/apache ]; then
762 /etc/rc.d/init.d/apache reload 1>&2
765 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
766 /usr/sbin/webapp register httpd %{_webapp}
767 rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
768 if [ -f /var/lock/subsys/httpd ]; then
769 /etc/rc.d/init.d/httpd reload 1>&2
773 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
774 database_changes.php Perform database changes
775 set_root_message_ids.php Set iss_root_message_id
779 for i in apache.conf config.php private_key.php setup.php; do
780 if [ -f /etc/eventum/$i.rpmsave ]; then
781 mv -f %{_sysconfdir}/$i{,.rpmnew}
782 mv -f /etc/eventum/$i.rpmsave %{_sysconfdir}/$i
786 %triggerpostun cli -- %{name}-cli < 1.6.1-4.16
787 if [ -f /etc/eventum/cli.php.rpmsave ]; then
788 mv -f %{_sysconfdir}/cli.php{,.rpmnew}
789 mv -f /etc/eventum/cli.php.rpmsave %{_sysconfdir}/cli.php
792 %triggerpostun irc -- %{name}-irc < 1.6.1-4.17
793 if [ -f /etc/eventum/irc.php.rpmsave ]; then
794 mv -f %{_sysconfdir}/irc.php{,.rpmnew}
795 mv -f /etc/eventum/irc.php.rpmsave %{_sysconfdir}/irc.php
799 %defattr(644,root,root,755)
800 %doc ChangeLog FAQ INSTALL README UPGRADE
801 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
802 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
803 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
804 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
805 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
806 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
807 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
809 %dir %attr(731,root,eventum) /var/log/%{name}
810 %attr(620,root,eventum) %ghost /var/log/%{name}/*
812 %dir %{_appdir}/htdocs
813 %{_appdir}/htdocs/*.php
814 %{_appdir}/htdocs/*.ico
815 %{_appdir}/htdocs/css
816 %{_appdir}/htdocs/customer
817 %{_appdir}/htdocs/images
819 %{_appdir}/htdocs/manage
820 %{_appdir}/htdocs/reports
821 %{_appdir}/htdocs/rpc
822 %{_appdir}/htdocs/misc
825 %dir %{_appdir}/upgrade
826 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
827 %{_appdir}/upgrade/[!u]*
831 %{_appdir}/include/pear
834 %dir %{_appdir}/include
835 %{_appdir}/include/customer
836 %{_appdir}/include/jpgraph
837 %{_appdir}/include/workflow
838 %{_appdir}/include/class.[!m]*.php
839 %{_appdir}/include/class.mail.php
840 %{_appdir}/include/class.mail_queue.php
841 %{_appdir}/include/class.mime_helper.php
842 %{_appdir}/include/class.misc.php
843 %{_appdir}/include/db_access.php
845 %dir %attr(730,root,eventum) /var/run/%{name}
846 %dir %attr(730,root,eventum) /var/cache/%{name}
849 %defattr(644,root,root,755)
850 %attr(751,root,root) %dir %{_sysconfdir}
853 # qmail will ignore user, if it's home directory is not owned
854 %attr(750,eventum,eventum) %dir /var/lib/%{name}
855 # for saved routed emails
856 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
859 %defattr(644,root,root,755)
860 %{_appdir}/htdocs/setup
863 %defattr(644,root,root,755)
864 %{_appdir}/process_mail_queue.php
865 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
868 %defattr(644,root,root,755)
869 %{_appdir}/download_emails.php
870 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
873 %defattr(644,root,root,755)
874 %{_appdir}/check_reminders.php
875 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
878 %defattr(644,root,root,755)
879 %{_appdir}/include/class.monitor.php
880 %{_appdir}/monitor.php
881 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
884 %defattr(644,root,root,755)
885 %{_appdir}/route_emails.php
888 %defattr(644,root,root,755)
889 %{_appdir}/route_drafts.php
890 %{_appdir}/route_notes.php
894 %defattr(644,root,root,755)
895 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
896 %attr(755,root,root) %{_libdir}/router-qmail
899 %files router-postfix
900 %defattr(644,root,root,755)
903 %defattr(644,root,root,755)
904 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
905 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
907 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
910 %defattr(644,root,root,755)
912 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
913 %attr(755,root,root) %{_bindir}/%{name}
917 %defattr(644,root,root,755)
918 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
919 %attr(755,root,root) %{_libdir}/scm