]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- update to 2.2-dev-r3890
[packages/eventum.git] / eventum.spec
1 # TODO
2 # - discard bundled packages (from INSTALL):
3 #  - JpGraph 1.5.3 (last GPL version)
4 #  - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
5 #  - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
6 #  - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
7 #  - A few other small javascript libraries
8 #
9 # Conditional build:
10 %bcond_without  order   # with experimental order patch
11
12 #define snap    20060921
13 %define rev             r3890
14 %define rel             2.28
15 #define _rc             RC3
16
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
20 Name:           eventum
21 Version:        2.2
22 Release:        %{?_rc:%{_rc}.}%{rel}%{?snap:.%{snap}}%{?rev:.%{rev}}
23 License:        GPL
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.easynet.be/Downloads/eventum/%{name}-%{version}.tar.gz
28 # bzr branch lp:eventum eventum && tar -cjf eventum.tar.bz2 --exclude=.bzr --exclude=.bzrignore eventum
29 Source0:        eventum-%{version}-dev-%{rev}.tar.gz
30 # Source0-md5:  2c1a0fb3a6d7ee885184376d4db49264
31 Source1:        %{name}-apache.conf
32 Source2:        %{name}-mail-queue.cron
33 Source3:        %{name}-mail-download.cron
34 Source4:        %{name}-reminder.cron
35 Source5:        %{name}-monitor.cron
36 Source6:        %{name}-cvs.php
37 Source7:        %{name}-irc.php
38 Source8:        %{name}-irc.init
39 Source9:        %{name}-irc.sysconfig
40 Source13:       %{name}-router-postfix.sh
41 Source14:       %{name}.logrotate
42 Source15:       %{name}-lighttpd.conf
43 Source16:       http://www.isocra.com/images/updown2.gif
44 # Source16-md5: deb6eeb2552ba757d3a949ed10c4107d
45 Patch0:         %{name}-lf.patch
46 Patch2:         %{name}-order.patch
47 # packaging patches that probably never go upstream
48 Patch100:       %{name}-paths.patch
49 Patch101:       %{name}-cvs-config.patch
50 Patch105:       %{name}-bot-reconnect.patch
51 Patch107:       %{name}-gettext.patch
52 # some tests
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
64 Requires:       php-gd
65 Requires:       php-iconv
66 Requires:       php-imap
67 Requires:       php-mbstring
68 Requires:       php-mysql
69 Requires:       php-pcre
70 Requires:       php-pear-DB
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
86 Requires:       webapps
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
92 BuildArch:      noarch
93 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95 %define         _noautoreq      'pear(init.php)' 'pear(/etc/webapps/.*)' 'pear(%{_appdir}/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
96
97 %define         _libdir         %{_prefix}/lib/%{name}
98 %define         _appdir         %{_datadir}/%{name}
99 %define         _smartydir      %{php_data_dir}/Smarty
100 %define         _webapps        /etc/webapps
101 %define         _webapp         %{name}
102 %define         _webappdir      %{_webapps}/%{_webapp}
103 %define         _sysconfdir     /etc/%{name}
104
105 %description
106 Eventum is a user-friendly and flexible issue tracking system that can
107 be used by a support department to track incoming technical support
108 requests, or by a software development team to quickly organize tasks
109 and bugs. Eventum is used by the MySQL AB Technical Support team, and
110 has allowed us to dramatically improve our response times.
111
112 %description -l pl.UTF-8
113 Eventum to przyjazny dla użytkownika system śledzenia spraw, który
114 może być używany przez dział obsługi do śledzenia przychodzących żądań
115 obsługi technicznej albo przez zespół tworzący oprogramowanie do
116 szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
117 Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
118 reakcji.
119
120 %package base
121 Summary:        Eventum base package
122 Summary(pl.UTF-8):      Podstawowy pakiet Eventum
123 Group:          Applications/WWW
124 Requires(postun):       /usr/sbin/groupdel
125 Requires(postun):       /usr/sbin/userdel
126 Requires(pre):  /bin/id
127 Requires(pre):  /usr/bin/getgid
128 Requires(pre):  /usr/sbin/groupadd
129 Requires(pre):  /usr/sbin/useradd
130 Provides:       group(eventum)
131 Provides:       user(eventum)
132
133 %description base
134 This package contains base directory structure for Eventum.
135
136 %description base -l pl.UTF-8
137 Ten pakiet zawiera podstawową strukturę katalogów dla Eventum.
138
139 %package setup
140 Summary:        Eventum setup package
141 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Eventum
142 Group:          Applications/WWW
143 Requires:       %{name} = %{version}-%{release}
144
145 %description setup
146 Install this package to configure initial Eventum installation. You
147 should uninstall this package when you're done, as it considered
148 insecure to keep the setup files in place.
149
150 %description setup -l pl.UTF-8
151 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
152 pierwszej instalacji. Potem należy go odinstalować, jako że
153 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
154
155 %package mail-queue
156 Summary:        Eventum mail queue process
157 Summary(pl.UTF-8):      Przetwarzanie kolejki poczty Eventum
158 Group:          Applications/WWW
159 Requires:       %{name} = %{version}-%{release}
160 Requires:       crondaemon
161
162 %description mail-queue
163 Beginning with the first release of Eventum, emails are not directly
164 sent out from the various scripts, but rather added to a mail queue
165 table that is processed by a cron job. If an email cannot be sent, it
166 will be marked as such in the mail queue log, and the cron job script
167 will re-try to send it again the next time it runs.
168
169 This package contains the cron job.
170
171 %description mail-queue -l pl.UTF-8
172 Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
173 różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
174 Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
175 kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
176 następnym razem.
177
178 Ten pakiet zawiera zadanie dla crona.
179
180 %package mail-download
181 Summary:        Eventum email download
182 Summary(pl.UTF-8):      Ściąganie poczty Eventum
183 Group:          Applications/WWW
184 Requires:       %{name} = %{version}-%{release}
185 Requires:       crondaemon
186
187 %description mail-download
188 In order for Eventum's email integration feature to work, you need to
189 setup a cron job to run the script every so often.
190
191 This package contains the cron job.
192
193 %description mail-download -l pl.UTF-8
194 Aby integracja poczty elektronicznej w Eventum działała, trzeba
195 ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
196 często.
197
198 Ten pakiet zawiera zadanie dla crona.
199
200 %package reminder
201 Summary:        Eventum Reminder System
202 Summary(pl.UTF-8):      System przypominania dla Eventum
203 Group:          Applications/WWW
204 Requires:       %{name} = %{version}-%{release}
205 Requires:       crondaemon
206
207 %description reminder
208 The reminder system was designed with the objective as serving as a
209 safe net for issues that need attention. Depending on what
210 configuration you create, you may have several reminders (or alerts)
211 be sent out whenever an issue needs attention, for whatever parameter
212 you may deem necessary.
213
214 This package contains the cron job.
215
216 %description reminder -l pl.UTF-8
217 System przypominania został zaprojektowany tak, aby służył jako
218 bezpieczna sieć dla spraw wymagających uwagi. W zależności od
219 konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
220 przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
221 uważać za potrzebny.
222
223 Ten pakiet zawiera zadanie dla crona.
224
225 %package monitor
226 Summary:        Eventum Heartbeat Monitor
227 Summary(pl.UTF-8):      Monitor życia dla Eventum
228 Group:          Applications/WWW
229 Requires:       %{name} = %{version}-%{release}
230 Requires:       crondaemon
231 Requires:       php(posix)
232
233 %description monitor
234 The heartbeat monitor is a feature designed for the administrator that
235 wants to be alerted whenever a common problem in Eventum is detected,
236 like the database server not being available anymore, or maybe when
237 the recommended permissions for certain configuration files are
238 changed.
239
240 Please note that before running the heartbeat monitor, you may need to
241 customize some of the checks to be appropriate for your own system,
242 particularly the permission and file checks on
243 Monitor::checkConfiguration().
244
245 This package contains the cron job.
246
247 %description monitor -l pl.UTF-8
248 Monitor życia to funkcjonalność zaprojektowana dla administratora
249 chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
250 Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
251 do plików konfiguracyjnych.
252
253 Należy zauważyć, że przed uruchomieniem tego monitora może być
254 konieczne dostosowanie niektórych testów do systemu, w szczególności
255 testów uprawnień i plików w Monitor::checkConfiguration().
256
257 Ten pakiet zawiera zadanie dla crona.
258
259 %package route-drafts
260 Summary:        Eventum Draft Routing
261 Summary(pl.UTF-8):      Przekazywanie szkiców dla Eventum
262 Group:          Applications/WWW
263 Requires:       %{name} = %{version}-%{release}
264 Requires:       eventum(router)
265
266 %description route-drafts
267 The draft routing feature is used to automatically associate a thread
268 of drafts into an Eventum issue. By setting up Postfix
269 to deliver emails sent to a specific address (usually
270 draft-<number>@<domain>) to the above script, users are able to send
271 drafts written in their mail client to be stored in Eventum. These
272 drafts will NOT broadcasted to the notification list.
273
274 %description route-drafts -l pl.UTF-8
275 Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
276 problemem w Eventum. Ustawiając Postfiksa, aby
277 dostarczał pocztę wysłaną na podany adres (zwykle
278 draft-<liczba>@<domena>) do tego skryptu umożliwia się użytkownikom
279 wysyłanie szkiców napisanych w ich kliencie pocztowym do zapisania w
280 Eventum. Szkice te NIE będą wysyłane na listę powiadomień.
281
282 %package route-emails
283 Summary:        Eventum Email Routing
284 Summary(pl.UTF-8):      Przekazywanie poczty dla Eventum
285 Group:          Applications/WWW
286 Requires:       %{name} = %{version}-%{release}
287 Requires:       eventum(router)
288
289 %description route-emails
290 The email routing feature is used to automatically associate a thread
291 of emails into an Eventum issue. By setting up Postfix
292 to deliver emails sent to a specific address (usually
293 issue-<number>@<domain>) to the above script, users are able to use
294 their email clients to reply to emails coming from Eventum, and those
295 replies will be automatically associated with the issue and
296 broadcasted to the entire notification list.
297
298 %description route-emails -l pl.UTF-8
299 Funkcjonalność przekazywania poczty służy do automatycznego wiązania
300 wątku listów ze sprawą w Eventum. Po ustawieniu czy nawet
301 Postfiksa, aby dostarczał listy wysyłane na pewien adres (zwykle
302 issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
303 używać klientów pocztowych do odpowiadania na listy przychodzące z
304 Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
305 rozprowadzane do całej listy ogłoszeniowej.
306
307 %package route-notes
308 Summary:        Eventum Note Routing
309 Summary(pl.UTF-8):      Przekazywanie notatek dla Eventum
310 Group:          Applications/WWW
311 Requires:       %{name} = %{version}-%{release}
312 Requires:       eventum(router)
313
314 %description route-notes
315 The note routing feature is used to automatically associate a thread
316 of notes into an Eventum issue. By setting up Postfix
317 to deliver emails sent to a specific address (usually
318 note-<number>@<domain>) to the above script, users are able to use
319 their email clients to reply to internal notes coming from Eventum,
320 and those replies will be automatically associated with the issue and
321 broadcasted to the notification list staff members.
322
323 %description route-notes -l pl.UTF-8
324 Funkcjonalność przekazywania notatek służy do automatycznego wiązania
325 wątku notatek ze sprawą w Eventum. Po ustawieniu
326 Postfiksa, aby dostarczał listy wysyłane na pewien adres (zwykle
327 note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
328 używać klientów pocztowych do odpowiadania na wewnętrzne notatki
329 pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
330 sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
331
332 %package router-postfix
333 Summary:        Eventum Mail Routing - Postfix
334 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - Postfix
335 Group:          Applications/Mail
336 Requires:       %{name} = %{version}-%{release}
337 Requires:       postfix
338 Provides:       eventum(router)
339 Obsoletes:      eventum(router)
340
341 %description router-postfix
342 This package provides way of routing notes and emails back to Eventum
343 via Postfix.
344
345 The Postfix configuration instructions you can find from
346 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
347
348 %description router-postfix -l pl.UTF-8
349 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
350 przez Postfiksa.
351
352 Opis konfiguracji Postfiksa można znaleźć pod adresem
353 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
354
355 %package irc
356 Summary:        Eventum IRC Notification Bot
357 Summary(pl.UTF-8):      IRC-owy bot powiadamiający dla Eventum
358 Group:          Applications/WWW
359 Requires(post,preun):   /sbin/chkconfig
360 Requires(triggerpostun):        sed >= 4.0
361 Requires:       %{name} = %{version}-%{release}
362 Requires:       php(sockets)
363 Requires:       php-pear-Net_SmartIRC
364 Requires:       rc-scripts >= 0.4.0.18
365
366 %description irc
367 The IRC notification bot is a nice feature for remote teams that want
368 to handle issues and want to have a quick and easy way to get simple
369 notifications. Right now the bot notifies of the following actions:
370 - New Issues
371 - Blocked emails
372 - Issues that got their assignment list changed
373
374 NOTE: You will need to manually edit the bot.php script to set your
375 appropriate preferences, like IRC server and channel that the bot
376 should join.
377
378 %description irc -l pl.UTF-8
379 IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
380 zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
381 uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
382 następujących zdarzeniach:
383 - nowych sprawach
384 - zablokowanych listach
385 - sprawach, dla których zmieniła się lista powiązań
386
387 UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
388 kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
389
390 %package cli
391 Summary:        Eventum command-line interface
392 Summary(pl.UTF-8):      Interfejs linii poleceń dla Eventum
393 Group:          Applications/WWW
394 Requires:       %{name}-base = %{version}-%{release}
395 Requires:       php-cli
396 Requires:       php-common >= 4:5.0
397 Requires:       php-pear-XML_RPC
398
399 %description cli
400 The Eventum command-line interface allows you to access most of the
401 features of the web interface straight from your command shell.
402
403 %description cli -l pl.UTF-8
404 Interfejs linii poleceń Eventum pozwala na dostęp do większości
405 funkcji interfejsu WWW prosto z linii poleceń powłoki.
406
407 %package scm
408 Summary:        Eventum SCM integration
409 Summary(pl.UTF-8):      Integracja SCM dla Eventum
410 Group:          Applications/WWW
411 Requires:       %{name}-base = %{version}-%{release}
412 Requires:       php-cli
413 Requires:       php-common >= 4:5.0
414 Requires:       php-pcre
415
416 %description scm
417 This feature allows your software development teams to integrate your
418 Source Control Management system with your Issue Tracking System.
419
420 The integration is implemented in such a way that it will be forward
421 compatible with pretty much any SCM system, such as CVS.
422
423 For installation see
424 </eventum/help.php?topic=scm_integration_installation>.
425
426 %description scm -l pl.UTF-8
427 Ten pakiet pozwala zespołom programistów na integrację systemu
428 zarządzania źródłami (SCM - Source Control Management) z systemem
429 śledzenia spraw.
430
431 Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
432 prawie każdym systemem SCM, jak np. CVS.
433
434 Szczegóły na temat instalacji można przeczytać pod
435 </eventum/help.php?topic=scm_integration_installation>.
436
437 %prep
438 %setup -q
439
440 rm -r upgrade/*v1.[123]* # too old to support in PLD Linux
441 rm -r upgrade/v{1.,2.0,2.1_}* # no longer supported in PLD Linux
442 rm upgrade/flush_compiled_templates.php
443 rm -r upgrade/{*/,}index.html # not needed in PLD Linux
444
445 # bug fixes / features
446 %patch0 -p1
447 %{?with_order:%patch2 -p1}
448
449 cp -a %{SOURCE16} images
450
451 #%patch200 -p1
452
453 # packaging
454 %patch100 -p1
455 %patch101 -p1
456 %patch105 -p1
457 %patch107 -p1
458
459 cat <<'EOF'> mysql-permissions.sql
460 # use this schema if you want to grant permissions manually instead of using setup
461 # this schema is extracted from setup/index.php.
462 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
463 EOF
464
465 %{__sed} -i -e "
466 s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
467 " upgrade/{*/,}*.php
468
469 # remove backups from patching as we use globs to package files to buildroot
470 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
471
472 %build
473 %{__make} -C localization
474
475 %install
476 rm -rf $RPM_BUILD_ROOT
477 install -d \
478         $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
479         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
480         $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
481         $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
482         $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
483         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
484
485 %{__make} install-eventum install-cli install-irc install-scm install-jpgraph install-localization \
486         sysconfdir=%{_webappdir} \
487         DESTDIR=$RPM_BUILD_ROOT
488
489 %{?with_order:cp -a htdocs/ajax $RPM_BUILD_ROOT%{_appdir}/htdocs}
490
491 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
492 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
493 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
494 cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
495
496 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
497 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
498 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
499 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
500
501 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
502
503 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
504 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
505
506 # postfix router
507 install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
508
509 install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
510
511 %find_lang %{name}
512
513 # scm
514 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
515
516 # old compat
517 ln -s %{_sbindir}/eventum-cvs-hook $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
518 ln -s %{_sbindir}/eventum-svn-hook $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
519
520 # skip pear for cli
521 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/cli
522 cp -a cli/lib/eventum $RPM_BUILD_ROOT%{_datadir}/%{name}/cli
523
524 %clean
525 rm -rf $RPM_BUILD_ROOT
526
527 %pre
528 %addusertogroup http %{name}
529
530 %post
531 # check if the package is configured.
532 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
533 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
534 %banner %{name} -e <<EOF
535
536 You haven't yet configured Eventum!
537 Please open in browser <http://localhost/eventum/>
538 If you need access from elsewhere, you need to edit
539 %{_webappdir}/apache.conf and restart apache.
540
541 IMPORTANT: When You have configured Eventum, please uninstall the
542 setup package, so that %{name}-setup is able to secure your Eventum
543 installation.
544
545 EOF
546 #' vim syntax hack
547 else
548 %banner %{name} -e <<EOF
549
550 You haven't yet configured Eventum!
551
552 To setup eventum, please install %{name}-setup and open in browser
553 <http://localhost/eventum/>.
554 If you need access from elsewhere, you need to edit
555 %{_webappdir}/*.conf depending on webserver and restart the webserver.
556
557 IMPORTANT: When You have configured Eventum, please uninstall the
558 setup package, so that %{name}-setup is able to secure your Eventum
559 installation.
560
561 EOF
562 #' vim syntax hack
563 fi
564
565 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
566 %banner %{name} -e <<EOF
567
568 You have default private key installed!
569
570 Install %{name}-setup and open up http://yourserver/eventum/setup/
571 -- that will help you setup initial config.
572
573 when have configured Eventum, please uninstall the setup package,
574 so that %{name}-setup is able to secure your Eventum installation.
575
576 EOF
577         elif [ -d %{_appdir}/setup ]; then
578 %banner %{name} -e <<EOF
579
580 If you have have configured Eventum, please uninstall the setup package,
581 so that %{name}-setup is able to secure your Eventum installation.
582
583 EOF
584 fi
585
586 # greate empty ghost files
587 for a in cli.log errors.log irc_bot.log login_attempts.log; do
588         if [ ! -f /var/log/%{name}/$a ]; then
589                 install -m620 -oroot -geventum /dev/null /var/log/%{name}/$a
590         fi
591 done
592
593 # database update
594 %{_appdir}/upgrade/update-database.php || :
595
596 # nuke Smarty templates cache after upgrade
597 rm -f /var/cache/eventum/*.php
598
599 %preun
600 if [ "$1" = "0" ]; then
601         # nuke cache
602         rm -f /var/cache/eventum/*.php 2>/dev/null || :
603 fi
604
605 %pre base
606 %groupadd -P %{name}-base -g 146 %{name}
607 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
608
609 %postun base
610 if [ "$1" = "0" ]; then
611         %userremove %{name}
612         %groupremove %{name}
613 fi
614
615 %post setup
616 chmod 660 %{_webappdir}/{config,private_key}.php
617 chown root:eventum %{_webappdir}/{config,private_key}.php
618
619 %postun setup
620 if [ "$1" = "0" ]; then
621         chmod 640 %{_webappdir}/{config,private_key}.php
622         chown root:eventum %{_webappdir}/{config,private_key}.php
623 fi
624
625 %post irc
626 /sbin/chkconfig --add eventum-irc
627 %service eventum-irc restart "Eventum IRC Bot"
628
629 %preun irc
630 if [ "$1" = 0 ]; then
631         %service eventum-irc stop
632         /sbin/chkconfig --del eventum-irc
633 fi
634
635 %triggerin -- apache1 < 1.3.37-3, apache1-base
636 %webapp_register apache %{_webapp}
637
638 %triggerun -- apache1 < 1.3.37-3, apache1-base
639 %webapp_unregister apache %{_webapp}
640
641 %triggerin -- apache < 2.2.0, apache-base
642 %webapp_register httpd %{_webapp}
643
644 %triggerun -- apache < 2.2.0, apache-base
645 %webapp_unregister httpd %{_webapp}
646
647 %triggerin -- lighttpd
648 %webapp_register lighttpd %{_webapp}
649
650 %triggerun -- lighttpd
651 %webapp_unregister lighttpd %{_webapp}
652
653 %files -f %{name}.lang
654 %defattr(644,root,root,755)
655 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
656 %doc docs/* htdocs/setup/schema.sql mysql-permissions.sql
657 %attr(751,root,root) %dir %{_webappdir}
658 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
659 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
660 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
661 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
662 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
663 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
664 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
665
666 %dir %attr(731,root,eventum) /var/log/%{name}
667 %attr(620,root,eventum) %ghost /var/log/%{name}/*
668 %dir %attr(750,root,root) /var/log/archive/%{name}
669 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
670
671 %{_appdir}/init.php
672 %dir %{_appdir}/htdocs
673 %{_appdir}/htdocs/*.php
674 %{_appdir}/htdocs/*.ico
675 %{_appdir}/htdocs/css
676 %{_appdir}/htdocs/customer
677 %{_appdir}/htdocs/images
678 %{_appdir}/htdocs/js
679 %{_appdir}/htdocs/manage
680 %{_appdir}/htdocs/reports
681 %{_appdir}/htdocs/rpc
682 %{_appdir}/htdocs/misc
683 %if %{with order}
684 %{_appdir}/htdocs/ajax
685 %endif
686 %{_appdir}/templates
687
688 %dir %{_appdir}/upgrade
689 %{_appdir}/upgrade/init.php
690 %attr(755,root,root) %{_appdir}/upgrade/update-database.php
691 %dir %{_appdir}/upgrade/v*
692 %attr(755,root,root) %{_appdir}/upgrade/v*/*.php
693 %{_appdir}/upgrade/patches
694
695 %dir %{_appdir}/lib
696 %{_appdir}/lib/eventum
697 %{_appdir}/lib/jpgraph
698 %exclude %{_appdir}/lib/eventum/class.monitor.php
699
700 %dir %attr(730,root,eventum) /var/run/%{name}
701 %dir %attr(730,root,eventum) /var/cache/%{name}
702
703 %files base
704 %defattr(644,root,root,755)
705 %attr(751,root,root) %dir %{_sysconfdir}
706 %dir %{_libdir}
707 %dir %{_appdir}
708 %attr(755,root,root) %dir /var/lib/%{name}
709 # saved mail copies
710 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
711 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
712 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
713
714 %files setup
715 %defattr(644,root,root,755)
716 %{_appdir}/htdocs/setup
717
718 %files mail-queue
719 %defattr(644,root,root,755)
720 %attr(755,root,root) %{_appdir}/process_mail_queue.php
721 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
722
723 %files mail-download
724 %defattr(644,root,root,755)
725 %attr(755,root,root) %{_appdir}/download_emails.php
726 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
727
728 %files reminder
729 %defattr(644,root,root,755)
730 %attr(755,root,root) %{_appdir}/check_reminders.php
731 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
732
733 %files monitor
734 %defattr(644,root,root,755)
735 %{_appdir}/lib/eventum/class.monitor.php
736 %attr(755,root,root) %{_appdir}/monitor.php
737 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
738
739 %files route-drafts
740 %defattr(644,root,root,755)
741 %attr(755,root,root) %{_appdir}/route_drafts.php
742
743 %files route-emails
744 %defattr(644,root,root,755)
745 %attr(755,root,root) %{_appdir}/route_emails.php
746
747 %files route-notes
748 %defattr(644,root,root,755)
749 %attr(755,root,root) %{_appdir}/route_notes.php
750
751 %files router-postfix
752 %defattr(644,root,root,755)
753 %attr(755,root,root) %{_libdir}/router-postfix
754
755 %files irc
756 %defattr(644,root,root,755)
757 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
758 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
759 %attr(755,root,root) %{_sbindir}/%{name}-irc-bot
760 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
761
762 %files cli
763 %defattr(644,root,root,755)
764 %doc cli/eventumrc
765 %attr(755,root,root) %{_bindir}/%{name}
766 %{_appdir}/cli
767
768 %files scm
769 %defattr(644,root,root,755)
770 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
771 %attr(755,root,root) %{_libdir}/process_cvs_commits
772 %attr(755,root,root) %{_libdir}/process_svn_commits
773 %attr(755,root,root) %{_sbindir}/eventum-cvs-hook
774 %attr(755,root,root) %{_sbindir}/eventum-svn-hook
This page took 1.250679 seconds and 3 git commands to generate.