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