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
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: http://mysql.tonnikala.org/Downloads/eventum/%{name}-%{version}.tar.gz
28 Source0: %{name}-%{svn}.tar.bz2
29 # Source0-md5: 4cec3f45a019f263cb8e5e7ccf7a3be2
30 Source1: %{name}-apache.conf
31 Source2: %{name}-mail-queue.cron
32 Source3: %{name}-mail-download.cron
33 Source4: %{name}-reminder.cron
34 Source5: %{name}-monitor.cron
35 Source6: %{name}-cvs.php
36 Source7: %{name}-irc.php
37 Source8: %{name}-irc.init
38 Source9: %{name}-irc.sysconfig
39 Source10: %{name}-router-qmail.sh
40 Source12: %{name}-upgrade.sh
41 Source13: %{name}-router-postfix.sh
42 Source14: %{name}.logrotate
43 Source15: %{name}-lighttpd.conf
44 Patch0: %{name}-lf.patch
45 # packaging patches that probably never go upstream
46 Patch100: %{name}-paths.patch
47 Patch101: %{name}-cvs-config.patch
48 Patch102: %{name}-irc-config.patch
49 Patch105: %{name}-bot-reconnect.patch
50 Patch106: %{name}-mem-limits.patch
51 Patch107: %{name}-gettext.patch
53 Patch200: %{name}-fixed-nav.patch
54 URL: http://eventum.mysql.org/
55 BuildRequires: gettext-devel
56 BuildRequires: rpm-php-pearprov >= 4.0.2-98
57 BuildRequires: rpmbuild(macros) >= 1.461
58 BuildRequires: sed >= 4.0
59 Requires(triggerpostun): /usr/bin/php
60 Requires(triggerpostun): sed >= 4.0
61 Requires: %{name}-base = %{version}-%{release}
62 Requires: Smarty >= 2.6.10-4
63 Requires: php-common >= 4:5.0
67 Requires: php-mbstring
71 Requires: php-pear-Date
72 Requires: php-pear-HTTP_Request
73 Requires: php-pear-Mail
74 Requires: php-pear-Mail_Mime
75 Requires: php-pear-Mail_mimeDecode
76 Requires: php-pear-Math_Stats
77 Requires: php-pear-Net_DIME
78 Requires: php-pear-Net_SMTP
79 Requires: php-pear-Net_Socket
80 Requires: php-pear-Net_URL
81 Requires: php-pear-Net_UserAgent_Detect
82 Requires: php-pear-PEAR-core
83 Requires: php-pear-Text_Diff
84 Requires: php-pear-XML_RPC
85 Requires: smarty-gettext
87 Requires: webserver(access)
88 Requires: webserver(alias)
89 Requires: webserver(indexfile)
90 Requires: webserver(php) >= 4.2.0
91 Conflicts: logrotate < 3.7-4
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 %{php_data_dir}/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 >= 4:5.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}
433 Requires: php-common >= 4:5.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 -r misc/upgrade/v{1.,2.0,2.1_}* # no longer supported in PLD Linux
465 rm misc/upgrade/flush_compiled_templates.php
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
472 # bug fixes / features
485 cat <<'EOF'> mysql-permissions.sql
486 # use this schema if you want to grant permissions manually instead of using setup
487 # this schema is extracted from setup/index.php.
488 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
491 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
492 mv misc/cli/eventumrc_example eventumrc
493 sed -i -e '1i#!%{_bindir}/php' misc/*.php
497 s,require_once.*init.php.*;,require_once '%{_appdir}/htdocs/init.php';,
498 s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
499 /define('INSTALL_PATH'/d
500 " misc/upgrade/{*/,}*.php
502 # remove backups from patching as we use globs to package files to buildroot
503 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
506 %{__make} -C misc/localization
509 rm -rf $RPM_BUILD_ROOT
511 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
512 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
513 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
514 $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
515 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
516 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
518 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
519 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
520 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
521 cp -a templates $RPM_BUILD_ROOT%{_appdir}
522 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
523 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
524 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
525 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
527 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
528 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
531 install -d $RPM_BUILD_ROOT%{_appdir}/cli
532 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
533 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
534 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
535 install misc/irc/bot.php $RPM_BUILD_ROOT%{_sbindir}/%{name}-bot
538 install misc/scm/process_cvs_commits.php $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
539 install misc/scm/process_svn_commits.php $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
540 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
541 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
545 $private_key = "DEFAULTPRIVATEKEY";' > $RPM_BUILD_ROOT%{_webappdir}/private_key.php
546 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
548 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
549 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
550 cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
551 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
552 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
553 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
554 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
555 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
556 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
557 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
560 %{__sed} -i -e "/define('APP_VERSION'/ {
561 idefine('APP_VERSION', '%{version}%{?snap:-%{snap}}%{?_rc:-%{_rc}}%{?svn:-%{svn}}');
564 }" $RPM_BUILD_ROOT%{_appdir}/htdocs/init.php
567 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
568 > $RPM_BUILD_ROOT%{_webappdir}/config.php
570 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
571 # These plugins are not in Smarty package (Smarty-2.6.2-3)
573 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
574 include/Smarty/plugins/modifier.highlight_quoted.php \
575 $RPM_BUILD_ROOT%{_smartyplugindir}
579 d=$RPM_BUILD_ROOT/var/lib/%{name}
580 echo 'root' > $d/.qmail
581 echo 'root' > $d/.qmail-default
582 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
583 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
584 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
585 install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/router-qmail
588 install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
590 install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
593 for a in */LC_MESSAGES/*.mo; do
595 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$d
596 cp -a $a $RPM_BUILD_ROOT%{_datadir}/locale/$d
603 rm -rf $RPM_BUILD_ROOT
606 %addusertogroup http %{name}
609 # check if the package is configured.
610 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
611 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
612 %banner %{name} -e <<EOF
614 You haven't yet configured Eventum!
615 Please open in browser <http://localhost/eventum/>
616 If you need access from elsewhere, you need to edit
617 %{_webappdir}/apache.conf and restart apache.
619 IMPORTANT: When You have configured Eventum, please uninstall the
620 setup package, so that %{name}-setup is able to secure your Eventum
626 %banner %{name} -e <<EOF
628 You haven't yet configured Eventum!
630 To setup eventum, please install %{name}-setup and open in browser
631 <http://localhost/eventum/>.
632 If you need access from elsewhere, you need to edit
633 %{_webappdir}/*.conf depending on webserver and restart the webserver.
635 IMPORTANT: When You have configured Eventum, please uninstall the
636 setup package, so that %{name}-setup is able to secure your Eventum
643 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
644 %banner %{name} -e <<EOF
646 You have default private key installed!
648 Install %{name}-setup and open up http://yourserver/eventum/setup/
649 -- that will help you setup initial config.
651 when have configured Eventum, please uninstall the setup package,
652 so that %{name}-setup is able to secure your Eventum installation.
655 elif [ -d %{_appdir}/setup ]; then
656 %banner %{name} -e <<EOF
658 If you have have configured Eventum, please uninstall the setup package,
659 so that %{name}-setup is able to secure your Eventum installation.
665 %{_appdir}/upgrade/update-database.php || :
667 # nuke Smarty templates cache after upgrade
668 rm -f /var/cache/eventum/*.php
671 if [ "$1" = "0" ]; then
673 rm -f /var/cache/eventum/*.php 2>/dev/null || :
677 %groupadd -P %{name}-base -g 146 %{name}
678 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
681 if [ "$1" = "0" ]; then
687 CF=/etc/qmail/control/virtualdomains
688 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
689 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
690 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
692 echo "#${FQDN}:%{name}" >> $CF
694 %banner %{name}-qmail -e <<EOF
696 Added "#${FQDN}:%{name}" to $CF,
697 Please verify that it is correct and restart qmail:
698 # service qmail reload
700 Consult qmail-send(8) for more information on virtualdomains.
706 if [ "$1" = "0" ]; then
707 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
711 chmod 660 %{_webappdir}/{config,private_key}.php
712 chown root:eventum %{_webappdir}/{config,private_key}.php
715 if [ "$1" = "0" ]; then
716 chmod 640 %{_webappdir}/{config,private_key}.php
717 chown root:eventum %{_webappdir}/{config,private_key}.php
721 /sbin/chkconfig --add eventum-irc
722 %service eventum-irc restart "Eventum IRC Bot"
725 if [ "$1" = 0 ]; then
726 %service eventum-irc stop
727 /sbin/chkconfig --del eventum-irc
730 %triggerin -- apache1 < 1.3.37-3, apache1-base
731 %webapp_register apache %{_webapp}
733 %triggerun -- apache1 < 1.3.37-3, apache1-base
734 %webapp_unregister apache %{_webapp}
736 %triggerin -- apache < 2.2.0, apache-base
737 %webapp_register httpd %{_webapp}
739 %triggerun -- apache < 2.2.0, apache-base
740 %webapp_unregister httpd %{_webapp}
742 %triggerin -- lighttpd
743 %webapp_register lighttpd %{_webapp}
745 %triggerun -- lighttpd
746 %webapp_unregister lighttpd %{_webapp}
748 %triggerpostun -- eventum < 2.1.1-2.13
749 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v2.1.1_to_v2.2 <<EOF
750 db_version.php Add eventum_version table
752 # automated database update
753 %{_appdir}/upgrade/update-database.php || :
755 %files -f %{name}.lang
756 %defattr(644,root,root,755)
757 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
758 %doc docs/* setup/schema.sql mysql-permissions.sql
759 %attr(751,root,root) %dir %{_webappdir}
760 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
761 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
762 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
763 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
764 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
765 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
766 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
768 %dir %attr(731,root,eventum) /var/log/%{name}
769 %attr(620,root,eventum) %ghost /var/log/%{name}/*
770 %dir %attr(750,root,root) /var/log/archive/%{name}
771 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
773 %dir %{_appdir}/htdocs
774 %{_appdir}/htdocs/*.php
775 %{_appdir}/htdocs/*.ico
776 %{_appdir}/htdocs/css
777 %{_appdir}/htdocs/customer
778 %{_appdir}/htdocs/images
780 %{_appdir}/htdocs/manage
781 %{_appdir}/htdocs/reports
782 %{_appdir}/htdocs/rpc
783 %{_appdir}/htdocs/misc
786 %dir %{_appdir}/upgrade
787 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
788 %attr(755,root,root) %{_appdir}/upgrade/update-database.php
789 %dir %{_appdir}/upgrade/v*
790 %attr(755,root,root) %{_appdir}/upgrade/v*/*.php
791 %{_appdir}/upgrade/patches
795 %dir %{_appdir}/include
796 %{_appdir}/include/customer
797 %{_appdir}/include/custom_field
798 %{_appdir}/include/jpgraph
799 %{_appdir}/include/workflow
800 %{_appdir}/include/class.*.php
801 %{_appdir}/include/db_access.php
802 %exclude %{_appdir}/include/class.monitor.php
804 %dir %attr(730,root,eventum) /var/run/%{name}
805 %dir %attr(730,root,eventum) /var/cache/%{name}
808 %defattr(644,root,root,755)
809 %attr(751,root,root) %dir %{_sysconfdir}
812 # qmail will ignore user, if it's home directory is not owned
813 %attr(750,eventum,eventum) %dir /var/lib/%{name}
815 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
816 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
817 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
820 %defattr(644,root,root,755)
821 %{_appdir}/htdocs/setup
824 %defattr(644,root,root,755)
825 %attr(755,root,root) %{_appdir}/process_mail_queue.php
826 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
829 %defattr(644,root,root,755)
830 %attr(755,root,root) %{_appdir}/download_emails.php
831 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
834 %defattr(644,root,root,755)
835 %attr(755,root,root) %{_appdir}/check_reminders.php
836 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
839 %defattr(644,root,root,755)
840 %{_appdir}/include/class.monitor.php
841 %attr(755,root,root) %{_appdir}/monitor.php
842 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
845 %defattr(644,root,root,755)
846 %attr(755,root,root) %{_appdir}/route_drafts.php
849 %defattr(644,root,root,755)
850 %attr(755,root,root) %{_appdir}/route_emails.php
853 %defattr(644,root,root,755)
854 %attr(755,root,root) %{_appdir}/route_notes.php
858 %defattr(644,root,root,755)
859 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
860 %attr(755,root,root) %{_libdir}/router-qmail
863 %files router-postfix
864 %defattr(644,root,root,755)
865 %attr(755,root,root) %{_libdir}/router-postfix
868 %defattr(644,root,root,755)
869 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
870 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
871 %attr(755,root,root) %{_sbindir}/%{name}-bot
872 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
875 %defattr(644,root,root,755)
877 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
878 %attr(755,root,root) %{_bindir}/%{name}
882 %defattr(644,root,root,755)
883 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
884 %attr(755,root,root) %{_libdir}/process_cvs_commits
885 %attr(755,root,root) %{_libdir}/process_svn_commits
887 %ghost %{_libdir}/scm