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: 65014cd0db22f54d293b165504fb7b65
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 Patch1: %{name}-bounce-notes.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 Patch105: %{name}-bot-reconnect.patch
51 Patch106: %{name}-mem-limits.patch
52 Patch107: %{name}-gettext.patch
54 Patch200: %{name}-fixed-nav.patch
55 URL: http://eventum.mysql.org/
56 BuildRequires: gettext-devel
57 BuildRequires: rpm-php-pearprov >= 4.0.2-98
58 BuildRequires: rpmbuild(macros) >= 1.268
59 BuildRequires: sed >= 4.0
60 Requires(triggerpostun): /usr/bin/php
61 Requires(triggerpostun): sed >= 4.0
62 Requires: %{name}-base = %{version}-%{release}
63 Requires: Smarty >= 2.6.10-4
66 Requires: php(mbstring)
69 Requires: php(session)
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 /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 -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
486 cat <<'EOF'> mysql-permissions.sql
487 # use this schema if you want to grant permissions manually instead of using setup
488 # this schema is extracted from setup/index.php.
489 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
492 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
493 mv misc/cli/eventumrc_example eventumrc
494 sed -i -e '1i#!%{_bindir}/php' misc/*.php
498 s,require_once.*init.php.*;,require_once '%{_appdir}/htdocs/init.php';,
499 s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
500 /define('INSTALL_PATH'/d
501 " misc/upgrade/{*/,}*.php
503 # remove backups from patching as we use globs to package files to buildroot
504 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
507 %{__make} -C misc/localization
510 rm -rf $RPM_BUILD_ROOT
512 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
513 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
514 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
515 $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
516 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
517 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
519 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
520 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
521 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
522 cp -a templates $RPM_BUILD_ROOT%{_appdir}
523 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
524 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
525 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
526 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
528 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
529 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
532 install -d $RPM_BUILD_ROOT%{_appdir}/cli
533 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
534 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
535 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
536 install misc/irc/bot.php $RPM_BUILD_ROOT%{_sbindir}/%{name}-bot
539 install misc/scm/process_cvs_commits.php $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
540 install misc/scm/process_svn_commits.php $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
541 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
542 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
546 $private_key = "DEFAULTPRIVATEKEY";' > $RPM_BUILD_ROOT%{_webappdir}/private_key.php
547 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
549 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
550 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
551 cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
552 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
553 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
554 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
555 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
556 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
557 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
558 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
561 %{__sed} -i -e "/define('APP_VERSION'/ {
562 idefine('APP_VERSION', '%{version}%{?snap:-%{snap}}%{?_rc:-%{_rc}}%{?svn:-%{svn}}');
565 }" $RPM_BUILD_ROOT%{_appdir}/htdocs/init.php
568 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
569 > $RPM_BUILD_ROOT%{_webappdir}/config.php
571 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
572 # These plugins are not in Smarty package (Smarty-2.6.2-3)
574 include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
575 include/Smarty/plugins/modifier.highlight_quoted.php \
576 $RPM_BUILD_ROOT%{_smartyplugindir}
580 d=$RPM_BUILD_ROOT/var/lib/%{name}
581 echo 'root' > $d/.qmail
582 echo 'root' > $d/.qmail-default
583 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
584 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
585 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
586 install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/router-qmail
589 install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
591 install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
594 for a in */LC_MESSAGES/*.mo; do
596 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$d
597 cp -a $a $RPM_BUILD_ROOT%{_datadir}/locale/$d
604 rm -rf $RPM_BUILD_ROOT
607 %addusertogroup http %{name}
610 # check if the package is configured.
611 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
612 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
613 %banner %{name} -e <<EOF
615 You haven't yet configured Eventum!
616 Please open in browser <http://localhost/eventum/>
617 If you need access from elsewhere, you need to edit
618 %{_webappdir}/apache.conf and restart apache.
620 IMPORTANT: When You have configured Eventum, please uninstall the
621 setup package, so that %{name}-setup is able to secure your Eventum
627 %banner %{name} -e <<EOF
629 You haven't yet configured Eventum!
631 To setup eventum, please install %{name}-setup and open in browser
632 <http://localhost/eventum/>.
633 If you need access from elsewhere, you need to edit
634 %{_webappdir}/*.conf depending on webserver and restart the webserver.
636 IMPORTANT: When You have configured Eventum, please uninstall the
637 setup package, so that %{name}-setup is able to secure your Eventum
644 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
645 %banner %{name} -e <<EOF
647 You have default private key installed!
649 Install %{name}-setup and open up http://yourserver/eventum/setup/
650 -- that will help you setup initial config.
652 when have configured Eventum, please uninstall the setup package,
653 so that %{name}-setup is able to secure your Eventum installation.
656 elif [ -d %{_appdir}/setup ]; then
657 %banner %{name} -e <<EOF
659 If you have have configured Eventum, please uninstall the setup package,
660 so that %{name}-setup is able to secure your Eventum installation.
666 %{_appdir}/upgrade/update-database.php || :
668 # nuke Smarty templates cache after upgrade
669 rm -f /var/cache/eventum/*.php
672 if [ "$1" = "0" ]; then
674 rm -f /var/cache/eventum/*.php 2>/dev/null || :
678 %groupadd -P %{name}-base -g 146 %{name}
679 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
682 if [ "$1" = "0" ]; then
688 CF=/etc/qmail/control/virtualdomains
689 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
690 FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
691 [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
693 echo "#${FQDN}:%{name}" >> $CF
695 %banner %{name}-qmail -e <<EOF
697 Added "#${FQDN}:%{name}" to $CF,
698 Please verify that it is correct and restart qmail:
699 # service qmail reload
701 Consult qmail-send(8) for more information on virtualdomains.
707 if [ "$1" = "0" ]; then
708 sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
712 chmod 660 %{_webappdir}/{config,private_key}.php
713 chown root:eventum %{_webappdir}/{config,private_key}.php
716 if [ "$1" = "0" ]; then
717 chmod 640 %{_webappdir}/{config,private_key}.php
718 chown root:eventum %{_webappdir}/{config,private_key}.php
722 /sbin/chkconfig --add eventum-irc
723 %service eventum-irc restart "Eventum IRC Bot"
726 if [ "$1" = 0 ]; then
727 %service eventum-irc stop
728 /sbin/chkconfig --del eventum-irc
731 %triggerin -- apache1 < 1.3.37-3, apache1-base
732 %webapp_register apache %{_webapp}
734 %triggerun -- apache1 < 1.3.37-3, apache1-base
735 %webapp_unregister apache %{_webapp}
737 %triggerin -- apache < 2.2.0, apache-base
738 %webapp_register httpd %{_webapp}
740 %triggerun -- apache < 2.2.0, apache-base
741 %webapp_unregister httpd %{_webapp}
743 %triggerin -- lighttpd
744 %webapp_register lighttpd %{_webapp}
746 %triggerun -- lighttpd
747 %webapp_unregister lighttpd %{_webapp}
749 %triggerpostun -- eventum < 2.1.1-2.13
750 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v2.1.1_to_v2.2 <<EOF
751 db_version.php Add eventum_version table
753 # automated database update
754 %{_appdir}/upgrade/update-database.php || :
756 %files -f %{name}.lang
757 %defattr(644,root,root,755)
758 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
759 %doc docs/* setup/schema.sql mysql-permissions.sql
760 %attr(751,root,root) %dir %{_webappdir}
761 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
762 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
763 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
764 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
765 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
766 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
767 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
769 %dir %attr(731,root,eventum) /var/log/%{name}
770 %attr(620,root,eventum) %ghost /var/log/%{name}/*
771 %dir %attr(750,root,root) /var/log/archive/%{name}
772 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
774 %dir %{_appdir}/htdocs
775 %{_appdir}/htdocs/*.php
776 %{_appdir}/htdocs/*.ico
777 %{_appdir}/htdocs/css
778 %{_appdir}/htdocs/customer
779 %{_appdir}/htdocs/images
781 %{_appdir}/htdocs/manage
782 %{_appdir}/htdocs/reports
783 %{_appdir}/htdocs/rpc
784 %{_appdir}/htdocs/misc
787 %dir %{_appdir}/upgrade
788 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
789 %attr(755,root,root) %{_appdir}/upgrade/update-database.php
790 %dir %{_appdir}/upgrade/v*
791 %attr(755,root,root) %{_appdir}/upgrade/v*/*.php
792 %{_appdir}/upgrade/patches
796 %dir %{_appdir}/include
797 %{_appdir}/include/customer
798 %{_appdir}/include/custom_field
799 %{_appdir}/include/jpgraph
800 %{_appdir}/include/workflow
801 %{_appdir}/include/class.*.php
802 %{_appdir}/include/db_access.php
803 %exclude %{_appdir}/include/class.monitor.php
805 %dir %attr(730,root,eventum) /var/run/%{name}
806 %dir %attr(730,root,eventum) /var/cache/%{name}
809 %defattr(644,root,root,755)
810 %attr(751,root,root) %dir %{_sysconfdir}
813 # qmail will ignore user, if it's home directory is not owned
814 %attr(750,eventum,eventum) %dir /var/lib/%{name}
816 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
817 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
818 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
821 %defattr(644,root,root,755)
822 %{_appdir}/htdocs/setup
825 %defattr(644,root,root,755)
826 %attr(755,root,root) %{_appdir}/process_mail_queue.php
827 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_appdir}/download_emails.php
832 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
835 %defattr(644,root,root,755)
836 %attr(755,root,root) %{_appdir}/check_reminders.php
837 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
840 %defattr(644,root,root,755)
841 %{_appdir}/include/class.monitor.php
842 %attr(755,root,root) %{_appdir}/monitor.php
843 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
846 %defattr(644,root,root,755)
847 %attr(755,root,root) %{_appdir}/route_drafts.php
850 %defattr(644,root,root,755)
851 %attr(755,root,root) %{_appdir}/route_emails.php
854 %defattr(644,root,root,755)
855 %attr(755,root,root) %{_appdir}/route_notes.php
859 %defattr(644,root,root,755)
860 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
861 %attr(755,root,root) %{_libdir}/router-qmail
864 %files router-postfix
865 %defattr(644,root,root,755)
866 %attr(755,root,root) %{_libdir}/router-postfix
869 %defattr(644,root,root,755)
870 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
871 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
872 %attr(755,root,root) %{_sbindir}/%{name}-bot
873 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
876 %defattr(644,root,root,755)
878 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
879 %attr(755,root,root) %{_bindir}/%{name}
883 %defattr(644,root,root,755)
884 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
885 %attr(755,root,root) %{_libdir}/process_cvs_commits
886 %attr(755,root,root) %{_libdir}/process_svn_commits
888 %ghost %{_libdir}/scm