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
25 %define _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
27 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
30 %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: a13d95ff52264d7460c688419794ffcc
43 Source1: %{name}-apache.conf
44 Source2: %{name}-mail-queue.cron
45 Source3: %{name}-mail-download.cron
46 Source4: %{name}-reminder.cron
47 Source5: %{name}-monitor.cron
48 Source6: %{name}-cvs.php
49 Source7: %{name}-irc.php
50 Source8: %{name}-irc.init
51 Source9: %{name}-irc.sysconfig
52 Source10: %{name}-config.php
53 Source11: %{name}-router-qmail.sh
54 Source12: http://dev.mysql.com/common/favicon.ico
55 # Source12-md5: 858be0130832da4144c08d4b59116411
56 Source13: %{name}-config-setup.php
57 Source14: %{name}-upgrade.sh
58 Patch0: %{name}-paths.patch
59 Patch1: %{name}-cvs-config.patch
60 Patch2: %{name}-irc-config.patch
61 Patch3: %{name}-PEAR.patch
62 Patch4: http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
63 Patch5: %{name}-lf.patch
64 Patch6: http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
65 Patch7: %{name}-bot-reconnect.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 PreReq: rc-scripts >= 0.4.0.18
361 The IRC notification bot is a nice feature for remote teams that want
362 to handle issues and want to have a quick and easy way to get simple
363 notifications. Right now the bot notifies of the following actions:
366 - Issues that got their assignment list changed
368 NOTE: You will need to manually edit the bot.php script to set your
369 appropriate preferences, like IRC server and channel that the bot
372 %description irc -l pl
373 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
374 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
375 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
376 nastêpuj±cych zdarzeniach:
378 - zablokowanych listach
379 - sprawach, dla których zmieni³a siê lista powi±zañ
381 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
382 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
385 Summary: Eventum command-line interface
386 Summary(pl): Interfejs linii poleceñ dla Eventum
387 Group: Applications/WWW
388 Requires: %{name}-base = %{epoch}:%{version}-%{release}
389 Requires: php >= 4.1.0
393 Requires: php-pear-XML_RPC
396 The Eventum command-line interface allows you to access most of the
397 features of the web interface straight from your command shell.
399 %description cli -l pl
400 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
401 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
404 Summary: Eventum SCM integration
405 Summary(pl): Integracja SCM dla Eventum
406 Group: Applications/WWW
407 Requires: %{name}-base = %{epoch}:%{version}-%{release}
408 Requires: php-cli >= 4.1.0
412 This feature allows your software development teams to integrate your
413 Source Control Management system with your Issue Tracking System.
415 The integration is implemented in such a way that it will be forward
416 compatible with pretty much any SCM system, such as CVS.
419 </eventum/help.php?topic=scm_integration_installation>.
421 %description scm -l pl
422 Ten pakiet pozwala zespo³om programistów na integracjê systemu
423 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
426 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
427 prawie ka¿dym systemem SCM, jak np. CVS.
429 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
430 </eventum/help.php?topic=scm_integration_installation>.
433 %setup -q %{?_snap:-n %{name}-%{_snap}}
435 find . -type f -print0 | xargs -0 sed -i -e 's,
439 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
442 %patch0 -p1 -b .paths
445 %{?with_pear:%patch3 -p1 -b .PEAR}
454 # replace in remaining scripts config.inc.php to system one
455 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
456 s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
459 s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
460 ' misc/download_emails.php
462 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
463 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
465 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
468 rm -rf $RPM_BUILD_ROOT
470 $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
471 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
472 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
473 $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
474 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
476 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
477 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
478 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
479 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
480 cp -a templates $RPM_BUILD_ROOT%{_appdir}
481 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
482 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
483 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
484 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
486 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
487 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
488 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
491 install -d $RPM_BUILD_ROOT%{_appdir}/cli
492 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
493 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
494 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
495 misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
496 cp -f misc/cli/eventumrc_example eventumrc
499 echo '#!%{_bindir}/php4 -q' > %{name}-scm
500 cat misc/scm/process_cvs_commits.php >> %{name}-scm
501 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
504 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
505 # change private key, so we can easily grep
507 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
508 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
510 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
511 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
512 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
513 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
514 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
515 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
516 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
517 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
518 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
519 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
520 %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
523 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
524 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
526 # sample, not used in eventum
527 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
531 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
535 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
536 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
537 # These plugins are not in Smarty package (Smarty-2.6.2-3)
538 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
539 $RPM_BUILD_ROOT%{_smartyplugindir}
543 d=$RPM_BUILD_ROOT/var/lib/%{name}
544 echo 'root' > $d/.qmail
545 echo 'root' > $d/.qmail-default
546 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
547 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
548 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
549 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
553 rm -rf $RPM_BUILD_ROOT
556 %addusertogroup http %{name}
559 # check if the package is configured.
560 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
561 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
562 %banner %{name} -e <<EOF
564 You haven't yet configured Eventum!
565 Please open in browser <http://localhost/eventum/>
566 If you need access from elsewhere, you need to edit
567 %{_sysconfdir}/apache.conf and restart apache.
569 IMPORTANT: When You have configured Eventum, please uninstall the
570 setup package, so that %{name}-setup is able to secure your Eventum
576 %banner %{name} -e <<EOF
578 You haven't yet configured Eventum!
580 To setup eventum, please install %{name}-setup and open in browser
581 <http://localhost/eventum/>.
582 If you need access from elsewhere, you need to edit
583 %{_sysconfdir}/apache.conf and restart apache.
585 IMPORTANT: When You have configured Eventum, please uninstall the
586 setup package, so that %{name}-setup is able to secure your Eventum
593 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
594 %banner %{name} -e <<EOF
596 You have default private key installed!
598 Install %{name}-setup and open up http://yourserver/eventum/setup/
599 -- that will help you setup initial config.
601 when have configured Eventum, please uninstall the setup package,
602 so that %{name}-setup is able to secure your Eventum installation.
605 elif [ -d %{_appdir}/setup ]; then
606 %banner %{name} -e <<EOF
608 If you have have configured Eventum, please uninstall the setup package,
609 so that %{name}-setup is able to secure your Eventum installation.
614 # nuke Smarty templates cache after upgrade
615 rm -f /var/cache/eventum/*.php
618 if [ "$1" = "0" ]; then
620 rm -f /var/cache/eventum/*.php 2>/dev/null || :
624 %groupadd -P %{name}-base -g 146 %{name}
625 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
628 if [ "$1" = "0" ]; then
635 CF=/etc/qmail/control/virtualdomains
636 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
637 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
638 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
640 echo "#${FQDN}:%{name}" >> $CF
642 %banner %{name}-qmail -e <<EOF
644 Added "#${FQDN}:%{name}" to $CF,
645 Please verify that it is correct and restart qmail:
646 # service qmail reload
648 Consult qmail-send(8) for more information on virtualdomains.
654 if [ "$1" = "0" ]; then
655 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
660 chmod 660 %{_sysconfdir}/{config,private_key}.php
661 chown root:eventum %{_sysconfdir}/{config,private_key}.php
664 if [ "$1" = "0" ]; then
665 chmod 640 %{_sysconfdir}/{config,private_key}.php
666 chown root:eventum %{_sysconfdir}/{config,private_key}.php
669 %triggerin -- apache1 >= 1.3.33-2
670 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
672 %triggerun -- apache1 >= 1.3.33-2
673 %apache_config_uninstall -v 1
675 %triggerin -- apache >= 2.0.0
676 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
678 %triggerun -- apache >= 2.0.0
679 %apache_config_uninstall -v 2
682 # only one upgrade trigger is called if you're upgrading over two
683 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
684 # use common trigger (the highest version and rpmvercmp from poldek?)
685 %triggerpostun -- eventum < 1.5.1-0.257
686 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
687 database_changes.php Perform database changes
690 %triggerpostun -- eventum < 1.5.2-0.289
691 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
692 database_changes.php Perform database changes
693 set_priority_ranks.php Fix the ranking of priority values
696 %triggerpostun -- eventum < 1.5.3-0.291
697 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
698 database_changes.php Perform database changes
701 %triggerpostun -- eventum < 1.5.4-1.12
702 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
703 database_changes.php Perform database changes
706 %triggerpostun -- eventum < 1.6.0-RC2.6
707 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
708 database_changes.php Perform database changes
709 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
713 %defattr(644,root,root,755)
714 %doc ChangeLog FAQ INSTALL README UPGRADE
715 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
716 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
717 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
718 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
719 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
720 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
722 %dir %attr(731,root,eventum) /var/log/%{name}
723 %attr(620,root,eventum) %ghost /var/log/%{name}/*
725 %dir %{_appdir}/htdocs
726 %{_appdir}/htdocs/*.php
727 %{_appdir}/htdocs/*.ico
728 %{_appdir}/htdocs/css
729 %{_appdir}/htdocs/customer
730 %{_appdir}/htdocs/images
732 %{_appdir}/htdocs/manage
733 %{_appdir}/htdocs/reports
734 %{_appdir}/htdocs/rpc
735 %{_appdir}/htdocs/misc
738 %dir %{_appdir}/upgrade
739 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
740 %{_appdir}/upgrade/[!u]*
742 %{_smartyplugindir}/*
744 %{_appdir}/include/pear
747 %dir %{_appdir}/include
748 %{_appdir}/include/customer
749 %{_appdir}/include/jpgraph
750 %{_appdir}/include/workflow
751 %{_appdir}/include/class.[!m]*.php
752 %{_appdir}/include/class.mail.php
753 %{_appdir}/include/class.mail_queue.php
754 %{_appdir}/include/class.mime_helper.php
755 %{_appdir}/include/class.misc.php
756 %{_appdir}/include/db_access.php
758 %dir %attr(730,root,eventum) /var/run/%{name}
759 %dir %attr(730,root,eventum) /var/cache/%{name}
762 %defattr(644,root,root,755)
763 %attr(751,root,root) %dir %{_sysconfdir}
766 # qmail will ignore user, if it's home directory is not owned
767 %attr(750,eventum,eventum) %dir /var/lib/%{name}
768 # for saved routed emails
769 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
772 %defattr(644,root,root,755)
773 %{_appdir}/htdocs/setup
776 %defattr(644,root,root,755)
777 %{_appdir}/process_mail_queue.php
778 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
781 %defattr(644,root,root,755)
782 %{_appdir}/download_emails.php
783 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
786 %defattr(644,root,root,755)
787 %{_appdir}/check_reminders.php
788 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
791 %defattr(644,root,root,755)
792 %{_appdir}/include/class.monitor.php
793 %{_appdir}/monitor.php
794 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
797 %defattr(644,root,root,755)
798 %{_appdir}/route_emails.php
801 %defattr(644,root,root,755)
802 %{_appdir}/route_drafts.php
803 %{_appdir}/route_notes.php
807 %defattr(644,root,root,755)
808 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
809 %attr(755,root,root) %{_libdir}/router-qmail
812 %files router-postfix
813 %defattr(644,root,root,755)
816 %defattr(644,root,root,755)
817 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
818 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
820 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
823 %defattr(644,root,root,755)
825 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
826 %attr(755,root,root) %{_bindir}/%{name}
830 %defattr(644,root,root,755)
831 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
832 %attr(755,root,root) %{_libdir}/scm