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