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)
11 # - php4-pgsql crashes php (at least 4.3.11-1)
13 %bcond_with pear # build with system PEAR packages (or use bundled ones)
14 %bcond_with qmail # build the router-qmail subpackage
20 #define _snap 20050227
23 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
25 %define _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
30 Summary: Eventum Issue / Bug tracking system
31 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
34 Release: %{?_snap:0.%{_snap}.}%{_rel}
36 Group: Applications/WWW
38 # Source0-md5: e8a5ac661d7ebdd71c8b38695c6e4af8
39 Source1: %{name}-apache.conf
40 Source2: %{name}-mail-queue.cron
41 Source3: %{name}-mail-download.cron
42 Source4: %{name}-reminder.cron
43 Source5: %{name}-monitor.cron
44 Source6: %{name}-cvs.php
45 Source7: %{name}-irc.php
46 Source8: %{name}-irc.init
47 Source9: %{name}-irc.sysconfig
48 Source10: %{name}-config.php
49 Source11: %{name}-router-qmail.sh
50 Source12: http://dev.mysql.com/common/favicon.ico
51 # Source12-md5: 858be0130832da4144c08d4b59116411
52 Source13: %{name}-config-setup.php
53 Source14: %{name}-upgrade.sh
54 Patch0: %{name}-paths.patch
55 Patch1: %{name}-cvs-config.patch
56 Patch2: %{name}-irc-config.patch
57 Patch3: %{name}-PEAR.patch
58 Patch4: http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
59 Patch5: %{name}-lf.patch
60 Patch6: http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
61 Patch7: %{name}-auth-repliers.patch
62 URL: http://dev.mysql.com/downloads/other/eventum/
63 BuildRequires: rpmbuild(macros) >= 1.200
64 BuildRequires: sed >= 4.0
65 Requires: php >= 4.2.0
70 Requires: %{name}-base = %{epoch}:%{version}-%{release}
71 Requires: Smarty >= 2.6.2
73 Requires: php-pear-Benchmark
75 Requires: php-pear-Date
76 Requires: php-pear-HTTP_Request
77 Requires: php-pear-Mail
78 Requires: php-pear-Math_Stats
79 Requires: php-pear-Net_DIME
80 Requires: php-pear-Net_POP3
81 Requires: php-pear-Net_SMTP
82 Requires: php-pear-Net_SmartIRC
83 Requires: php-pear-Net_Socket
84 Requires: php-pear-Net_URL
85 Requires: php-pear-Net_UserAgent_Detect
86 Requires: php-pear-PEAR
87 Requires: php-pear-Text_Diff
88 Requires: php-pear-XML_RPC
90 Requires: apache >= 1.3.33-2
91 Requires: apache(mod_dir)
92 Requires(triggerpostun): sed >= 4.0
94 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96 %define _sysconfdir /etc/%{name}
97 %define _libdir %{_prefix}/%{_lib}/%{name}
98 %define _appdir %{_datadir}/%{name}
99 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
101 %define _apache1dir /etc/apache
102 %define _apache2dir /etc/httpd
105 Eventum is a user-friendly and flexible issue tracking system that can
106 be used by a support department to track incoming technical support
107 requests, or by a software development team to quickly organize tasks
108 and bugs. Eventum is used by the MySQL AB Technical Support team, and
109 has allowed us to dramatically improve our response times.
112 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
113 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
114 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
115 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
116 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
120 Summary: Eventum base package
121 Summary(pl): Podstawowy pakiet Eventum
122 Group: Applications/WWW
123 Requires(pre): /bin/id
124 Requires(pre): /usr/bin/getgid
125 Requires(pre): /usr/sbin/useradd
126 Requires(pre): /usr/sbin/groupadd
127 Provides: user(eventum)
128 Provides: group(eventum)
131 This package contains base directory structure for Eventum.
133 %description base -l pl
134 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
137 Summary: Eventum setup package
138 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
139 Group: Applications/WWW
140 PreReq: %{name} = %{epoch}:%{version}-%{release}
143 Install this package to configure initial Eventum installation. You
144 should uninstall this package when you're done, as it considered
145 insecure to keep the setup files in place.
147 %description setup -l pl
148 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
149 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
150 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
153 Summary: Eventum mail queue process
154 Summary(pl): Przetwarzanie kolejki poczty Eventum
155 Group: Applications/WWW
156 Requires: %{name} = %{epoch}:%{version}-%{release}
158 Requires: php >= 4.1.0
160 %description mail-queue
161 Beginning with the first release of Eventum, emails are not directly
162 sent out from the various scripts, but rather added to a mail queue
163 table that is processed by a cron job. If an email cannot be sent, it
164 will be marked as such in the mail queue log, and the cron job script
165 will re-try to send it again the next time it runs.
167 This package contains the cron job.
169 %description mail-queue -l pl
170 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
171 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
172 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
173 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
176 Ten pakiet zawiera zadanie dla crona.
178 %package mail-download
179 Summary: Eventum email download
180 Summary(pl): ¦ci±ganie poczty Eventum
181 Group: Applications/WWW
182 Requires: %{name} = %{epoch}:%{version}-%{release}
184 Requires: php >= 4.1.0
186 %description mail-download
187 In order for Eventum's email integration feature to work, you need to
188 setup a cron job to run the script every so often.
190 This package contains the cron job.
192 %description mail-download -l pl
193 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
194 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
197 Ten pakiet zawiera zadanie dla crona.
200 Summary: Eventum Reminder System
201 Summary(pl): System przypominania dla Eventum
202 Group: Applications/WWW
203 Requires: %{name} = %{epoch}:%{version}-%{release}
204 Requires: php >= 4.1.0
207 %description reminder
208 The reminder system was designed with the objective as serving as a
209 safe net for issues that need attention. Depending on what
210 configuration you create, you may have several reminders (or alerts)
211 be sent out whenever an issue needs attention, for whatever parameter
212 you may deem necessary.
214 This package contains the cron job.
216 %description reminder -l pl
217 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
218 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
219 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
220 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
223 Ten pakiet zawiera zadanie dla crona.
226 Summary: Eventum Heartbeat Monitor
227 Summary(pl): Monitor ¿ycia dla Eventum
228 Group: Applications/WWW
229 Requires: %{name} = %{epoch}:%{version}-%{release}
230 Requires: php >= 4.1.0
235 The heartbeat monitor is a feature designed for the administrator that
236 wants to be alerted whenever a common problem in Eventum is detected,
237 like the database server not being available anymore, or maybe when
238 the recommended permissions for certain configuration files are
241 Please note that before running the heartbeat monitor, you may need to
242 customize some of the checks to be appropriate for your own system,
243 particularly the permission and file checks on
244 Monitor::checkConfiguration().
246 This package contains the cron job.
248 %description monitor -l pl
249 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
250 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
251 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
252 do plików konfiguracyjnych.
254 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
255 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
256 testów uprawnieñ i plików w Monitor::checkConfiguration().
258 Ten pakiet zawiera zadanie dla crona.
260 %package route-emails
261 Summary: Eventum Email Routing
262 Summary(pl): Przekazywanie poczty dla Eventum
263 Group: Applications/WWW
264 Requires: %{name} = %{epoch}:%{version}-%{release}
265 Requires: php >= 4.1.0
266 Requires: eventum(router)
268 %description route-emails
269 The email routing feature is used to automatically associate a thread
270 of emails into an Eventum issue. By setting up qmail (or even postfix)
271 to deliver emails sent to a specific address (usually
272 issue-<number>@<domain>) to the above script, users are able to use
273 their email clients to reply to emails coming from Eventum, and those
274 replies will be automatically associated with the issue and
275 broadcasted to the entire notification list.
277 %description route-emails -l pl
278 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
279 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
280 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
281 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
282 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
283 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
284 rozprowadzane do ca³ej listy og³oszeniowej.
287 Summary: Eventum Note Routing
288 Summary(pl): Przekazywanie notatek dla Eventum
289 Group: Applications/WWW
290 Requires: %{name} = %{epoch}:%{version}-%{release}
291 Requires: php >= 4.1.0
292 Requires: eventum(router)
294 %description route-notes
295 The note routing feature is used to automatically associate a thread
296 of notes into an Eventum issue. By setting up qmail (or even postfix)
297 to deliver emails sent to a specific address (usually
298 note-<number>@<domain>) to the above script, users are able to use
299 their email clients to reply to internal notes coming from Eventum,
300 and those replies will be automatically associated with the issue and
301 broadcasted to the notification list staff members.
303 %description route-notes -l pl
304 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
305 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
306 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
307 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
308 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
309 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
310 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
312 %package router-qmail
313 Summary: Eventum Mail Routing - qmail
314 Summary(pl): Przekazywanie poczty Eventum - qmail
315 Group: Applications/Mail
316 Requires: %{name} = %{epoch}:%{version}-%{release}
317 Requires: qmail >= 1.03
318 Provides: eventum(router)
319 Obsoletes: eventum(router)
321 %description router-qmail
322 This package provides way of routing notes and emails back to Eventum
325 %description router-qmail -l pl
326 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
329 %package router-postfix
330 Summary: Eventum Mail Routing - Postfix
331 Summary(pl): Przekazywanie poczty Eventum - Postfix
332 Group: Applications/Mail
333 Requires: %{name} = %{epoch}:%{version}-%{release}
335 Provides: eventum(router)
336 Obsoletes: eventum(router)
338 %description router-postfix
339 This package provides way of routing notes and emails back to Eventum
342 %description router-postfix -l pl
343 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
347 Summary: Eventum IRC Notification Bot
348 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
349 Group: Applications/WWW
350 Requires: %{name} = %{epoch}:%{version}-%{release}
351 Requires: php >= 4.1.0
352 Requires: php-sockets
353 Requires: rc-scripts >= 0.4.0.18
356 The IRC notification bot is a nice feature for remote teams that want
357 to handle issues and want to have a quick and easy way to get simple
358 notifications. Right now the bot notifies of the following actions:
361 - Issues that got their assignment list changed
363 NOTE: You will need to manually edit the bot.php script to set your
364 appropriate preferences, like IRC server and channel that the bot
367 %description irc -l pl
368 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
369 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
370 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
371 nastêpuj±cych zdarzeniach:
373 - zablokowanych listach
374 - sprawach, dla których zmieni³a siê lista powi±zañ
376 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
377 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
380 Summary: Eventum command-line interface
381 Summary(pl): Interfejs linii poleceñ dla Eventum
382 Group: Applications/WWW
383 Requires: %{name}-base = %{epoch}:%{version}-%{release}
384 Requires: php >= 4.1.0
388 Requires: php-pear-XML_RPC
391 The Eventum command-line interface allows you to access most of the
392 features of the web interface straight from your command shell.
394 %description cli -l pl
395 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
396 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
399 Summary: Eventum SCM integration
400 Summary(pl): Integracja SCM dla Eventum
401 Group: Applications/WWW
402 Requires: %{name}-base = %{epoch}:%{version}-%{release}
403 Requires: php >= 4.1.0
406 This feature allows your software development teams to integrate your
407 Source Control Management system with your Issue Tracking System.
409 The integration is implemented in such a way that it will be forward
410 compatible with pretty much any SCM system, such as CVS.
413 </eventum/help.php?topic=scm_integration_installation>.
415 %description scm -l pl
416 Ten pakiet pozwala zespo³om programistów na integracjê systemu
417 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
420 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
421 prawie ka¿dym systemem SCM, jak np. CVS.
423 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
424 </eventum/help.php?topic=scm_integration_installation>.
427 %setup -q %{?_snap:-n %{name}-%{_snap}}
429 find . -type f -print0 | xargs -0 sed -i -e 's,
433 %patch0 -p1 -b .paths
436 %{?with_pear:%patch3 -p1 -b .PEAR}
444 # replace in remaining scripts config.inc.php to system one
445 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
446 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
449 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
450 ' misc/download_emails.php
452 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
453 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
455 find -name '*~' | xargs -r rm -v
458 rm -rf $RPM_BUILD_ROOT
460 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
461 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
462 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
463 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
465 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
466 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
467 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
468 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
469 cp -a templates $RPM_BUILD_ROOT%{_appdir}
470 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
471 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
472 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
473 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
475 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
476 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
477 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
480 install -d $RPM_BUILD_ROOT%{_appdir}/cli
481 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
482 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
483 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
484 misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
485 cp -f misc/cli/eventumrc_example eventumrc
488 echo '#!%{_bindir}/php4 -q' > %{name}-scm
489 cat misc/scm/process_cvs_commits.php >> %{name}-scm
490 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
493 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
494 # change private key, so we can easily grep
496 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
497 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
499 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
500 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
501 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
502 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
503 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
504 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
505 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
506 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
507 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
508 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
509 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
512 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
513 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
515 # sample, not used in eventum
516 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
520 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
524 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
525 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
526 # These plugins are not in Smarty package (Smarty-2.6.2-3)
527 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
528 $RPM_BUILD_ROOT%{_smartyplugindir}
531 d=$RPM_BUILD_ROOT/var/lib/%{name}
532 echo 'root' > $d/.qmail
533 echo 'root' > $d/.qmail-default
534 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
535 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
536 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
537 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
540 rm -rf $RPM_BUILD_ROOT
543 %addusertogroup http %{name}
547 if [ -d %{_apache1dir}/conf.d ]; then
548 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
549 if [ -f /var/lock/subsys/apache ]; then
550 /etc/rc.d/init.d/apache restart 1>&2
554 if [ -d %{_apache2dir}/httpd.conf ]; then
555 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
556 if [ -f /var/lock/subsys/httpd ]; then
557 /etc/rc.d/init.d/httpd restart 1>&2
561 # check if the package is configured.
562 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
563 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 if [ -f %{_apache1dir}/apache.conf ]; then
623 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
624 if [ -f /var/lock/subsys/apache ]; then
625 /etc/rc.d/init.d/apache restart 1>&2
629 if [ -d %{_apache2dir}/httpd.conf ]; then
630 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
631 if [ -f /var/lock/subsys/httpd ]; then
632 /etc/rc.d/init.d/httpd restart 1>&2
637 rm -f /var/cache/eventum/*.php 2>/dev/null || :
641 %groupadd -P %{name}-base -g %{gid} %{name}
642 %useradd -P %{name}-base -u %{uid} -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
645 if [ "$1" = "0" ]; then
652 CF=/etc/qmail/control/virtualdomains
653 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
654 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
655 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
657 echo "#${FQDN}:%{name}" >> $CF
659 %banner %{name}-qmail -e <<EOF
661 Added "#${FQDN}:%{name}" to $CF,
662 Please verify that it is correct and restart qmail:
663 # service qmail reload
665 Consult qmail-send(8) for more information on virtualdomains.
671 if [ "$1" = "0" ]; then
672 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
677 chmod 660 %{_sysconfdir}/{config,private_key}.php
678 chown root:eventum %{_sysconfdir}/{config,private_key}.php
681 if [ "$1" = "0" ]; then
682 chmod 640 %{_sysconfdir}/{config,private_key}.php
683 chown root:eventum %{_sysconfdir}/{config,private_key}.php
687 # only one upgrade trigger is called if you're upgrading over two
688 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
689 # use common trigger (the highest version and rpmvercmp from poldek?)
690 %triggerpostun -- eventum < 1.5.1-0.257
691 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
692 database_changes.php Perform database changes
695 %triggerpostun -- eventum < 1.5.2-0.289
696 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
697 database_changes.php Perform database changes
698 set_priority_ranks.php Fix the ranking of priority values
701 %triggerpostun -- eventum < 1.5.3-0.291
702 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
703 database_changes.php Perform database changes
707 %defattr(644,root,root,755)
708 %doc ChangeLog FAQ INSTALL README UPGRADE
709 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
710 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
711 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
712 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
713 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
714 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
716 %dir %attr(731,root,eventum) /var/log/%{name}
717 %attr(620,root,eventum) %ghost /var/log/%{name}/*
719 %dir %{_appdir}/htdocs
720 %{_appdir}/htdocs/*.php
721 %{_appdir}/htdocs/*.ico
722 %{_appdir}/htdocs/css
723 %{_appdir}/htdocs/customer
724 %{_appdir}/htdocs/images
726 %{_appdir}/htdocs/manage
727 %{_appdir}/htdocs/reports
728 %{_appdir}/htdocs/rpc
729 %{_appdir}/htdocs/misc
732 %dir %{_appdir}/upgrade
733 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
734 %{_appdir}/upgrade/[!u]*
736 %{_smartyplugindir}/*
738 %{_appdir}/include/pear
741 %dir %{_appdir}/include
742 %{_appdir}/include/customer
743 %{_appdir}/include/jpgraph
744 %{_appdir}/include/workflow
745 %{_appdir}/include/class.[!m]*.php
746 %{_appdir}/include/class.mail.php
747 %{_appdir}/include/class.mail_queue.php
748 %{_appdir}/include/class.mime_helper.php
749 %{_appdir}/include/class.misc.php
750 %{_appdir}/include/db_access.php
751 %{_appdir}/include/jsrsServer.inc.php
753 %dir %attr(730,root,eventum) /var/run/%{name}
754 %dir %attr(730,root,eventum) /var/cache/%{name}
757 %defattr(644,root,root,755)
758 %attr(751,root,root) %dir %{_sysconfdir}
761 # qmail will ignore user, if it's home directory is not owned
762 %attr(750,eventum,eventum) %dir /var/lib/%{name}
765 %defattr(644,root,root,755)
766 %{_appdir}/htdocs/setup
769 %defattr(644,root,root,755)
770 %{_appdir}/process_mail_queue.php
771 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
774 %defattr(644,root,root,755)
775 %{_appdir}/download_emails.php
776 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
779 %defattr(644,root,root,755)
780 %{_appdir}/check_reminders.php
781 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
784 %defattr(644,root,root,755)
785 %{_appdir}/include/class.monitor.php
786 %{_appdir}/monitor.php
787 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
790 %defattr(644,root,root,755)
791 %{_appdir}/route_emails.php
794 %defattr(644,root,root,755)
795 %{_appdir}/route_drafts.php
796 %{_appdir}/route_notes.php
800 %defattr(644,root,root,755)
801 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
802 %attr(755,root,root) %{_libdir}/router-qmail
805 %files router-postfix
806 %defattr(644,root,root,755)
809 %defattr(644,root,root,755)
810 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
811 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
813 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
816 %defattr(644,root,root,755)
818 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
819 %attr(755,root,root) %{_bindir}/%{name}
823 %defattr(644,root,root,755)
824 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
825 %attr(755,root,root) %{_libdir}/scm