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 20060718
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: b5e65ec07296b249f940827bae94108d
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 Patch0: %{name}-lf.patch
44 Patch1: %{name}-perms.patch
45 Patch2: %{name}-cli-wr-separated.patch
46 Patch3: %{name}-scm-parse-response.patch
47 Patch4: %{name}-double-decode.patch
48 Patch5: %{name}-route-mem.patch
49 Patch6: %{name}-scm-pluscharisbad.patch
50 Patch7: %{name}-scm-updates.patch
51 Patch8: %{name}-close-signature.patch
52 Patch9: %{name}-list-sorting.patch
53 Patch10: %{name}-workflow-handlenewnote-note_id.patch
54 Patch11: %{name}-order4b.patch
55 Patch12: %{name}-cli-errorcheck.patch
56 Patch13: %{name}-combined.patch
57 Patch14: %{name}-xml-inline.patch
58 Patch15: %{name}-timetracking-advanced-logic.patch
59 Patch16: %{name}-timedisplay.patch
60 Patch17: %{name}-bug-17267.patch
61 Patch18: %{name}-compact-issue-display.patch
62 Patch19: %{name}-fixed-nav.patch
63 Patch20: %{name}-scm-ssl.patch
64 Patch21: %{name}-scm-quick-out.patch
65 Patch22: %{name}-mem-limits.patch
66 Patch23: %{name}-backtraces.patch
67 Patch24: %{name}-errorhandler.patch
68 Patch25: %{name}-unbalancedquotesinemailaddress.patch
69 Patch26: http://glen.alkohol.ee/pld/eventum/upgrade-2.0.patch
70 Patch27: http://glen.alkohol.ee/pld/eventum/checkins.tpl-typo.patch
71 # packaging patches that probably never go upstream
72 Patch100: %{name}-paths.patch
73 Patch101: %{name}-cvs-config.patch
74 Patch102: %{name}-irc-mem.patch
75 Patch103: %{name}-irc-config.patch
76 Patch104: %{name}-PEAR.patch
77 Patch105: %{name}-httpclient-clientside.patch
78 Patch106: %{name}-bot-reconnect.patch
79 Patch107: %{name}-private-key.patch
80 URL: http://dev.mysql.com/downloads/other/eventum/
81 BuildRequires: rpm-php-pearprov >= 4.0.2-98
82 BuildRequires: rpmbuild(macros) >= 1.268
83 BuildRequires: sed >= 4.0
84 Requires(triggerpostun): /usr/bin/php
85 Requires(triggerpostun): sed >= 4.0
86 Requires: %{name}-base = %{version}-%{release}
87 Requires: Smarty >= 2.6.10-4
88 Requires: apache(mod_dir)
89 Requires: php >= 3:4.2.0
94 Requires: php-pear-Benchmark
96 Requires: php-pear-Date
97 Requires: php-pear-HTTP_Request
98 Requires: php-pear-Mail
99 Requires: php-pear-Mail_Mime
100 Requires: php-pear-Math_Stats
101 Requires: php-pear-Net_DIME
102 Requires: php-pear-Net_SMTP
103 Requires: php-pear-Net_Socket
104 Requires: php-pear-Net_URL
105 Requires: php-pear-Net_UserAgent_Detect
106 Requires: php-pear-PEAR-core
107 Requires: php-pear-Text_Diff
108 Requires: php-pear-XML_RPC
109 Requires: php-session
110 Requires: smarty-gettext
113 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
115 %define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
117 %define _libdir %{_prefix}/lib/%{name}
118 %define _appdir %{_datadir}/%{name}
119 %define _smartyplugindir %{_appdir}/include/smarty
120 %define _smartydir /usr/share/php/Smarty
121 %define _webapps /etc/webapps
122 %define _webapp %{name}
123 %define _webappdir %{_webapps}/%{_webapp}
124 %define _sysconfdir /etc/%{name}
127 Eventum is a user-friendly and flexible issue tracking system that can
128 be used by a support department to track incoming technical support
129 requests, or by a software development team to quickly organize tasks
130 and bugs. Eventum is used by the MySQL AB Technical Support team, and
131 has allowed us to dramatically improve our response times.
134 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
135 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
136 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
137 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
138 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
142 Summary: Eventum base package
143 Summary(pl): Podstawowy pakiet Eventum
144 Group: Applications/WWW
145 Requires(postun): /usr/sbin/groupdel
146 Requires(postun): /usr/sbin/userdel
147 Requires(pre): /bin/id
148 Requires(pre): /usr/bin/getgid
149 Requires(pre): /usr/sbin/groupadd
150 Requires(pre): /usr/sbin/useradd
151 Provides: group(eventum)
152 Provides: user(eventum)
155 This package contains base directory structure for Eventum.
157 %description base -l pl
158 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
161 Summary: Eventum setup package
162 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
163 Group: Applications/WWW
164 Requires: %{name} = %{version}-%{release}
167 Install this package to configure initial Eventum installation. You
168 should uninstall this package when you're done, as it considered
169 insecure to keep the setup files in place.
171 %description setup -l pl
172 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
173 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
174 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
177 Summary: Eventum mail queue process
178 Summary(pl): Przetwarzanie kolejki poczty Eventum
179 Group: Applications/WWW
180 Requires: %{name} = %{version}-%{release}
183 %description mail-queue
184 Beginning with the first release of Eventum, emails are not directly
185 sent out from the various scripts, but rather added to a mail queue
186 table that is processed by a cron job. If an email cannot be sent, it
187 will be marked as such in the mail queue log, and the cron job script
188 will re-try to send it again the next time it runs.
190 This package contains the cron job.
192 %description mail-queue -l pl
193 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
194 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
195 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
196 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
199 Ten pakiet zawiera zadanie dla crona.
201 %package mail-download
202 Summary: Eventum email download
203 Summary(pl): ¦ci±ganie poczty Eventum
204 Group: Applications/WWW
205 Requires: %{name} = %{version}-%{release}
208 %description mail-download
209 In order for Eventum's email integration feature to work, you need to
210 setup a cron job to run the script every so often.
212 This package contains the cron job.
214 %description mail-download -l pl
215 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
216 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
219 Ten pakiet zawiera zadanie dla crona.
222 Summary: Eventum Reminder System
223 Summary(pl): System przypominania dla Eventum
224 Group: Applications/WWW
225 Requires: %{name} = %{version}-%{release}
228 %description reminder
229 The reminder system was designed with the objective as serving as a
230 safe net for issues that need attention. Depending on what
231 configuration you create, you may have several reminders (or alerts)
232 be sent out whenever an issue needs attention, for whatever parameter
233 you may deem necessary.
235 This package contains the cron job.
237 %description reminder -l pl
238 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
239 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
240 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
241 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
244 Ten pakiet zawiera zadanie dla crona.
247 Summary: Eventum Heartbeat Monitor
248 Summary(pl): Monitor ¿ycia dla Eventum
249 Group: Applications/WWW
250 Requires: %{name} = %{version}-%{release}
255 The heartbeat monitor is a feature designed for the administrator that
256 wants to be alerted whenever a common problem in Eventum is detected,
257 like the database server not being available anymore, or maybe when
258 the recommended permissions for certain configuration files are
261 Please note that before running the heartbeat monitor, you may need to
262 customize some of the checks to be appropriate for your own system,
263 particularly the permission and file checks on
264 Monitor::checkConfiguration().
266 This package contains the cron job.
268 %description monitor -l pl
269 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
270 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
271 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
272 do plików konfiguracyjnych.
274 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
275 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
276 testów uprawnieñ i plików w Monitor::checkConfiguration().
278 Ten pakiet zawiera zadanie dla crona.
280 %package route-drafts
281 Summary: Eventum Draft Routing
282 Summary(pl): Przekazywanie szkiców dla Eventum
283 Group: Applications/WWW
284 Requires: %{name} = %{version}-%{release}
285 Requires: eventum(router)
287 %description route-drafts
288 The draft routing feature is used to automatically associate a thread
289 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
290 to deliver emails sent to a specific address (usually
291 draft-<number>@<domain>) to the above script, users are able to send
292 drafts written in their mail client to be stored in Eventum. These
293 drafts will NOT broadcasted to the notification list.
295 %description route-drafts -l pl
296 Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z
297 problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby
298 dostarcza³ pocztê wys³an± na podany adres (zwykle
299 draft-<liczba>@<domena>) do tego skryptu umo¿liwia siê u¿ytkownikom
300 wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w
301 Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ.
303 %package route-emails
304 Summary: Eventum Email Routing
305 Summary(pl): Przekazywanie poczty dla Eventum
306 Group: Applications/WWW
307 Requires: %{name} = %{version}-%{release}
308 Requires: eventum(router)
310 %description route-emails
311 The email routing feature is used to automatically associate a thread
312 of emails into an Eventum issue. By setting up qmail (or even postfix)
313 to deliver emails sent to a specific address (usually
314 issue-<number>@<domain>) to the above script, users are able to use
315 their email clients to reply to emails coming from Eventum, and those
316 replies will be automatically associated with the issue and
317 broadcasted to the entire notification list.
319 %description route-emails -l pl
320 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
321 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
322 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
323 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
324 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
325 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
326 rozprowadzane do ca³ej listy og³oszeniowej.
329 Summary: Eventum Note Routing
330 Summary(pl): Przekazywanie notatek dla Eventum
331 Group: Applications/WWW
332 Requires: %{name} = %{version}-%{release}
333 Requires: eventum(router)
335 %description route-notes
336 The note routing feature is used to automatically associate a thread
337 of notes into an Eventum issue. By setting up qmail (or even postfix)
338 to deliver emails sent to a specific address (usually
339 note-<number>@<domain>) to the above script, users are able to use
340 their email clients to reply to internal notes coming from Eventum,
341 and those replies will be automatically associated with the issue and
342 broadcasted to the notification list staff members.
344 %description route-notes -l pl
345 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
346 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
347 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
348 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
349 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
350 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
351 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
353 %package router-qmail
354 Summary: Eventum Mail Routing - qmail
355 Summary(pl): Przekazywanie poczty Eventum - qmail
356 Group: Applications/Mail
357 # loose dep is intentional. qmail subpackage isn't built on PLD
358 # builders and there really nothing changes.
359 Requires: %{name} >= %{version}-%{release}
360 Requires: qmail >= 1.03
361 Provides: eventum(router)
362 Obsoletes: eventum(router)
364 %description router-qmail
365 This package provides way of routing notes and emails back to Eventum
368 %description router-qmail -l pl
369 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
372 %package router-postfix
373 Summary: Eventum Mail Routing - Postfix
374 Summary(pl): Przekazywanie poczty Eventum - Postfix
375 Group: Applications/Mail
376 Requires: %{name} = %{version}-%{release}
378 Provides: eventum(router)
379 Obsoletes: eventum(router)
381 %description router-postfix
382 This package provides way of routing notes and emails back to Eventum
385 The Postfix configuration instructions you can find from
386 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
388 %description router-postfix -l pl
389 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
392 Opis konfiguracji Postfiksa mo¿na znale¼æ pod adresem
393 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
396 Summary: Eventum IRC Notification Bot
397 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
398 Group: Applications/WWW
399 Requires(post,preun): /sbin/chkconfig
400 Requires(triggerpostun): sed >= 4.0
401 Requires: %{name} = %{version}-%{release}
402 Requires: php-pear-Net_SmartIRC
403 Requires: php-sockets
404 Requires: rc-scripts >= 0.4.0.18
407 The IRC notification bot is a nice feature for remote teams that want
408 to handle issues and want to have a quick and easy way to get simple
409 notifications. Right now the bot notifies of the following actions:
412 - Issues that got their assignment list changed
414 NOTE: You will need to manually edit the bot.php script to set your
415 appropriate preferences, like IRC server and channel that the bot
418 %description irc -l pl
419 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
420 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
421 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
422 nastêpuj±cych zdarzeniach:
424 - zablokowanych listach
425 - sprawach, dla których zmieni³a siê lista powi±zañ
427 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
428 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
431 Summary: Eventum command-line interface
432 Summary(pl): Interfejs linii poleceñ dla Eventum
433 Group: Applications/WWW
434 Requires: %{name}-base = %{version}-%{release}
436 Requires: php-common >= 3:4.1.0
437 Requires: php-pear-XML_RPC
440 The Eventum command-line interface allows you to access most of the
441 features of the web interface straight from your command shell.
443 %description cli -l pl
444 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
445 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
448 Summary: Eventum SCM integration
449 Summary(pl): Integracja SCM dla Eventum
450 Group: Applications/WWW
451 Requires: %{name}-base = %{version}-%{release}
453 Requires: php-common >= 3:4.1.0
457 This feature allows your software development teams to integrate your
458 Source Control Management system with your Issue Tracking System.
460 The integration is implemented in such a way that it will be forward
461 compatible with pretty much any SCM system, such as CVS.
464 </eventum/help.php?topic=scm_integration_installation>.
466 %description scm -l pl
467 Ten pakiet pozwala zespo³om programistów na integracjê systemu
468 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
471 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
472 prawie ka¿dym systemem SCM, jak np. CVS.
474 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
475 </eventum/help.php?topic=scm_integration_installation>.
478 %setup -q %{?_snap:-n %{name}-%{_snap}}
480 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
484 rm -f setup.conf.php # not to be installed by *.php glob
485 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD Linux
486 rm -f misc/upgrade/flush_compiled_templates.php
487 rm -rf misc/upgrade/*/upgrade_config.php # not needed in PLD Linux
488 rm -rf misc/upgrade/*/index.html # not needed in PLD Linux
490 # sample, not used in eventum
491 rm -f rpc/xmlrpc_client.php
505 %{?with_order_patch:%patch11 -p1}
532 cat <<'EOF'> mysql-permissions.sql
533 # use this schema if you want to grant permissions manually instead of using setup
534 # this schema is extracted from setup/index.php.
535 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
538 mv misc/localization/de{_DE,}
539 mv misc/localization/es{_ES,}
540 mv misc/localization/fi{_FI,}
541 mv misc/localization/fr{_FR,}
542 mv misc/localization/it{_IT,}
543 mv misc/localization/nl{_NL,}
544 mv misc/localization/ru{_RU,}
546 # oops, the file got truncated - quick fix
547 cp misc/localization/eventum.po misc/localization/de/LC_MESSAGES/eventum.po
548 cp misc/localization/eventum.po misc/localization/es/LC_MESSAGES/eventum.po
549 cp misc/localization/eventum.po misc/localization/fi/LC_MESSAGES/eventum.po
550 cp misc/localization/eventum.po misc/localization/fr/LC_MESSAGES/eventum.po
551 cp misc/localization/eventum.po misc/localization/it/LC_MESSAGES/eventum.po
552 cp misc/localization/eventum.po misc/localization/nl/LC_MESSAGES/eventum.po
553 cp misc/localization/eventum.po misc/localization/ru/LC_MESSAGES/eventum.po
554 cp misc/localization/eventum.po misc/localization/en_US/LC_MESSAGES/eventum.po
556 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
557 sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
558 sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
559 mv misc/cli/eventumrc_example eventumrc
560 sed -i -e '1i#!%{_bindir}/php' misc/*.php
562 mv include/private_key.php private_key.php.in
564 # replace in remaining scripts config.inc.php to system one
565 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
566 s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"),
569 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
570 s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"),
573 # remove backups from patching as we use globs to package files to buildroot
574 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
578 for a in */LC_MESSAGES; do
579 msgfmt -o $a/eventum.mo $a/eventum.po
583 rm -rf $RPM_BUILD_ROOT
585 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
586 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
587 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
588 $RPM_BUILD_ROOT/var/log/{archiv/,}%{name} \
589 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
590 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
592 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
593 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
594 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
595 cp -a templates $RPM_BUILD_ROOT%{_appdir}
596 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
597 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
598 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
599 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
601 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
602 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
603 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
606 install -d $RPM_BUILD_ROOT%{_appdir}/cli
607 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
608 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
609 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
610 install %{name}-bot $RPM_BUILD_ROOT%{_sbindir}
613 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
614 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
617 cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php
619 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
620 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
621 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
622 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
623 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
624 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
625 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
626 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
627 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
630 s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}}%{?_rc:-%{_rc}},
631 s,%%{PHP_PEAR_DIR}%%,%{php_pear_dir},
632 s,%%{APP_PATH}%%,%{_appdir},
633 s,%%{SMARTY_DIR}%%,%{_smartydir},
634 s,%%{SYSCONFDIR}%%,%{_webappdir},
635 ' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
638 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
639 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
641 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
642 # These plugins are not in Smarty package (Smarty-2.6.2-3)
644 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
645 include/Smarty/plugins/modifier.highlight_quoted.php \
646 $RPM_BUILD_ROOT%{_smartyplugindir}
650 d=$RPM_BUILD_ROOT/var/lib/%{name}
651 echo 'root' > $d/.qmail
652 echo 'root' > $d/.qmail-default
653 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
654 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
655 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
656 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
659 install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix
661 install -D %{SOURCE15} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
664 for a in */LC_MESSAGES; do
665 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$a
666 cp -a $a/%{name}.mo $RPM_BUILD_ROOT%{_datadir}/locale/$a
673 rm -rf $RPM_BUILD_ROOT
676 %addusertogroup http %{name}
679 # check if the package is configured.
680 if grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then
681 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
682 %banner %{name} -e <<EOF
684 You haven't yet configured Eventum!
685 Please open in browser <http://localhost/eventum/>
686 If you need access from elsewhere, you need to edit
687 %{_webappdir}/apache.conf and restart apache.
689 IMPORTANT: When You have configured Eventum, please uninstall the
690 setup package, so that %{name}-setup is able to secure your Eventum
696 %banner %{name} -e <<EOF
698 You haven't yet configured Eventum!
700 To setup eventum, please install %{name}-setup and open in browser
701 <http://localhost/eventum/>.
702 If you need access from elsewhere, you need to edit
703 %{_webappdir}/apache.conf and restart apache.
705 IMPORTANT: When You have configured Eventum, please uninstall the
706 setup package, so that %{name}-setup is able to secure your Eventum
713 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
714 %banner %{name} -e <<EOF
716 You have default private key installed!
718 Install %{name}-setup and open up http://yourserver/eventum/setup/
719 -- that will help you setup initial config.
721 when have configured Eventum, please uninstall the setup package,
722 so that %{name}-setup is able to secure your Eventum installation.
725 elif [ -d %{_appdir}/setup ]; then
726 %banner %{name} -e <<EOF
728 If you have have configured Eventum, please uninstall the setup package,
729 so that %{name}-setup is able to secure your Eventum installation.
734 # nuke Smarty templates cache after upgrade
735 rm -f /var/cache/eventum/*.php
738 if [ "$1" = "0" ]; then
740 rm -f /var/cache/eventum/*.php 2>/dev/null || :
744 %groupadd -P %{name}-base -g 146 %{name}
745 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
748 if [ "$1" = "0" ]; then
754 CF=/etc/qmail/control/virtualdomains
755 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
756 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
757 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
759 echo "#${FQDN}:%{name}" >> $CF
761 %banner %{name}-qmail -e <<EOF
763 Added "#${FQDN}:%{name}" to $CF,
764 Please verify that it is correct and restart qmail:
765 # service qmail reload
767 Consult qmail-send(8) for more information on virtualdomains.
773 if [ "$1" = "0" ]; then
774 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
778 chmod 660 %{_webappdir}/{config,private_key}.php
779 chown root:eventum %{_webappdir}/{config,private_key}.php
782 if [ "$1" = "0" ]; then
783 chmod 640 %{_webappdir}/{config,private_key}.php
784 chown root:eventum %{_webappdir}/{config,private_key}.php
788 /sbin/chkconfig --add eventum-irc
789 %service eventum-irc restart "Eventum IRC Bot"
792 if [ "$1" = 0 ]; then
793 %service eventum-irc stop
794 /sbin/chkconfig --del eventum-irc
797 %triggerin -- apache1
798 %webapp_register apache %{_webapp}
800 %triggerun -- apache1
801 %webapp_unregister apache %{_webapp}
803 %triggerin -- apache < 2.2.0, apache-base
804 %webapp_register httpd %{_webapp}
806 %triggerun -- apache < 2.2.0, apache-base
807 %webapp_unregister httpd %{_webapp}
810 # only one upgrade trigger is called if you're upgrading over two
811 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
812 # use common trigger (the highest version and rpmvercmp from poldek?)
813 %triggerpostun -- eventum < 1.5.1-0.257
814 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
815 database_changes.php Perform database changes
818 %triggerpostun -- eventum < 1.5.2-0.289
819 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
820 database_changes.php Perform database changes
821 set_priority_ranks.php Fix the ranking of priority values
824 %triggerpostun -- eventum < 1.5.3-0.291
825 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
826 database_changes.php Perform database changes
829 %triggerpostun -- eventum < 1.5.4-1.12
830 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
831 database_changes.php Perform database changes
834 %triggerpostun -- eventum < 1.6.0-RC2.6
835 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
836 database_changes.php Perform database changes
837 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
840 %triggerpostun -- eventum < 1.6.1-0.2
841 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
842 database_changes.php Perform database changes
845 %triggerpostun -- eventum < 1.7.1-2.48.20060717
846 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.7.1_to_v2.0 <<EOF
847 database_changes.php Perform database changes
850 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
852 s,\$irc_host,$irc_server_hostname,
853 s,\$irc_port,$irc_server_port,
854 s,\$irc_nick,$nickname,
855 s,\$irc_realname,$realname,
856 s,\$irc_username,$username,
857 s,\$irc_password,$password,
858 ' /etc/eventum/irc.php
860 %triggerpostun -- eventum < 1.7.0-2.0.48
861 # migrate from apache-config macros
862 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
863 if [ -d /etc/apache/webapps.d ]; then
864 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
865 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
868 if [ -d /etc/httpd/webapps.d ]; then
869 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
870 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
874 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
875 /usr/sbin/webapp register apache %{_webapp}
876 rm -f /etc/apache/conf.d/99_%{_webapp}.conf
877 %service -q apache reload
879 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
880 /usr/sbin/webapp register httpd %{_webapp}
881 rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
882 %service -q httpd reload
885 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
886 database_changes.php Perform database changes
887 set_root_message_ids.php Set iss_root_message_id
891 for i in apache.conf config.php private_key.php setup.php; do
892 if [ -f /etc/eventum/$i.rpmsave ]; then
893 mv -f %{_webappdir}/$i{,.rpmnew}
894 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
898 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
899 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
900 mv -f %{_sysconfdir}/cli.php{,.rpmnew}
901 mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
904 %triggerpostun irc -- %{name}-irc < 1.7.0-3.4
905 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
906 mv -f %{_sysconfdir}/irc.php{,.rpmnew}
907 mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
911 %defattr(644,root,root,755)
912 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
913 %doc docs/* setup/schema.sql mysql-permissions.sql
914 %attr(751,root,root) %dir %{_webappdir}
915 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
916 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
917 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
918 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
919 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
920 %attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
922 %dir %attr(731,root,eventum) /var/log/%{name}
923 %attr(620,root,eventum) %ghost /var/log/%{name}/*
924 %dir %attr(750,root,root) /var/log/archiv/%{name}
925 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
927 %dir %{_appdir}/htdocs
928 %{_appdir}/htdocs/*.php
929 %{_appdir}/htdocs/*.ico
930 %{_appdir}/htdocs/css
931 %{_appdir}/htdocs/customer
932 %{_appdir}/htdocs/images
934 %{_appdir}/htdocs/manage
935 %{_appdir}/htdocs/reports
936 %{_appdir}/htdocs/rpc
937 %{_appdir}/htdocs/misc
939 %dir %{_appdir}/upgrade
940 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
941 %{_appdir}/upgrade/[!u]*
944 %dir %{_appdir}/include
945 %{_appdir}/include/customer
946 %{_appdir}/include/custom_field
947 %{_appdir}/include/jpgraph
948 %{_appdir}/include/workflow
949 %{_appdir}/include/class.[!m]*.php
950 %{_appdir}/include/class.mail.php
951 %{_appdir}/include/class.mail_queue.php
952 %{_appdir}/include/class.mime_helper.php
953 %{_appdir}/include/class.misc.php
954 %{_appdir}/include/db_access.php
956 %dir %attr(730,root,eventum) /var/run/%{name}
957 %dir %attr(730,root,eventum) /var/cache/%{name}
960 %defattr(644,root,root,755)
961 %attr(751,root,root) %dir %{_sysconfdir}
964 # qmail will ignore user, if it's home directory is not owned
965 %attr(750,eventum,eventum) %dir /var/lib/%{name}
967 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
968 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
969 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
972 %defattr(644,root,root,755)
973 %{_appdir}/htdocs/setup
976 %defattr(644,root,root,755)
977 %attr(755,root,root) %{_appdir}/process_mail_queue.php
978 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
981 %defattr(644,root,root,755)
982 %attr(755,root,root) %{_appdir}/download_emails.php
983 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
986 %defattr(644,root,root,755)
987 %attr(755,root,root) %{_appdir}/check_reminders.php
988 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
991 %defattr(644,root,root,755)
992 %{_appdir}/include/class.monitor.php
993 %attr(755,root,root) %{_appdir}/monitor.php
994 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
997 %defattr(644,root,root,755)
998 %attr(755,root,root) %{_appdir}/route_drafts.php
1001 %defattr(644,root,root,755)
1002 %attr(755,root,root) %{_appdir}/route_emails.php
1005 %defattr(644,root,root,755)
1006 %attr(755,root,root) %{_appdir}/route_notes.php
1010 %defattr(644,root,root,755)
1011 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
1012 %attr(755,root,root) %{_libdir}/router-qmail
1015 %files router-postfix
1016 %defattr(644,root,root,755)
1017 %attr(755,root,root) %{_libdir}/router-postfix
1020 %defattr(644,root,root,755)
1021 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
1022 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
1023 %attr(755,root,root) %{_sbindir}/%{name}-bot
1024 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
1027 %defattr(644,root,root,755)
1029 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
1030 %attr(755,root,root) %{_bindir}/%{name}
1034 %defattr(644,root,root,755)
1035 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
1036 %attr(755,root,root) %{_libdir}/scm