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_with qmail # build the router-qmail subpackage
12 %bcond_with order_patch # with custom issue order patch
14 %define _snap 20060830
18 %include /usr/lib/rpm/macros.php
19 Summary: Eventum Issue / Bug tracking system
20 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
23 Release: %{?_rc:%{_rc}.}%{_rel}%{?_snap:.%{_snap}}
25 Group: Applications/WWW
26 Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
27 # Source0-md5: 2728604a05f51d6041e553561cbe32ff
28 Source1: %{name}-apache.conf
29 Source2: %{name}-mail-queue.cron
30 Source3: %{name}-mail-download.cron
31 Source4: %{name}-reminder.cron
32 Source5: %{name}-monitor.cron
33 Source6: %{name}-cvs.php
34 Source7: %{name}-irc.php
35 Source8: %{name}-irc.init
36 Source9: %{name}-irc.sysconfig
37 Source10: %{name}-config.php
38 Source11: %{name}-router-qmail.sh
39 Source12: %{name}-config-setup.php
40 Source13: %{name}-upgrade.sh
41 Source14: %{name}-router-postfix.sh
42 Source15: %{name}.logrotate
43 Source16: %{name}-lighttpd.conf
44 Source17: http://eventum.mysql.org/patches/process_svn_commits_new.phps
45 # Source17-md5: 48a1bc003907101e4052e5232047e6b2
46 Patch0: %{name}-lf.patch
47 Patch1: %{name}-perms.patch
48 Patch2: %{name}-cli-wr-separated.patch
49 Patch3: %{name}-scm-parse-response.patch
50 Patch4: %{name}-double-decode.patch
51 Patch5: %{name}-route-mem.patch
52 Patch6: %{name}-scm-pluscharisbad.patch
53 Patch7: %{name}-scm-updates.patch
54 Patch8: %{name}-close-signature.patch
55 Patch9: %{name}-list-sorting.patch
56 Patch10: %{name}-workflow-handlenewnote-note_id.patch
57 Patch11: %{name}-order4b.patch
58 Patch12: %{name}-cli-errorcheck.patch
59 Patch13: %{name}-combined.patch
60 Patch14: %{name}-xml-inline.patch
61 Patch15: %{name}-timetracking-advanced-logic.patch
62 Patch16: %{name}-timedisplay.patch
63 Patch17: %{name}-email-notify-display.patch
64 Patch18: %{name}-compact-issue-display.patch
65 Patch19: %{name}-fixed-nav.patch
66 Patch20: %{name}-scm-ssl.patch
67 Patch21: %{name}-scm-quick-out.patch
68 Patch22: %{name}-mem-limits.patch
69 Patch23: %{name}-backtraces.patch
70 Patch24: %{name}-errorhandler.patch
71 Patch25: http://glen.alkohol.ee/pld/eventum/upgrade-2.0.patch
72 Patch26: %{name}-tpl-fixes.patch
73 Patch27: %{name}-xss.patch
74 Patch28: %{name}-tpl-fixes2.patch
75 Patch29: %{name}-svn.patch
76 Patch30: %{name}-tpl-fixes3.patch
77 Patch31: %{name}-sid.patch
78 Patch32: %{name}-charset.patch
79 Patch33: %{name}-view_headers-tab.patch
80 Patch34: http://glen.alkohol.ee/pld/eventum/%{name}-tpl-fixes4.patch
81 Patch35: http://glen.alkohol.ee/pld/eventum/%{name}-tpl-fixes5.patch
82 # packaging patches that probably never go upstream
83 Patch100: %{name}-paths.patch
84 Patch101: %{name}-cvs-config.patch
85 Patch102: %{name}-irc-mem.patch
86 Patch103: %{name}-irc-config.patch
87 Patch104: %{name}-PEAR.patch
88 Patch105: %{name}-httpclient-clientside.patch
89 Patch106: %{name}-bot-reconnect.patch
90 Patch107: %{name}-private-key.patch
91 URL: http://dev.mysql.com/downloads/other/eventum/
92 BuildRequires: rpm-php-pearprov >= 4.0.2-98
93 BuildRequires: rpmbuild(macros) >= 1.268
94 BuildRequires: sed >= 4.0
95 Requires(triggerpostun): /usr/bin/php
96 Requires(triggerpostun): sed >= 4.0
97 Requires: %{name}-base = %{version}-%{release}
98 Requires: Smarty >= 2.6.10-4
99 Requires: apache(mod_dir)
100 Requires: php >= 3:4.2.0
105 Requires: php-pear-Benchmark
106 Requires: php-pear-DB
107 Requires: php-pear-Date
108 Requires: php-pear-HTTP_Request
109 Requires: php-pear-Mail
110 Requires: php-pear-Mail_Mime
111 Requires: php-pear-Math_Stats
112 Requires: php-pear-Net_DIME
113 Requires: php-pear-Net_SMTP
114 Requires: php-pear-Net_Socket
115 Requires: php-pear-Net_URL
116 Requires: php-pear-Net_UserAgent_Detect
117 Requires: php-pear-PEAR-core
118 Requires: php-pear-Text_Diff
119 Requires: php-pear-XML_RPC
120 Requires: php-session
121 Requires: smarty-gettext
123 Requires: webserver(access)
124 Requires: webserver(alias)
126 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128 %define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
130 %define _libdir %{_prefix}/lib/%{name}
131 %define _appdir %{_datadir}/%{name}
132 %define _smartyplugindir %{_appdir}/include/smarty
133 %define _smartydir /usr/share/php/Smarty
134 %define _webapps /etc/webapps
135 %define _webapp %{name}
136 %define _webappdir %{_webapps}/%{_webapp}
137 %define _sysconfdir /etc/%{name}
140 Eventum is a user-friendly and flexible issue tracking system that can
141 be used by a support department to track incoming technical support
142 requests, or by a software development team to quickly organize tasks
143 and bugs. Eventum is used by the MySQL AB Technical Support team, and
144 has allowed us to dramatically improve our response times.
147 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
148 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
149 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
150 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
151 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
155 Summary: Eventum base package
156 Summary(pl): Podstawowy pakiet Eventum
157 Group: Applications/WWW
158 Requires(postun): /usr/sbin/groupdel
159 Requires(postun): /usr/sbin/userdel
160 Requires(pre): /bin/id
161 Requires(pre): /usr/bin/getgid
162 Requires(pre): /usr/sbin/groupadd
163 Requires(pre): /usr/sbin/useradd
164 Provides: group(eventum)
165 Provides: user(eventum)
168 This package contains base directory structure for Eventum.
170 %description base -l pl
171 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
174 Summary: Eventum setup package
175 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
176 Group: Applications/WWW
177 Requires: %{name} = %{version}-%{release}
180 Install this package to configure initial Eventum installation. You
181 should uninstall this package when you're done, as it considered
182 insecure to keep the setup files in place.
184 %description setup -l pl
185 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
186 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
187 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
190 Summary: Eventum mail queue process
191 Summary(pl): Przetwarzanie kolejki poczty Eventum
192 Group: Applications/WWW
193 Requires: %{name} = %{version}-%{release}
196 %description mail-queue
197 Beginning with the first release of Eventum, emails are not directly
198 sent out from the various scripts, but rather added to a mail queue
199 table that is processed by a cron job. If an email cannot be sent, it
200 will be marked as such in the mail queue log, and the cron job script
201 will re-try to send it again the next time it runs.
203 This package contains the cron job.
205 %description mail-queue -l pl
206 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
207 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
208 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
209 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
212 Ten pakiet zawiera zadanie dla crona.
214 %package mail-download
215 Summary: Eventum email download
216 Summary(pl): ¦ci±ganie poczty Eventum
217 Group: Applications/WWW
218 Requires: %{name} = %{version}-%{release}
221 %description mail-download
222 In order for Eventum's email integration feature to work, you need to
223 setup a cron job to run the script every so often.
225 This package contains the cron job.
227 %description mail-download -l pl
228 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
229 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
232 Ten pakiet zawiera zadanie dla crona.
235 Summary: Eventum Reminder System
236 Summary(pl): System przypominania dla Eventum
237 Group: Applications/WWW
238 Requires: %{name} = %{version}-%{release}
241 %description reminder
242 The reminder system was designed with the objective as serving as a
243 safe net for issues that need attention. Depending on what
244 configuration you create, you may have several reminders (or alerts)
245 be sent out whenever an issue needs attention, for whatever parameter
246 you may deem necessary.
248 This package contains the cron job.
250 %description reminder -l pl
251 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
252 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
253 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
254 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
257 Ten pakiet zawiera zadanie dla crona.
260 Summary: Eventum Heartbeat Monitor
261 Summary(pl): Monitor ¿ycia dla Eventum
262 Group: Applications/WWW
263 Requires: %{name} = %{version}-%{release}
268 The heartbeat monitor is a feature designed for the administrator that
269 wants to be alerted whenever a common problem in Eventum is detected,
270 like the database server not being available anymore, or maybe when
271 the recommended permissions for certain configuration files are
274 Please note that before running the heartbeat monitor, you may need to
275 customize some of the checks to be appropriate for your own system,
276 particularly the permission and file checks on
277 Monitor::checkConfiguration().
279 This package contains the cron job.
281 %description monitor -l pl
282 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
283 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
284 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
285 do plików konfiguracyjnych.
287 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
288 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
289 testów uprawnieñ i plików w Monitor::checkConfiguration().
291 Ten pakiet zawiera zadanie dla crona.
293 %package route-drafts
294 Summary: Eventum Draft Routing
295 Summary(pl): Przekazywanie szkiców dla Eventum
296 Group: Applications/WWW
297 Requires: %{name} = %{version}-%{release}
298 Requires: eventum(router)
300 %description route-drafts
301 The draft routing feature is used to automatically associate a thread
302 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
303 to deliver emails sent to a specific address (usually
304 draft-<number>@<domain>) to the above script, users are able to send
305 drafts written in their mail client to be stored in Eventum. These
306 drafts will NOT broadcasted to the notification list.
308 %description route-drafts -l pl
309 Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z
310 problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby
311 dostarcza³ pocztê wys³an± na podany adres (zwykle
312 draft-<liczba>@<domena>) do tego skryptu umo¿liwia siê u¿ytkownikom
313 wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w
314 Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ.
316 %package route-emails
317 Summary: Eventum Email Routing
318 Summary(pl): Przekazywanie poczty dla Eventum
319 Group: Applications/WWW
320 Requires: %{name} = %{version}-%{release}
321 Requires: eventum(router)
323 %description route-emails
324 The email routing feature is used to automatically associate a thread
325 of emails into an Eventum issue. By setting up qmail (or even postfix)
326 to deliver emails sent to a specific address (usually
327 issue-<number>@<domain>) to the above script, users are able to use
328 their email clients to reply to emails coming from Eventum, and those
329 replies will be automatically associated with the issue and
330 broadcasted to the entire notification list.
332 %description route-emails -l pl
333 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
334 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
335 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
336 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
337 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
338 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
339 rozprowadzane do ca³ej listy og³oszeniowej.
342 Summary: Eventum Note Routing
343 Summary(pl): Przekazywanie notatek dla Eventum
344 Group: Applications/WWW
345 Requires: %{name} = %{version}-%{release}
346 Requires: eventum(router)
348 %description route-notes
349 The note routing feature is used to automatically associate a thread
350 of notes into an Eventum issue. By setting up qmail (or even postfix)
351 to deliver emails sent to a specific address (usually
352 note-<number>@<domain>) to the above script, users are able to use
353 their email clients to reply to internal notes coming from Eventum,
354 and those replies will be automatically associated with the issue and
355 broadcasted to the notification list staff members.
357 %description route-notes -l pl
358 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
359 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
360 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
361 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
362 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
363 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
364 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
366 %package router-qmail
367 Summary: Eventum Mail Routing - qmail
368 Summary(pl): Przekazywanie poczty Eventum - qmail
369 Group: Applications/Mail
370 # loose dep is intentional. qmail subpackage isn't built on PLD
371 # builders and there really nothing changes.
372 Requires: %{name} >= %{version}-%{release}
373 Requires: qmail >= 1.03
374 Provides: eventum(router)
375 Obsoletes: eventum(router)
377 %description router-qmail
378 This package provides way of routing notes and emails back to Eventum
381 %description router-qmail -l pl
382 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
385 %package router-postfix
386 Summary: Eventum Mail Routing - Postfix
387 Summary(pl): Przekazywanie poczty Eventum - Postfix
388 Group: Applications/Mail
389 Requires: %{name} = %{version}-%{release}
391 Provides: eventum(router)
392 Obsoletes: eventum(router)
394 %description router-postfix
395 This package provides way of routing notes and emails back to Eventum
398 The Postfix configuration instructions you can find from
399 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
401 %description router-postfix -l pl
402 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
405 Opis konfiguracji Postfiksa mo¿na znale¼æ pod adresem
406 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
409 Summary: Eventum IRC Notification Bot
410 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
411 Group: Applications/WWW
412 Requires(post,preun): /sbin/chkconfig
413 Requires(triggerpostun): sed >= 4.0
414 Requires: %{name} = %{version}-%{release}
415 Requires: php-pear-Net_SmartIRC
416 Requires: php-sockets
417 Requires: rc-scripts >= 0.4.0.18
420 The IRC notification bot is a nice feature for remote teams that want
421 to handle issues and want to have a quick and easy way to get simple
422 notifications. Right now the bot notifies of the following actions:
425 - Issues that got their assignment list changed
427 NOTE: You will need to manually edit the bot.php script to set your
428 appropriate preferences, like IRC server and channel that the bot
431 %description irc -l pl
432 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
433 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
434 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
435 nastêpuj±cych zdarzeniach:
437 - zablokowanych listach
438 - sprawach, dla których zmieni³a siê lista powi±zañ
440 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
441 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
444 Summary: Eventum command-line interface
445 Summary(pl): Interfejs linii poleceñ dla Eventum
446 Group: Applications/WWW
447 Requires: %{name}-base = %{version}-%{release}
449 Requires: php-common >= 3:4.1.0
450 Requires: php-pear-XML_RPC
453 The Eventum command-line interface allows you to access most of the
454 features of the web interface straight from your command shell.
456 %description cli -l pl
457 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
458 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
461 Summary: Eventum SCM integration
462 Summary(pl): Integracja SCM dla Eventum
463 Group: Applications/WWW
464 Requires: %{name}-base = %{version}-%{release}
466 Requires: php-common >= 3:4.1.0
470 This feature allows your software development teams to integrate your
471 Source Control Management system with your Issue Tracking System.
473 The integration is implemented in such a way that it will be forward
474 compatible with pretty much any SCM system, such as CVS.
477 </eventum/help.php?topic=scm_integration_installation>.
479 %description scm -l pl
480 Ten pakiet pozwala zespo³om programistów na integracjê systemu
481 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
484 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
485 prawie ka¿dym systemem SCM, jak np. CVS.
487 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
488 </eventum/help.php?topic=scm_integration_installation>.
491 %setup -q %{?_snap:-n %{name}-%{_snap}}
492 cp %{SOURCE17} misc/scm/process_svn_commits.php
494 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
498 rm -f setup.conf.php # not to be installed by *.php glob
499 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD Linux
500 rm -f misc/upgrade/flush_compiled_templates.php
501 rm -rf misc/upgrade/*/upgrade_config.php # not needed in PLD Linux
502 rm -rf misc/upgrade/*/index.html # not needed in PLD Linux
504 # sample, not used in eventum
505 rm -f rpc/xmlrpc_client.php
519 %{?with_order_patch:%patch11 -p1}
555 cat <<'EOF'> mysql-permissions.sql
556 # use this schema if you want to grant permissions manually instead of using setup
557 # this schema is extracted from setup/index.php.
558 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
561 mv misc/localization/de{_DE,}
562 mv misc/localization/es{_ES,}
563 mv misc/localization/fi{_FI,}
564 mv misc/localization/fr{_FR,}
565 mv misc/localization/it{_IT,}
566 mv misc/localization/nl{_NL,}
567 mv misc/localization/ru{_RU,}
569 # oops, the file got truncated - quick fix
570 cp misc/localization/eventum.po misc/localization/de/LC_MESSAGES/eventum.po
571 cp misc/localization/eventum.po misc/localization/es/LC_MESSAGES/eventum.po
572 cp misc/localization/eventum.po misc/localization/fi/LC_MESSAGES/eventum.po
573 cp misc/localization/eventum.po misc/localization/fr/LC_MESSAGES/eventum.po
574 cp misc/localization/eventum.po misc/localization/it/LC_MESSAGES/eventum.po
575 cp misc/localization/eventum.po misc/localization/nl/LC_MESSAGES/eventum.po
576 cp misc/localization/eventum.po misc/localization/ru/LC_MESSAGES/eventum.po
577 cp misc/localization/eventum.po misc/localization/en_US/LC_MESSAGES/eventum.po
579 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
580 sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > process_cvs_commits
581 sed -e '1i#!%{_bindir}/php' misc/scm/process_svn_commits.php > process_svn_commits
582 sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
583 mv misc/cli/eventumrc_example eventumrc
584 sed -i -e '1i#!%{_bindir}/php' misc/*.php
586 mv include/private_key.php private_key.php.in
588 # replace in remaining scripts config.inc.php to system one
589 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
590 s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"),
593 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
594 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"),
597 # remove backups from patching as we use globs to package files to buildroot
598 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
602 for a in */LC_MESSAGES; do
603 msgfmt -o $a/eventum.mo $a/eventum.po
607 rm -rf $RPM_BUILD_ROOT
609 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
610 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
611 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
612 $RPM_BUILD_ROOT/var/log/{archiv/,}%{name} \
613 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
614 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
616 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
617 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
618 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
619 cp -a templates $RPM_BUILD_ROOT%{_appdir}
620 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
621 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
622 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
623 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
625 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
626 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
627 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
630 install -d $RPM_BUILD_ROOT%{_appdir}/cli
631 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
632 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
633 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
634 install %{name}-bot $RPM_BUILD_ROOT%{_sbindir}
637 install process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
638 install process_svn_commits $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
639 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
640 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
643 cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php
644 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
646 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
647 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
648 install %{SOURCE16} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
649 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
650 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
651 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
652 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
653 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
654 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
655 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
658 s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}}%{?_rc:-%{_rc}},
659 s,%%{PHP_PEAR_DIR}%%,%{php_pear_dir},
660 s,%%{APP_PATH}%%,%{_appdir},
661 s,%%{SMARTY_DIR}%%,%{_smartydir},
662 s,%%{SYSCONFDIR}%%,%{_webappdir},
663 ' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
666 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
667 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
669 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
670 # These plugins are not in Smarty package (Smarty-2.6.2-3)
672 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
673 include/Smarty/plugins/modifier.highlight_quoted.php \
674 $RPM_BUILD_ROOT%{_smartyplugindir}
678 d=$RPM_BUILD_ROOT/var/lib/%{name}
679 echo 'root' > $d/.qmail
680 echo 'root' > $d/.qmail-default
681 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
682 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
683 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
684 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
687 install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix
689 install -D %{SOURCE15} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
692 for a in */LC_MESSAGES; do
693 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$a
694 cp -a $a/%{name}.mo $RPM_BUILD_ROOT%{_datadir}/locale/$a
701 rm -rf $RPM_BUILD_ROOT
704 %addusertogroup http %{name}
707 # check if the package is configured.
708 if grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then
709 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
710 %banner %{name} -e <<EOF
712 You haven't yet configured Eventum!
713 Please open in browser <http://localhost/eventum/>
714 If you need access from elsewhere, you need to edit
715 %{_webappdir}/apache.conf and restart apache.
717 IMPORTANT: When You have configured Eventum, please uninstall the
718 setup package, so that %{name}-setup is able to secure your Eventum
724 %banner %{name} -e <<EOF
726 You haven't yet configured Eventum!
728 To setup eventum, please install %{name}-setup and open in browser
729 <http://localhost/eventum/>.
730 If you need access from elsewhere, you need to edit
731 %{_webappdir}/apache.conf and restart apache.
733 IMPORTANT: When You have configured Eventum, please uninstall the
734 setup package, so that %{name}-setup is able to secure your Eventum
741 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
742 %banner %{name} -e <<EOF
744 You have default private key installed!
746 Install %{name}-setup and open up http://yourserver/eventum/setup/
747 -- that will help you setup initial config.
749 when have configured Eventum, please uninstall the setup package,
750 so that %{name}-setup is able to secure your Eventum installation.
753 elif [ -d %{_appdir}/setup ]; then
754 %banner %{name} -e <<EOF
756 If you have have configured Eventum, please uninstall the setup package,
757 so that %{name}-setup is able to secure your Eventum installation.
762 # nuke Smarty templates cache after upgrade
763 rm -f /var/cache/eventum/*.php
766 if [ "$1" = "0" ]; then
768 rm -f /var/cache/eventum/*.php 2>/dev/null || :
772 %groupadd -P %{name}-base -g 146 %{name}
773 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
776 if [ "$1" = "0" ]; then
782 CF=/etc/qmail/control/virtualdomains
783 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
784 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
785 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
787 echo "#${FQDN}:%{name}" >> $CF
789 %banner %{name}-qmail -e <<EOF
791 Added "#${FQDN}:%{name}" to $CF,
792 Please verify that it is correct and restart qmail:
793 # service qmail reload
795 Consult qmail-send(8) for more information on virtualdomains.
801 if [ "$1" = "0" ]; then
802 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
806 chmod 660 %{_webappdir}/{config,private_key}.php
807 chown root:eventum %{_webappdir}/{config,private_key}.php
810 if [ "$1" = "0" ]; then
811 chmod 640 %{_webappdir}/{config,private_key}.php
812 chown root:eventum %{_webappdir}/{config,private_key}.php
816 /sbin/chkconfig --add eventum-irc
817 %service eventum-irc restart "Eventum IRC Bot"
820 if [ "$1" = 0 ]; then
821 %service eventum-irc stop
822 /sbin/chkconfig --del eventum-irc
825 %triggerin -- apache1
826 %webapp_register apache %{_webapp}
828 %triggerun -- apache1
829 %webapp_unregister apache %{_webapp}
831 %triggerin -- apache < 2.2.0, apache-base
832 %webapp_register httpd %{_webapp}
834 %triggerun -- apache < 2.2.0, apache-base
835 %webapp_unregister httpd %{_webapp}
837 %triggerin -- lighttpd
838 %webapp_register lighttpd %{_webapp}
840 %triggerun -- lighttpd
841 %webapp_unregister lighttpd %{_webapp}
844 # only one upgrade trigger is called if you're upgrading over two
845 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
846 # use common trigger (the highest version and rpmvercmp from poldek?)
847 %triggerpostun -- eventum < 1.5.1-0.257
848 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
849 database_changes.php Perform database changes
852 %triggerpostun -- eventum < 1.5.2-0.289
853 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
854 database_changes.php Perform database changes
855 set_priority_ranks.php Fix the ranking of priority values
858 %triggerpostun -- eventum < 1.5.3-0.291
859 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
860 database_changes.php Perform database changes
863 %triggerpostun -- eventum < 1.5.4-1.12
864 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
865 database_changes.php Perform database changes
868 %triggerpostun -- eventum < 1.6.0-RC2.6
869 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
870 database_changes.php Perform database changes
871 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
874 %triggerpostun -- eventum < 1.6.1-0.2
875 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
876 database_changes.php Perform database changes
879 %triggerpostun -- eventum < 1.7.1-2.48.20060717
880 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.7.1_to_v2.0 <<EOF
881 database_changes.php Perform database changes
884 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
886 s,\$irc_host,$irc_server_hostname,
887 s,\$irc_port,$irc_server_port,
888 s,\$irc_nick,$nickname,
889 s,\$irc_realname,$realname,
890 s,\$irc_username,$username,
891 s,\$irc_password,$password,
892 ' /etc/eventum/irc.php
894 %triggerpostun -- eventum < 1.7.0-2.0.48
895 # migrate from apache-config macros
896 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
897 if [ -d /etc/apache/webapps.d ]; then
898 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
899 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
902 if [ -d /etc/httpd/webapps.d ]; then
903 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
904 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
908 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
909 /usr/sbin/webapp register apache %{_webapp}
910 rm -f /etc/apache/conf.d/99_%{_webapp}.conf
911 %service -q apache reload
913 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
914 /usr/sbin/webapp register httpd %{_webapp}
915 rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
916 %service -q httpd reload
919 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
920 database_changes.php Perform database changes
921 set_root_message_ids.php Set iss_root_message_id
925 for i in apache.conf config.php private_key.php setup.php; do
926 if [ -f /etc/eventum/$i.rpmsave ]; then
927 mv -f %{_webappdir}/$i{,.rpmnew}
928 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
932 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
933 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
934 mv -f %{_sysconfdir}/cli.php{,.rpmnew}
935 mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
938 %triggerpostun irc -- %{name}-irc < 1.7.0-3.4
939 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
940 mv -f %{_sysconfdir}/irc.php{,.rpmnew}
941 mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
944 %triggerpostun scm -- %{name}-scm < 1.7.1-2.70.20060724
945 if [ -f %{_sysconfdir}/cvs.php.rpmsave ]; then
946 mv -f %{_sysconfdir}/scm.php{,.rpmnew}
947 mv -f %{_sysconfdir}/cvs.php.rpmsave %{_sysconfdir}/scm.php
949 ln -sf process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
952 %defattr(644,root,root,755)
953 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
954 %doc docs/* setup/schema.sql mysql-permissions.sql
955 %attr(751,root,root) %dir %{_webappdir}
956 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
957 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
958 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
959 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
960 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
961 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
962 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
963 %attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
965 %dir %attr(731,root,eventum) /var/log/%{name}
966 %attr(620,root,eventum) %ghost /var/log/%{name}/*
967 %dir %attr(750,root,root) /var/log/archiv/%{name}
968 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
970 %dir %{_appdir}/htdocs
971 %{_appdir}/htdocs/*.php
972 %{_appdir}/htdocs/*.ico
973 %{_appdir}/htdocs/css
974 %{_appdir}/htdocs/customer
975 %{_appdir}/htdocs/images
977 %{_appdir}/htdocs/manage
978 %{_appdir}/htdocs/reports
979 %{_appdir}/htdocs/rpc
980 %{_appdir}/htdocs/misc
982 %dir %{_appdir}/upgrade
983 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
984 %{_appdir}/upgrade/[!u]*
987 %dir %{_appdir}/include
988 %{_appdir}/include/customer
989 %{_appdir}/include/custom_field
990 %{_appdir}/include/jpgraph
991 %{_appdir}/include/workflow
992 %{_appdir}/include/class.[!m]*.php
993 %{_appdir}/include/class.mail.php
994 %{_appdir}/include/class.mail_queue.php
995 %{_appdir}/include/class.mime_helper.php
996 %{_appdir}/include/class.misc.php
997 %{_appdir}/include/db_access.php
999 %dir %attr(730,root,eventum) /var/run/%{name}
1000 %dir %attr(730,root,eventum) /var/cache/%{name}
1003 %defattr(644,root,root,755)
1004 %attr(751,root,root) %dir %{_sysconfdir}
1007 # qmail will ignore user, if it's home directory is not owned
1008 %attr(750,eventum,eventum) %dir /var/lib/%{name}
1010 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
1011 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
1012 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
1015 %defattr(644,root,root,755)
1016 %{_appdir}/htdocs/setup
1019 %defattr(644,root,root,755)
1020 %attr(755,root,root) %{_appdir}/process_mail_queue.php
1021 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
1023 %files mail-download
1024 %defattr(644,root,root,755)
1025 %attr(755,root,root) %{_appdir}/download_emails.php
1026 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
1029 %defattr(644,root,root,755)
1030 %attr(755,root,root) %{_appdir}/check_reminders.php
1031 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
1034 %defattr(644,root,root,755)
1035 %{_appdir}/include/class.monitor.php
1036 %attr(755,root,root) %{_appdir}/monitor.php
1037 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
1040 %defattr(644,root,root,755)
1041 %attr(755,root,root) %{_appdir}/route_drafts.php
1044 %defattr(644,root,root,755)
1045 %attr(755,root,root) %{_appdir}/route_emails.php
1048 %defattr(644,root,root,755)
1049 %attr(755,root,root) %{_appdir}/route_notes.php
1053 %defattr(644,root,root,755)
1054 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
1055 %attr(755,root,root) %{_libdir}/router-qmail
1058 %files router-postfix
1059 %defattr(644,root,root,755)
1060 %attr(755,root,root) %{_libdir}/router-postfix
1063 %defattr(644,root,root,755)
1064 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
1065 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
1066 %attr(755,root,root) %{_sbindir}/%{name}-bot
1067 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
1070 %defattr(644,root,root,755)
1072 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
1073 %attr(755,root,root) %{_bindir}/%{name}
1077 %defattr(644,root,root,755)
1078 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
1079 %attr(755,root,root) %{_libdir}/process_cvs_commits
1080 %attr(755,root,root) %{_libdir}/process_svn_commits
1082 %ghost %{_libdir}/scm