2 # - discard bundled packages (from INSTALL):
3 # - JpGraph 1.5.3 (last GPL version)
4 # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
5 # - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
6 # - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
7 # - A few other small javascript libraries
8 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
11 %bcond_without pear # build with system PEAR packages (or use bundled ones)
12 %bcond_with qmail # build the router-qmail subpackage
15 %define _snap 20060306
19 %{?with_pear:%include /usr/lib/rpm/macros.php}
20 Summary: Eventum Issue / Bug tracking system
21 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
24 Release: %{?_snap:4.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
26 Group: Applications/WWW
27 #Source0: http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
28 Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
29 # Source0-md5: 1cc82b6e8a502c65341510400b6b1971
30 Source1: %{name}-apache.conf
31 Source2: %{name}-mail-queue.cron
32 Source3: %{name}-mail-download.cron
33 Source4: %{name}-reminder.cron
34 Source5: %{name}-monitor.cron
35 Source6: %{name}-cvs.php
36 Source7: %{name}-irc.php
37 Source8: %{name}-irc.init
38 Source9: %{name}-irc.sysconfig
39 Source10: %{name}-config.php
40 Source11: %{name}-router-qmail.sh
41 Source12: %{name}-config-setup.php
42 Source13: %{name}-upgrade.sh
43 Source14: %{name}-router-postfix.sh
44 Patch0: %{name}-paths.patch
45 Patch1: %{name}-cvs-config.patch
46 Patch2: %{name}-irc-config.patch
47 Patch3: %{name}-PEAR.patch
48 Patch4: http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
49 Patch5: %{name}-lf.patch
50 Patch6: http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
51 Patch7: %{name}-bot-reconnect.patch
52 Patch8: %{name}-perms.patch
53 Patch9: http://glen.alkohol.ee/pld/%{name}-httpclient-clientside.patch
54 Patch10: %{name}-cli-wr-separated.patch
55 Patch12: %{name}-htmloptions-truncate.patch
56 Patch13: %{name}-link_filter-updates.patch
57 Patch14: %{name}-irc-mem.patch
58 Patch16: %{name}-recent_activity-usability.patch
59 Patch17: http://glen.alkohol.ee/pld/%{name}-upload-error-keep-popup.patch
60 Patch18: http://glen.alkohol.ee/pld/%{name}-scm-parse-response.patch
61 Patch19: %{name}-double-decode.patch
62 Patch20: http://glen.alkohol.ee/pld/%{name}-keep-submitbutton.patch
63 Patch21: http://glen.alkohol.ee/pld/%{name}-tt-unhide.patch
64 Patch22: %{name}-route-mem.patch
65 URL: http://dev.mysql.com/downloads/other/eventum/
66 %{?with_pear:BuildRequires: rpm-php-pearprov >= 4.0.2-98}
67 BuildRequires: rpmbuild(macros) >= 1.268
68 BuildRequires: sed >= 4.0
69 Requires: %{name}-base = %{version}-%{release}
70 Requires: Smarty >= 2.6.10-4
71 Requires: php >= 3:4.2.0
78 Requires: php-pear-Benchmark
80 Requires: php-pear-Date
81 Requires: php-pear-HTTP_Request
82 Requires: php-pear-Mail
83 Requires: php-pear-Mail_Mime
84 Requires: php-pear-Math_Stats
85 Requires: php-pear-Net_DIME
86 Requires: php-pear-Net_SMTP
87 Requires: php-pear-Net_Socket
88 Requires: php-pear-Net_URL
89 Requires: php-pear-Net_UserAgent_Detect
90 Requires: php-pear-PEAR-core
91 Requires: php-pear-Text_Diff
92 Requires: php-pear-XML_RPC
94 Requires(triggerpostun): /usr/bin/php
95 Requires(triggerpostun): sed >= 4.0
96 Requires: apache(mod_dir)
98 Requires: webserver = apache
100 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102 %define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
104 %define _libdir %{_prefix}/lib/%{name}
105 %define _appdir %{_datadir}/%{name}
106 %define _smartyplugindir %{_appdir}/include/smarty
107 %define _smartydir /usr/share/php/Smarty
108 %define _webapps /etc/webapps
109 %define _webapp %{name}
110 %define _webappdir %{_webapps}/%{_webapp}
111 %define _sysconfdir /etc/%{name}
114 Eventum is a user-friendly and flexible issue tracking system that can
115 be used by a support department to track incoming technical support
116 requests, or by a software development team to quickly organize tasks
117 and bugs. Eventum is used by the MySQL AB Technical Support team, and
118 has allowed us to dramatically improve our response times.
121 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
122 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
123 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
124 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
125 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
129 Summary: Eventum base package
130 Summary(pl): Podstawowy pakiet Eventum
131 Group: Applications/WWW
132 Requires(postun): /usr/sbin/groupdel
133 Requires(postun): /usr/sbin/userdel
134 Requires(pre): /bin/id
135 Requires(pre): /usr/bin/getgid
136 Requires(pre): /usr/sbin/groupadd
137 Requires(pre): /usr/sbin/useradd
138 Provides: group(eventum)
139 Provides: user(eventum)
142 This package contains base directory structure for Eventum.
144 %description base -l pl
145 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
148 Summary: Eventum setup package
149 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
150 Group: Applications/WWW
151 Requires: %{name} = %{version}-%{release}
154 Install this package to configure initial Eventum installation. You
155 should uninstall this package when you're done, as it considered
156 insecure to keep the setup files in place.
158 %description setup -l pl
159 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
160 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
161 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
164 Summary: Eventum mail queue process
165 Summary(pl): Przetwarzanie kolejki poczty Eventum
166 Group: Applications/WWW
167 Requires: %{name} = %{version}-%{release}
170 %description mail-queue
171 Beginning with the first release of Eventum, emails are not directly
172 sent out from the various scripts, but rather added to a mail queue
173 table that is processed by a cron job. If an email cannot be sent, it
174 will be marked as such in the mail queue log, and the cron job script
175 will re-try to send it again the next time it runs.
177 This package contains the cron job.
179 %description mail-queue -l pl
180 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
181 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
182 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
183 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
186 Ten pakiet zawiera zadanie dla crona.
188 %package mail-download
189 Summary: Eventum email download
190 Summary(pl): ¦ci±ganie poczty Eventum
191 Group: Applications/WWW
192 Requires: %{name} = %{version}-%{release}
195 %description mail-download
196 In order for Eventum's email integration feature to work, you need to
197 setup a cron job to run the script every so often.
199 This package contains the cron job.
201 %description mail-download -l pl
202 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
203 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
206 Ten pakiet zawiera zadanie dla crona.
209 Summary: Eventum Reminder System
210 Summary(pl): System przypominania dla Eventum
211 Group: Applications/WWW
212 Requires: %{name} = %{version}-%{release}
215 %description reminder
216 The reminder system was designed with the objective as serving as a
217 safe net for issues that need attention. Depending on what
218 configuration you create, you may have several reminders (or alerts)
219 be sent out whenever an issue needs attention, for whatever parameter
220 you may deem necessary.
222 This package contains the cron job.
224 %description reminder -l pl
225 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
226 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
227 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
228 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
231 Ten pakiet zawiera zadanie dla crona.
234 Summary: Eventum Heartbeat Monitor
235 Summary(pl): Monitor ¿ycia dla Eventum
236 Group: Applications/WWW
237 Requires: %{name} = %{version}-%{release}
242 The heartbeat monitor is a feature designed for the administrator that
243 wants to be alerted whenever a common problem in Eventum is detected,
244 like the database server not being available anymore, or maybe when
245 the recommended permissions for certain configuration files are
248 Please note that before running the heartbeat monitor, you may need to
249 customize some of the checks to be appropriate for your own system,
250 particularly the permission and file checks on
251 Monitor::checkConfiguration().
253 This package contains the cron job.
255 %description monitor -l pl
256 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
257 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
258 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
259 do plików konfiguracyjnych.
261 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
262 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
263 testów uprawnieñ i plików w Monitor::checkConfiguration().
265 Ten pakiet zawiera zadanie dla crona.
267 %package route-drafts
268 Summary: Eventum Draft Routing
269 Summary(pl): Przekazywanie szkiców dla Eventum
270 Group: Applications/WWW
271 Requires: %{name} = %{version}-%{release}
272 Requires: eventum(router)
274 %description route-drafts
275 The draft routing feature is used to automatically associate a thread
276 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
277 to deliver emails sent to a specific address (usually
278 draft-<number>@<domain>) to the above script, users are able to send
279 drafts written in their mail client to be stored in Eventum. These
280 drafts will NOT broadcasted to the notification list.
282 %description route-drafts -l pl
283 Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z
284 problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby
285 dostarcza³ pocztê wys³an± na podany adres (zwykle
286 draft-<liczba>@<domena>) do tego skryptu umo¿liwia siê u¿ytkownikom
287 wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w
288 Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ.
290 %package route-emails
291 Summary: Eventum Email Routing
292 Summary(pl): Przekazywanie poczty dla Eventum
293 Group: Applications/WWW
294 Requires: %{name} = %{version}-%{release}
295 Requires: eventum(router)
297 %description route-emails
298 The email routing feature is used to automatically associate a thread
299 of emails into an Eventum issue. By setting up qmail (or even postfix)
300 to deliver emails sent to a specific address (usually
301 issue-<number>@<domain>) to the above script, users are able to use
302 their email clients to reply to emails coming from Eventum, and those
303 replies will be automatically associated with the issue and
304 broadcasted to the entire notification list.
306 %description route-emails -l pl
307 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
308 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
309 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
310 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
311 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
312 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
313 rozprowadzane do ca³ej listy og³oszeniowej.
316 Summary: Eventum Note Routing
317 Summary(pl): Przekazywanie notatek dla Eventum
318 Group: Applications/WWW
319 Requires: %{name} = %{version}-%{release}
320 Requires: eventum(router)
322 %description route-notes
323 The note routing feature is used to automatically associate a thread
324 of notes into an Eventum issue. By setting up qmail (or even postfix)
325 to deliver emails sent to a specific address (usually
326 note-<number>@<domain>) to the above script, users are able to use
327 their email clients to reply to internal notes coming from Eventum,
328 and those replies will be automatically associated with the issue and
329 broadcasted to the notification list staff members.
331 %description route-notes -l pl
332 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
333 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
334 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
335 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
336 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
337 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
338 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
340 %package router-qmail
341 Summary: Eventum Mail Routing - qmail
342 Summary(pl): Przekazywanie poczty Eventum - qmail
343 Group: Applications/Mail
344 # loose dep is intentional. qmail subpackage isn't built on PLD
345 # builders and there really nothing changes.
346 Requires: %{name} >= %{version}-%{release}
347 Requires: qmail >= 1.03
348 Provides: eventum(router)
349 Obsoletes: eventum(router)
351 %description router-qmail
352 This package provides way of routing notes and emails back to Eventum
355 %description router-qmail -l pl
356 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
359 %package router-postfix
360 Summary: Eventum Mail Routing - Postfix
361 Summary(pl): Przekazywanie poczty Eventum - Postfix
362 Group: Applications/Mail
363 Requires: %{name} = %{version}-%{release}
365 Provides: eventum(router)
366 Obsoletes: eventum(router)
368 %description router-postfix
369 This package provides way of routing notes and emails back to Eventum
372 The Postfix configuration instructions you can find from
373 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
375 %description router-postfix -l pl
376 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
379 Opis konfiguracji Postfiksa mo¿na znale¼æ pod adresem
380 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
383 Summary: Eventum IRC Notification Bot
384 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
385 Group: Applications/WWW
386 Requires(triggerpostun): sed >= 4.0
387 Requires: %{name} = %{version}-%{release}
388 Requires: php-pear-Net_SmartIRC
389 Requires: php-sockets
390 Requires: rc-scripts >= 0.4.0.18
393 The IRC notification bot is a nice feature for remote teams that want
394 to handle issues and want to have a quick and easy way to get simple
395 notifications. Right now the bot notifies of the following actions:
398 - Issues that got their assignment list changed
400 NOTE: You will need to manually edit the bot.php script to set your
401 appropriate preferences, like IRC server and channel that the bot
404 %description irc -l pl
405 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
406 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
407 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
408 nastêpuj±cych zdarzeniach:
410 - zablokowanych listach
411 - sprawach, dla których zmieni³a siê lista powi±zañ
413 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
414 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
417 Summary: Eventum command-line interface
418 Summary(pl): Interfejs linii poleceñ dla Eventum
419 Group: Applications/WWW
420 Requires: %{name}-base = %{version}-%{release}
422 Requires: php-common >= 3:4.1.0
424 Requires: php-pear-XML_RPC
428 The Eventum command-line interface allows you to access most of the
429 features of the web interface straight from your command shell.
431 %description cli -l pl
432 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
433 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
436 Summary: Eventum SCM integration
437 Summary(pl): Integracja SCM dla Eventum
438 Group: Applications/WWW
439 Requires: %{name}-base = %{version}-%{release}
441 Requires: php-common >= 3:4.1.0
445 This feature allows your software development teams to integrate your
446 Source Control Management system with your Issue Tracking System.
448 The integration is implemented in such a way that it will be forward
449 compatible with pretty much any SCM system, such as CVS.
452 </eventum/help.php?topic=scm_integration_installation>.
454 %description scm -l pl
455 Ten pakiet pozwala zespo³om programistów na integracjê systemu
456 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
459 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
460 prawie ka¿dym systemem SCM, jak np. CVS.
462 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
463 </eventum/help.php?topic=scm_integration_installation>.
466 %setup -q %{?_snap:-n %{name}-%{_snap}}
468 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
470 rm -f setup.conf.php # not to be installed by *.php glob
471 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD Linux
472 rm -f misc/upgrade/flush_compiled_templates.php
473 rm -rf misc/upgrade/*/upgrade_config.php # not needed nor supported in PLD Linux
475 # sample, not used in eventum
476 rm -f rpc/xmlrpc_client.php
483 %{?with_pear:%patch3 -p1}
503 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
504 sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
505 sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
506 mv misc/cli/eventumrc_example eventumrc
507 sed -i -e '1i#!%{_bindir}/php' misc/*.php
511 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
512 ' < include/private_key.php > private_key.php.in
513 rm -f include/private_key.php
515 # replace in remaining scripts config.inc.php to system one
516 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
517 s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"),
520 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
521 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"),
524 # remove backups from patching as we use globs to package files to buildroot
525 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
528 rm -rf $RPM_BUILD_ROOT
530 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
531 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
532 $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
533 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
534 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
536 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
537 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
538 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
539 cp -a templates $RPM_BUILD_ROOT%{_appdir}
540 cp -a include/{customer,custom_field,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
541 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
542 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
543 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
545 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
546 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
547 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
550 install -d $RPM_BUILD_ROOT%{_appdir}/cli
551 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
552 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
553 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
554 install %{name}-bot $RPM_BUILD_ROOT%{_sbindir}
557 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
558 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
561 cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php
563 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
564 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
565 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
566 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
567 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
568 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
569 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
570 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
571 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
574 s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},
575 s,%%{PHP_PEAR_DIR}%%,%{?with_pear:%{php_pear_dir}}%{!?with_pear:%{_appdir}/includes/pear},
576 s,%%{APP_PATH}%%,%{_appdir},
577 s,%%{SMARTY_DIR}%%,%{_smartydir},
578 s,%%{SYSCONFDIR}%%,%{_webappdir},
579 ' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
582 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
583 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
587 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
591 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
592 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
593 # These plugins are not in Smarty package (Smarty-2.6.2-3)
595 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
596 include/Smarty/plugins/modifier.highlight_quoted.php \
597 $RPM_BUILD_ROOT%{_smartyplugindir}
601 d=$RPM_BUILD_ROOT/var/lib/%{name}
602 echo 'root' > $d/.qmail
603 echo 'root' > $d/.qmail-default
604 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
605 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
606 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
607 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
610 install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix
613 rm -rf $RPM_BUILD_ROOT
616 %addusertogroup http %{name}
619 # check if the package is configured.
620 if grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then
621 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
622 %banner %{name} -e <<EOF
624 You haven't yet configured Eventum!
625 Please open in browser <http://localhost/eventum/>
626 If you need access from elsewhere, you need to edit
627 %{_webappdir}/apache.conf and restart apache.
629 IMPORTANT: When You have configured Eventum, please uninstall the
630 setup package, so that %{name}-setup is able to secure your Eventum
636 %banner %{name} -e <<EOF
638 You haven't yet configured Eventum!
640 To setup eventum, please install %{name}-setup and open in browser
641 <http://localhost/eventum/>.
642 If you need access from elsewhere, you need to edit
643 %{_webappdir}/apache.conf and restart apache.
645 IMPORTANT: When You have configured Eventum, please uninstall the
646 setup package, so that %{name}-setup is able to secure your Eventum
653 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
654 %banner %{name} -e <<EOF
656 You have default private key installed!
658 Install %{name}-setup and open up http://yourserver/eventum/setup/
659 -- that will help you setup initial config.
661 when have configured Eventum, please uninstall the setup package,
662 so that %{name}-setup is able to secure your Eventum installation.
665 elif [ -d %{_appdir}/setup ]; then
666 %banner %{name} -e <<EOF
668 If you have have configured Eventum, please uninstall the setup package,
669 so that %{name}-setup is able to secure your Eventum installation.
674 # nuke Smarty templates cache after upgrade
675 rm -f /var/cache/eventum/*.php
678 if [ "$1" = "0" ]; then
680 rm -f /var/cache/eventum/*.php 2>/dev/null || :
684 %groupadd -P %{name}-base -g 146 %{name}
685 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
688 if [ "$1" = "0" ]; then
694 CF=/etc/qmail/control/virtualdomains
695 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
696 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
697 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
699 echo "#${FQDN}:%{name}" >> $CF
701 %banner %{name}-qmail -e <<EOF
703 Added "#${FQDN}:%{name}" to $CF,
704 Please verify that it is correct and restart qmail:
705 # service qmail reload
707 Consult qmail-send(8) for more information on virtualdomains.
713 if [ "$1" = "0" ]; then
714 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
718 chmod 660 %{_webappdir}/{config,private_key}.php
719 chown root:eventum %{_webappdir}/{config,private_key}.php
722 if [ "$1" = "0" ]; then
723 chmod 640 %{_webappdir}/{config,private_key}.php
724 chown root:eventum %{_webappdir}/{config,private_key}.php
728 /sbin/chkconfig --add eventum-irc
729 %service eventum-irc restart "Eventum IRC Bot"
731 %triggerin -- apache1
732 %webapp_register apache %{_webapp}
734 %triggerun -- apache1
735 %webapp_unregister apache %{_webapp}
737 %triggerin -- apache >= 2.0.0
738 %webapp_register httpd %{_webapp}
740 %triggerun -- apache >= 2.0.0
741 %webapp_unregister httpd %{_webapp}
744 # only one upgrade trigger is called if you're upgrading over two
745 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
746 # use common trigger (the highest version and rpmvercmp from poldek?)
747 %triggerpostun -- eventum < 1.5.1-0.257
748 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
749 database_changes.php Perform database changes
752 %triggerpostun -- eventum < 1.5.2-0.289
753 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
754 database_changes.php Perform database changes
755 set_priority_ranks.php Fix the ranking of priority values
758 %triggerpostun -- eventum < 1.5.3-0.291
759 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
760 database_changes.php Perform database changes
763 %triggerpostun -- eventum < 1.5.4-1.12
764 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
765 database_changes.php Perform database changes
768 %triggerpostun -- eventum < 1.6.0-RC2.6
769 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
770 database_changes.php Perform database changes
771 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
774 %triggerpostun -- eventum < 1.6.1-0.2
775 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
776 database_changes.php Perform database changes
779 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
781 s,\$irc_host,$irc_server_hostname,
782 s,\$irc_port,$irc_server_port,
783 s,\$irc_nick,$nickname,
784 s,\$irc_realname,$realname,
785 s,\$irc_username,$username,
786 s,\$irc_password,$password,
787 ' /etc/eventum/irc.php
789 %triggerpostun -- eventum < 1.7.0-2.0.48
790 # migrate from apache-config macros
791 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
792 if [ -d /etc/apache/webapps.d ]; then
793 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
794 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
797 if [ -d /etc/httpd/webapps.d ]; then
798 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
799 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
803 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
804 /usr/sbin/webapp register apache %{_webapp}
805 rm -f /etc/apache/conf.d/99_%{_webapp}.conf
806 %service -q apache reload
808 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
809 /usr/sbin/webapp register httpd %{_webapp}
810 rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
811 %service -q httpd reload
814 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
815 database_changes.php Perform database changes
816 set_root_message_ids.php Set iss_root_message_id
820 for i in apache.conf config.php private_key.php setup.php; do
821 if [ -f /etc/eventum/$i.rpmsave ]; then
822 mv -f %{_webappdir}/$i{,.rpmnew}
823 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
827 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
828 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
829 mv -f %{_sysconfdir}/cli.php{,.rpmnew}
830 mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
833 %triggerpostun irc -- %{name}-irc < 1.7.0-3.4
834 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
835 mv -f %{_sysconfdir}/irc.php{,.rpmnew}
836 mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
840 %defattr(644,root,root,755)
841 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
842 %doc docs/* setup/schema.sql
843 %attr(751,root,root) %dir %{_webappdir}
844 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
845 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
846 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
847 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
848 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
849 %attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
851 %dir %attr(731,root,eventum) /var/log/%{name}
852 %attr(620,root,eventum) %ghost /var/log/%{name}/*
854 %dir %{_appdir}/htdocs
855 %{_appdir}/htdocs/*.php
856 %{_appdir}/htdocs/*.ico
857 %{_appdir}/htdocs/css
858 %{_appdir}/htdocs/customer
859 %{_appdir}/htdocs/images
861 %{_appdir}/htdocs/manage
862 %{_appdir}/htdocs/reports
863 %{_appdir}/htdocs/rpc
864 %{_appdir}/htdocs/misc
867 %dir %{_appdir}/upgrade
868 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
869 %{_appdir}/upgrade/[!u]*
873 %{_appdir}/include/pear
876 %dir %{_appdir}/include
877 %{_appdir}/include/customer
878 %{_appdir}/include/custom_field
879 %{_appdir}/include/jpgraph
880 %{_appdir}/include/workflow
881 %{_appdir}/include/class.[!m]*.php
882 %{_appdir}/include/class.mail.php
883 %{_appdir}/include/class.mail_queue.php
884 %{_appdir}/include/class.mime_helper.php
885 %{_appdir}/include/class.misc.php
886 %{_appdir}/include/db_access.php
888 %dir %attr(730,root,eventum) /var/run/%{name}
889 %dir %attr(730,root,eventum) /var/cache/%{name}
892 %defattr(644,root,root,755)
893 %attr(751,root,root) %dir %{_sysconfdir}
896 # qmail will ignore user, if it's home directory is not owned
897 %attr(750,eventum,eventum) %dir /var/lib/%{name}
899 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
900 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
901 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
904 %defattr(644,root,root,755)
905 %{_appdir}/htdocs/setup
908 %defattr(644,root,root,755)
909 %attr(755,root,root) %{_appdir}/process_mail_queue.php
910 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
913 %defattr(644,root,root,755)
914 %attr(755,root,root) %{_appdir}/download_emails.php
915 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
918 %defattr(644,root,root,755)
919 %attr(755,root,root) %{_appdir}/check_reminders.php
920 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
923 %defattr(644,root,root,755)
924 %{_appdir}/include/class.monitor.php
925 %attr(755,root,root) %{_appdir}/monitor.php
926 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
929 %defattr(644,root,root,755)
930 %attr(755,root,root) %{_appdir}/route_drafts.php
933 %defattr(644,root,root,755)
934 %attr(755,root,root) %{_appdir}/route_emails.php
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{_appdir}/route_notes.php
942 %defattr(644,root,root,755)
943 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
944 %attr(755,root,root) %{_libdir}/router-qmail
947 %files router-postfix
948 %defattr(644,root,root,755)
949 %attr(755,root,root) %{_libdir}/router-postfix
952 %defattr(644,root,root,755)
953 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
954 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
955 %attr(755,root,root) %{_sbindir}/%{name}-bot
956 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
959 %defattr(644,root,root,755)
961 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
962 %attr(755,root,root) %{_bindir}/%{name}
966 %defattr(644,root,root,755)
967 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
968 %attr(755,root,root) %{_libdir}/scm