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
10 %bcond_with qmail # build the router-qmail subpackage
12 #define _snap 20060921
17 %include /usr/lib/rpm/macros.php
18 Summary: Eventum Issue / Bug tracking system
19 Summary(pl.UTF-8): Eventum - system śledzenia spraw/błędów
22 Release: %{?_rc:%{_rc}.}%{_rel}%{?_snap:.%{_snap}}%{?_svn:.%{_svn}}
24 Group: Applications/WWW
25 #Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
26 #Source0: http://eventum.mysql.org/downloads/eventum-2.0.RC3.tar.gz
27 Source0: %{name}-%{_svn}.tar.bz2
28 # Source0-md5: c37b26a5d44741c1d893b653ba26d17c
29 Source1: %{name}-apache.conf
30 Source2: %{name}-mail-queue.cron
31 Source3: %{name}-mail-download.cron
32 Source4: %{name}-reminder.cron
33 Source5: %{name}-monitor.cron
34 Source6: %{name}-cvs.php
35 Source7: %{name}-irc.php
36 Source8: %{name}-irc.init
37 Source9: %{name}-irc.sysconfig
38 Source10: %{name}-router-qmail.sh
39 Source12: %{name}-upgrade.sh
40 Source13: %{name}-router-postfix.sh
41 Source14: %{name}.logrotate
42 Source15: %{name}-lighttpd.conf
43 Patch0: %{name}-lf.patch
44 Patch1: %{name}-bounce-notes.patch
45 Patch2: %{name}-reports-tt.patch
46 # packaging patches that probably never go upstream
47 Patch100: %{name}-paths.patch
48 Patch101: %{name}-cvs-config.patch
49 Patch102: %{name}-irc-config.patch
50 Patch103: %{name}-PEAR.patch
51 Patch104: %{name}-httpclient-clientside.patch
52 Patch105: %{name}-bot-reconnect.patch
53 Patch106: %{name}-mem-limits.patch
54 Patch107: %{name}-gettext.patch
56 Patch200: %{name}-fixed-nav.patch
57 URL: http://dev.mysql.com/downloads/other/eventum/
58 BuildRequires: gettext-devel
59 BuildRequires: rpm-php-pearprov >= 4.0.2-98
60 BuildRequires: rpmbuild(macros) >= 1.268
61 BuildRequires: sed >= 4.0
62 Requires(triggerpostun): /usr/bin/php
63 Requires(triggerpostun): sed >= 4.0
64 Requires: %{name}-base = %{version}-%{release}
65 Requires: Smarty >= 2.6.10-4
66 Requires: apache(mod_dir)
69 Requires: php(mbstring)
72 Requires: php(session)
74 Requires: php-pear-Date
75 Requires: php-pear-HTTP_Request
76 Requires: php-pear-Mail
77 Requires: php-pear-Mail_Mime
78 Requires: php-pear-Math_Stats
79 Requires: php-pear-Net_DIME
80 Requires: php-pear-Net_SMTP
81 Requires: php-pear-Net_Socket
82 Requires: php-pear-Net_URL
83 Requires: php-pear-Net_UserAgent_Detect
84 Requires: php-pear-PEAR-core
85 Requires: php-pear-Text_Diff
86 Requires: php-pear-XML_RPC
87 Requires: smarty-gettext
89 Requires: webserver(access)
90 Requires: webserver(alias)
91 Requires: webserver(php) >= 4.2.0
93 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
95 %define _noautoreq 'pear(/etc/webapps/.*)' 'pear(%{_appdir}/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Benchmark/.*)'
97 %define _libdir %{_prefix}/lib/%{name}
98 %define _appdir %{_datadir}/%{name}
99 %define _smartyplugindir %{_appdir}/include/smarty
100 %define _smartydir /usr/share/php/Smarty
101 %define _webapps /etc/webapps
102 %define _webapp %{name}
103 %define _webappdir %{_webapps}/%{_webapp}
104 %define _sysconfdir /etc/%{name}
107 Eventum is a user-friendly and flexible issue tracking system that can
108 be used by a support department to track incoming technical support
109 requests, or by a software development team to quickly organize tasks
110 and bugs. Eventum is used by the MySQL AB Technical Support team, and
111 has allowed us to dramatically improve our response times.
113 %description -l pl.UTF-8
114 Eventum to przyjazny dla użytkownika system śledzenia spraw, który
115 może być używany przez dział obsługi do śledzenia przychodzących żądań
116 obsługi technicznej albo przez zespół tworzący oprogramowanie do
117 szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
118 Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
122 Summary: Eventum base package
123 Summary(pl.UTF-8): Podstawowy pakiet Eventum
124 Group: Applications/WWW
125 Requires(postun): /usr/sbin/groupdel
126 Requires(postun): /usr/sbin/userdel
127 Requires(pre): /bin/id
128 Requires(pre): /usr/bin/getgid
129 Requires(pre): /usr/sbin/groupadd
130 Requires(pre): /usr/sbin/useradd
131 Provides: group(eventum)
132 Provides: user(eventum)
135 This package contains base directory structure for Eventum.
137 %description base -l pl.UTF-8
138 Ten pakiet zawiera podstawową strukturę katalogów dla Eventum.
141 Summary: Eventum setup package
142 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Eventum
143 Group: Applications/WWW
144 Requires: %{name} = %{version}-%{release}
147 Install this package to configure initial Eventum installation. You
148 should uninstall this package when you're done, as it considered
149 insecure to keep the setup files in place.
151 %description setup -l pl.UTF-8
152 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
153 pierwszej instalacji. Potem należy go odinstalować, jako że
154 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
157 Summary: Eventum mail queue process
158 Summary(pl.UTF-8): Przetwarzanie kolejki poczty Eventum
159 Group: Applications/WWW
160 Requires: %{name} = %{version}-%{release}
163 %description mail-queue
164 Beginning with the first release of Eventum, emails are not directly
165 sent out from the various scripts, but rather added to a mail queue
166 table that is processed by a cron job. If an email cannot be sent, it
167 will be marked as such in the mail queue log, and the cron job script
168 will re-try to send it again the next time it runs.
170 This package contains the cron job.
172 %description mail-queue -l pl.UTF-8
173 Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
174 różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
175 Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
176 kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
179 Ten pakiet zawiera zadanie dla crona.
181 %package mail-download
182 Summary: Eventum email download
183 Summary(pl.UTF-8): Ściąganie poczty Eventum
184 Group: Applications/WWW
185 Requires: %{name} = %{version}-%{release}
188 %description mail-download
189 In order for Eventum's email integration feature to work, you need to
190 setup a cron job to run the script every so often.
192 This package contains the cron job.
194 %description mail-download -l pl.UTF-8
195 Aby integracja poczty elektronicznej w Eventum działała, trzeba
196 ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
199 Ten pakiet zawiera zadanie dla crona.
202 Summary: Eventum Reminder System
203 Summary(pl.UTF-8): System przypominania dla Eventum
204 Group: Applications/WWW
205 Requires: %{name} = %{version}-%{release}
208 %description reminder
209 The reminder system was designed with the objective as serving as a
210 safe net for issues that need attention. Depending on what
211 configuration you create, you may have several reminders (or alerts)
212 be sent out whenever an issue needs attention, for whatever parameter
213 you may deem necessary.
215 This package contains the cron job.
217 %description reminder -l pl.UTF-8
218 System przypominania został zaprojektowany tak, aby służył jako
219 bezpieczna sieć dla spraw wymagających uwagi. W zależności od
220 konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
221 przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
224 Ten pakiet zawiera zadanie dla crona.
227 Summary: Eventum Heartbeat Monitor
228 Summary(pl.UTF-8): Monitor życia dla Eventum
229 Group: Applications/WWW
230 Requires: %{name} = %{version}-%{release}
235 The heartbeat monitor is a feature designed for the administrator that
236 wants to be alerted whenever a common problem in Eventum is detected,
237 like the database server not being available anymore, or maybe when
238 the recommended permissions for certain configuration files are
241 Please note that before running the heartbeat monitor, you may need to
242 customize some of the checks to be appropriate for your own system,
243 particularly the permission and file checks on
244 Monitor::checkConfiguration().
246 This package contains the cron job.
248 %description monitor -l pl.UTF-8
249 Monitor życia to funkcjonalność zaprojektowana dla administratora
250 chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
251 Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
252 do plików konfiguracyjnych.
254 Należy zauważyć, że przed uruchomieniem tego monitora może być
255 konieczne dostosowanie niektórych testów do systemu, w szczególności
256 testów uprawnień i plików w Monitor::checkConfiguration().
258 Ten pakiet zawiera zadanie dla crona.
260 %package route-drafts
261 Summary: Eventum Draft Routing
262 Summary(pl.UTF-8): Przekazywanie szkiców dla Eventum
263 Group: Applications/WWW
264 Requires: %{name} = %{version}-%{release}
265 Requires: eventum(router)
267 %description route-drafts
268 The draft routing feature is used to automatically associate a thread
269 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
270 to deliver emails sent to a specific address (usually
271 draft-<number>@<domain>) to the above script, users are able to send
272 drafts written in their mail client to be stored in Eventum. These
273 drafts will NOT broadcasted to the notification list.
275 %description route-drafts -l pl.UTF-8
276 Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
277 problemem w Eventum. Ustawiając qmaila (czy nawet Postfiksa), aby
278 dostarczał pocztę wysłaną na podany adres (zwykle
279 draft-<liczba>@<domena>) do tego skryptu umożliwia się użytkownikom
280 wysyłanie szkiców napisanych w ich kliencie pocztowym do zapisania w
281 Eventum. Szkice te NIE będą wysyłane na listę powiadomień.
283 %package route-emails
284 Summary: Eventum Email Routing
285 Summary(pl.UTF-8): Przekazywanie poczty dla Eventum
286 Group: Applications/WWW
287 Requires: %{name} = %{version}-%{release}
288 Requires: eventum(router)
290 %description route-emails
291 The email routing feature is used to automatically associate a thread
292 of emails into an Eventum issue. By setting up qmail (or even postfix)
293 to deliver emails sent to a specific address (usually
294 issue-<number>@<domain>) to the above script, users are able to use
295 their email clients to reply to emails coming from Eventum, and those
296 replies will be automatically associated with the issue and
297 broadcasted to the entire notification list.
299 %description route-emails -l pl.UTF-8
300 Funkcjonalność przekazywania poczty służy do automatycznego wiązania
301 wątku listów ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
302 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
303 issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
304 używać klientów pocztowych do odpowiadania na listy przychodzące z
305 Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
306 rozprowadzane do całej listy ogłoszeniowej.
309 Summary: Eventum Note Routing
310 Summary(pl.UTF-8): Przekazywanie notatek dla Eventum
311 Group: Applications/WWW
312 Requires: %{name} = %{version}-%{release}
313 Requires: eventum(router)
315 %description route-notes
316 The note routing feature is used to automatically associate a thread
317 of notes into an Eventum issue. By setting up qmail (or even postfix)
318 to deliver emails sent to a specific address (usually
319 note-<number>@<domain>) to the above script, users are able to use
320 their email clients to reply to internal notes coming from Eventum,
321 and those replies will be automatically associated with the issue and
322 broadcasted to the notification list staff members.
324 %description route-notes -l pl.UTF-8
325 Funkcjonalność przekazywania notatek służy do automatycznego wiązania
326 wątku notatek ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
327 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
328 note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
329 używać klientów pocztowych do odpowiadania na wewnętrzne notatki
330 pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
331 sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
333 %package router-qmail
334 Summary: Eventum Mail Routing - qmail
335 Summary(pl.UTF-8): Przekazywanie poczty Eventum - qmail
336 Group: Applications/Mail
337 # loose dep is intentional. qmail subpackage isn't built on PLD
338 # builders and there really nothing changes.
339 Requires: %{name} >= %{version}-%{release}
340 Requires: qmail >= 1.03
341 Provides: eventum(router)
342 Obsoletes: eventum(router)
344 %description router-qmail
345 This package provides way of routing notes and emails back to Eventum
348 %description router-qmail -l pl.UTF-8
349 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
352 %package router-postfix
353 Summary: Eventum Mail Routing - Postfix
354 Summary(pl.UTF-8): Przekazywanie poczty Eventum - Postfix
355 Group: Applications/Mail
356 Requires: %{name} = %{version}-%{release}
358 Provides: eventum(router)
359 Obsoletes: eventum(router)
361 %description router-postfix
362 This package provides way of routing notes and emails back to Eventum
365 The Postfix configuration instructions you can find from
366 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
368 %description router-postfix -l pl.UTF-8
369 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
372 Opis konfiguracji Postfiksa można znaleźć pod adresem
373 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
376 Summary: Eventum IRC Notification Bot
377 Summary(pl.UTF-8): IRC-owy bot powiadamiający dla Eventum
378 Group: Applications/WWW
379 Requires(post,preun): /sbin/chkconfig
380 Requires(triggerpostun): sed >= 4.0
381 Requires: %{name} = %{version}-%{release}
382 Requires: php(sockets)
383 Requires: php-pear-Net_SmartIRC
384 Requires: rc-scripts >= 0.4.0.18
387 The IRC notification bot is a nice feature for remote teams that want
388 to handle issues and want to have a quick and easy way to get simple
389 notifications. Right now the bot notifies of the following actions:
392 - Issues that got their assignment list changed
394 NOTE: You will need to manually edit the bot.php script to set your
395 appropriate preferences, like IRC server and channel that the bot
398 %description irc -l pl.UTF-8
399 IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
400 zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
401 uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
402 następujących zdarzeniach:
404 - zablokowanych listach
405 - sprawach, dla których zmieniła się lista powiązań
407 UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
408 kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
411 Summary: Eventum command-line interface
412 Summary(pl.UTF-8): Interfejs linii poleceń dla Eventum
413 Group: Applications/WWW
414 Requires: %{name}-base = %{version}-%{release}
416 Requires: php-common >= 3:4.1.0
417 Requires: php-pear-XML_RPC
420 The Eventum command-line interface allows you to access most of the
421 features of the web interface straight from your command shell.
423 %description cli -l pl.UTF-8
424 Interfejs linii poleceń Eventum pozwala na dostęp do większości
425 funkcji interfejsu WWW prosto z linii poleceń powłoki.
428 Summary: Eventum SCM integration
429 Summary(pl.UTF-8): Integracja SCM dla Eventum
430 Group: Applications/WWW
431 Requires: %{name}-base = %{version}-%{release}
434 Requires: php-common >= 3:4.1.0
437 This feature allows your software development teams to integrate your
438 Source Control Management system with your Issue Tracking System.
440 The integration is implemented in such a way that it will be forward
441 compatible with pretty much any SCM system, such as CVS.
444 </eventum/help.php?topic=scm_integration_installation>.
446 %description scm -l pl.UTF-8
447 Ten pakiet pozwala zespołom programistów na integrację systemu
448 zarządzania źródłami (SCM - Source Control Management) z systemem
451 Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
452 prawie każdym systemem SCM, jak np. CVS.
454 Szczegóły na temat instalacji można przeczytać pod
455 </eventum/help.php?topic=scm_integration_installation>.
458 %setup -q %{?_snap:-n %{name}-%{_snap}}%{?_svn:-n %{name}-%{_svn}}
460 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
463 rm -r misc/upgrade/*v1.[123]* # too old to support in PLD Linux
464 rm misc/upgrade/flush_compiled_templates.php
465 rm -r misc/upgrade/*/upgrade_config.php # not needed in PLD Linux
466 rm -r misc/upgrade/*/index.html # not needed in PLD Linux
468 rm -r include/php-gettext
469 # sample, not used in eventum
470 rm rpc/xmlrpc_client.php
489 cat <<'EOF'> mysql-permissions.sql
490 # use this schema if you want to grant permissions manually instead of using setup
491 # this schema is extracted from setup/index.php.
492 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
495 mv misc/localization/de{_DE,}
496 mv misc/localization/es{_ES,}
497 mv misc/localization/fi{_FI,}
498 mv misc/localization/fr{_FR,}
499 mv misc/localization/it{_IT,}
500 mv misc/localization/nl{_NL,}
501 mv misc/localization/ru{_RU,}
502 mv misc/localization/sv{_SE,}
503 mkdir -p misc/localization/pl/LC_MESSAGES
505 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
506 mv misc/cli/eventumrc_example eventumrc
507 sed -i -e '1i#!%{_bindir}/php' misc/*.php
510 sed -i -e "s,require_once.*init.php.*;,require_once '%{_appdir}/htdocs/init.php';," misc/upgrade/*/*.php
512 # remove backups from patching as we use globs to package files to buildroot
513 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
517 for a in */LC_MESSAGES; do
518 msgfmt -o $a/eventum.mo $a/eventum.po
522 rm -rf $RPM_BUILD_ROOT
524 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
525 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
526 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
527 $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
528 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
529 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
531 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
532 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
533 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
534 cp -a templates $RPM_BUILD_ROOT%{_appdir}
535 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
536 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
537 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
538 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
540 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
541 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
544 install -d $RPM_BUILD_ROOT%{_appdir}/cli
545 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
546 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
547 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
548 install misc/irc/bot.php $RPM_BUILD_ROOT%{_sbindir}/%{name}-bot
551 install misc/scm/process_cvs_commits.php $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
552 install misc/scm/process_svn_commits.php $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
553 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
554 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
558 $private_key = "DEFAULTPRIVATEKEY";' > $RPM_BUILD_ROOT%{_webappdir}/private_key.php
559 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
561 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
562 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
563 cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
564 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
565 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
566 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
567 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
568 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
569 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
570 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
573 %{__sed} -i -e "/define('APP_VERSION'/ {
574 idefine('APP_VERSION', '%{version}%{?_snap:-%{_snap}}%{?_rc:-%{_rc}}%{?_svn:-%{_svn}}');
577 }" $RPM_BUILD_ROOT%{_appdir}/htdocs/init.php
580 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
581 > $RPM_BUILD_ROOT%{_webappdir}/config.php
583 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
584 # These plugins are not in Smarty package (Smarty-2.6.2-3)
586 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
587 include/Smarty/plugins/modifier.highlight_quoted.php \
588 $RPM_BUILD_ROOT%{_smartyplugindir}
592 d=$RPM_BUILD_ROOT/var/lib/%{name}
593 echo 'root' > $d/.qmail
594 echo 'root' > $d/.qmail-default
595 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
596 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
597 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
598 install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/router-qmail
601 install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
603 install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
606 for a in */LC_MESSAGES; do
607 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$a
608 cp -a $a/%{name}.mo $RPM_BUILD_ROOT%{_datadir}/locale/$a
615 rm -rf $RPM_BUILD_ROOT
618 %addusertogroup http %{name}
621 # check if the package is configured.
622 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
623 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
624 %banner %{name} -e <<EOF
626 You haven't yet configured Eventum!
627 Please open in browser <http://localhost/eventum/>
628 If you need access from elsewhere, you need to edit
629 %{_webappdir}/apache.conf and restart apache.
631 IMPORTANT: When You have configured Eventum, please uninstall the
632 setup package, so that %{name}-setup is able to secure your Eventum
638 %banner %{name} -e <<EOF
640 You haven't yet configured Eventum!
642 To setup eventum, please install %{name}-setup and open in browser
643 <http://localhost/eventum/>.
644 If you need access from elsewhere, you need to edit
645 %{_webappdir}/*.conf depending on webserver and restart the webserver.
647 IMPORTANT: When You have configured Eventum, please uninstall the
648 setup package, so that %{name}-setup is able to secure your Eventum
655 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
656 %banner %{name} -e <<EOF
658 You have default private key installed!
660 Install %{name}-setup and open up http://yourserver/eventum/setup/
661 -- that will help you setup initial config.
663 when have configured Eventum, please uninstall the setup package,
664 so that %{name}-setup is able to secure your Eventum installation.
667 elif [ -d %{_appdir}/setup ]; then
668 %banner %{name} -e <<EOF
670 If you have have configured Eventum, please uninstall the setup package,
671 so that %{name}-setup is able to secure your Eventum installation.
676 # nuke Smarty templates cache after upgrade
677 rm -f /var/cache/eventum/*.php
680 if [ "$1" = "0" ]; then
682 rm -f /var/cache/eventum/*.php 2>/dev/null || :
686 %groupadd -P %{name}-base -g 146 %{name}
687 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
690 if [ "$1" = "0" ]; then
696 CF=/etc/qmail/control/virtualdomains
697 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
698 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
699 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
701 echo "#${FQDN}:%{name}" >> $CF
703 %banner %{name}-qmail -e <<EOF
705 Added "#${FQDN}:%{name}" to $CF,
706 Please verify that it is correct and restart qmail:
707 # service qmail reload
709 Consult qmail-send(8) for more information on virtualdomains.
715 if [ "$1" = "0" ]; then
716 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
720 chmod 660 %{_webappdir}/{config,private_key}.php
721 chown root:eventum %{_webappdir}/{config,private_key}.php
724 if [ "$1" = "0" ]; then
725 chmod 640 %{_webappdir}/{config,private_key}.php
726 chown root:eventum %{_webappdir}/{config,private_key}.php
730 /sbin/chkconfig --add eventum-irc
731 %service eventum-irc restart "Eventum IRC Bot"
734 if [ "$1" = 0 ]; then
735 %service eventum-irc stop
736 /sbin/chkconfig --del eventum-irc
739 %triggerin -- apache1 < 1.3.37-3, apache1-base
740 %webapp_register apache %{_webapp}
742 %triggerun -- apache1 < 1.3.37-3, apache1-base
743 %webapp_unregister apache %{_webapp}
745 %triggerin -- apache < 2.2.0, apache-base
746 %webapp_register httpd %{_webapp}
748 %triggerun -- apache < 2.2.0, apache-base
749 %webapp_unregister httpd %{_webapp}
751 %triggerin -- lighttpd
752 %webapp_register lighttpd %{_webapp}
754 %triggerun -- lighttpd
755 %webapp_unregister lighttpd %{_webapp}
758 # only one upgrade trigger is called if you're upgrading over two
759 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
760 # use common trigger (the highest version and rpmvercmp from poldek?)
761 %triggerpostun -- eventum < 1.5.1-0.257
762 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
763 database_changes.php Perform database changes
766 %triggerpostun -- eventum < 1.5.2-0.289
767 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
768 database_changes.php Perform database changes
769 set_priority_ranks.php Fix the ranking of priority values
772 %triggerpostun -- eventum < 1.5.3-0.291
773 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
774 database_changes.php Perform database changes
777 %triggerpostun -- eventum < 1.5.4-1.12
778 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
779 database_changes.php Perform database changes
782 %triggerpostun -- eventum < 1.6.0-RC2.6
783 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
784 database_changes.php Perform database changes
785 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
788 %triggerpostun -- eventum < 1.6.1-0.2
789 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
790 database_changes.php Perform database changes
793 %triggerpostun -- eventum < 1.7.1-4.132.20061119.3143
794 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.7.1_to_v2.0 <<EOF
795 database_changes.php Perform database changes
798 %triggerpostun -- eventum < 2.0-0.211
799 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v2.0_to_v2.0.1 <<EOF
800 database_changes.php Perform database changes
803 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
805 s,\$irc_host,$irc_server_hostname,
806 s,\$irc_port,$irc_server_port,
807 s,\$irc_nick,$nickname,
808 s,\$irc_realname,$realname,
809 s,\$irc_username,$username,
810 s,\$irc_password,$password,
811 ' /etc/eventum/irc.php
813 %triggerpostun -- eventum < 1.7.0-2.0.48
814 # migrate from apache-config macros
815 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
816 if [ -d /etc/apache/webapps.d ]; then
817 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
818 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
821 if [ -d /etc/httpd/webapps.d ]; then
822 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
823 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
827 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
828 /usr/sbin/webapp register apache %{_webapp}
829 rm -f /etc/apache/conf.d/99_%{_webapp}.conf
830 %service -q apache reload
832 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
833 /usr/sbin/webapp register httpd %{_webapp}
834 rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
835 %service -q httpd reload
838 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
839 database_changes.php Perform database changes
840 set_root_message_ids.php Set iss_root_message_id
844 for i in apache.conf config.php private_key.php setup.php; do
845 if [ -f /etc/eventum/$i.rpmsave ]; then
846 mv -f %{_webappdir}/$i{,.rpmnew}
847 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
851 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
852 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
853 mv -f %{_sysconfdir}/cli.php{,.rpmnew}
854 mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
857 %triggerpostun scm -- %{name}-scm < 1.7.1-2.70.20060724
858 if [ -f %{_sysconfdir}/cvs.php.rpmsave ]; then
859 mv -f %{_sysconfdir}/scm.php{,.rpmnew}
860 mv -f %{_sysconfdir}/cvs.php.rpmsave %{_sysconfdir}/scm.php
862 ln -sf process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
864 %triggerpostun -- %{name} < 1.7.1-5.165
867 ' %{_webappdir}/config.php
869 %triggerpostun -- %{name} < 2.0-0.235
870 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v2.0-beta_to_v2.0 <<EOF
871 database_changes.php Perform database changes
874 %triggerpostun irc -- %{name}-irc < 1.7.1-5.181
875 # change from 1.7.0-3.4
876 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
877 mv -f %{_webappdir}/irc_config.php{,.rpmnew}
878 mv -f %{_webappdir}/irc.php.rpmsave %{_webappdir}/irc_config.php
881 # change from 1.7.1-5.181
882 if [ -f %{_sysconfdir}/irc.php.rpmsave ]; then
883 mv -f %{_webappdir}/irc_config.php{,.rpmnew}
884 mv -f %{_sysconfdir}/irc.php.rpmsave %{_webappdir}/irc_config.php
887 %files -f %{name}.lang
888 %defattr(644,root,root,755)
889 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
890 %doc docs/* setup/schema.sql mysql-permissions.sql
891 %attr(751,root,root) %dir %{_webappdir}
892 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
893 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
894 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
895 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
896 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
897 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
898 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
900 %dir %attr(731,root,eventum) /var/log/%{name}
901 %attr(620,root,eventum) %ghost /var/log/%{name}/*
902 %dir %attr(750,root,root) /var/log/archive/%{name}
903 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
905 %dir %{_appdir}/htdocs
906 %{_appdir}/htdocs/*.php
907 %{_appdir}/htdocs/*.ico
908 %{_appdir}/htdocs/css
909 %{_appdir}/htdocs/customer
910 %{_appdir}/htdocs/images
912 %{_appdir}/htdocs/manage
913 %{_appdir}/htdocs/reports
914 %{_appdir}/htdocs/rpc
915 %{_appdir}/htdocs/misc
917 %dir %{_appdir}/upgrade
918 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
919 %{_appdir}/upgrade/[!u]*
922 %dir %{_appdir}/include
923 %{_appdir}/include/customer
924 %{_appdir}/include/custom_field
925 %{_appdir}/include/jpgraph
926 %{_appdir}/include/workflow
927 %{_appdir}/include/class.[!m]*.php
928 %{_appdir}/include/class.mail.php
929 %{_appdir}/include/class.mail_queue.php
930 %{_appdir}/include/class.mime_helper.php
931 %{_appdir}/include/class.misc.php
932 %{_appdir}/include/db_access.php
934 %dir %attr(730,root,eventum) /var/run/%{name}
935 %dir %attr(730,root,eventum) /var/cache/%{name}
938 %defattr(644,root,root,755)
939 %attr(751,root,root) %dir %{_sysconfdir}
942 # qmail will ignore user, if it's home directory is not owned
943 %attr(750,eventum,eventum) %dir /var/lib/%{name}
945 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
946 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
947 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
950 %defattr(644,root,root,755)
951 %{_appdir}/htdocs/setup
954 %defattr(644,root,root,755)
955 %attr(755,root,root) %{_appdir}/process_mail_queue.php
956 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
959 %defattr(644,root,root,755)
960 %attr(755,root,root) %{_appdir}/download_emails.php
961 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
964 %defattr(644,root,root,755)
965 %attr(755,root,root) %{_appdir}/check_reminders.php
966 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
969 %defattr(644,root,root,755)
970 %{_appdir}/include/class.monitor.php
971 %attr(755,root,root) %{_appdir}/monitor.php
972 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
975 %defattr(644,root,root,755)
976 %attr(755,root,root) %{_appdir}/route_drafts.php
979 %defattr(644,root,root,755)
980 %attr(755,root,root) %{_appdir}/route_emails.php
983 %defattr(644,root,root,755)
984 %attr(755,root,root) %{_appdir}/route_notes.php
988 %defattr(644,root,root,755)
989 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
990 %attr(755,root,root) %{_libdir}/router-qmail
993 %files router-postfix
994 %defattr(644,root,root,755)
995 %attr(755,root,root) %{_libdir}/router-postfix
998 %defattr(644,root,root,755)
999 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
1000 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
1001 %attr(755,root,root) %{_sbindir}/%{name}-bot
1002 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
1005 %defattr(644,root,root,755)
1007 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
1008 %attr(755,root,root) %{_bindir}/%{name}
1012 %defattr(644,root,root,755)
1013 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
1014 %attr(755,root,root) %{_libdir}/process_cvs_commits
1015 %attr(755,root,root) %{_libdir}/process_svn_commits
1017 %ghost %{_libdir}/scm