]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- more
[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 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
9 #
10 # Conditional build:
11 %bcond_with     qmail   # build the router-qmail subpackage
12
13 #define _snap   20060921
14 %define _svn    20070215.3253
15 #define _rc             RC3
16 %define _rel    0.183
17
18 %include        /usr/lib/rpm/macros.php
19 Summary:        Eventum Issue / Bug tracking system
20 Summary(pl.UTF-8):      Eventum - system śledzenia spraw/błędów
21 Name:           eventum
22 Version:        2.0
23 Release:        %{?_rc:%{_rc}.}%{_rel}%{?_snap:.%{_snap}}%{?_svn:.%{_svn}}
24 License:        GPL
25 Group:          Applications/WWW
26 #Source0:       http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
27 Source0:        %{name}-%{_svn}.tar.bz2
28 # Source0-md5:  3afc86e7661b201f6966998e384b913c
29 Source1:        %{name}-apache.conf
30 Source2:        %{name}-mail-queue.cron
31 Source3:        %{name}-mail-download.cron
32 Source4:        %{name}-reminder.cron
33 Source5:        %{name}-monitor.cron
34 Source6:        %{name}-cvs.php
35 Source7:        %{name}-irc.php
36 Source8:        %{name}-irc.init
37 Source9:        %{name}-irc.sysconfig
38
39 Source11:       %{name}-router-qmail.sh
40
41 Source13:       %{name}-upgrade.sh
42 Source14:       %{name}-router-postfix.sh
43 Source15:       %{name}.logrotate
44 Source16:       %{name}-lighttpd.conf
45 Patch0:         %{name}-lf.patch
46
47 Patch2:         %{name}-timetracking-advanced-logic.patch
48 Patch3:         %{name}-email-notify-display.patch
49 Patch4:         %{name}-backtraces.patch
50 Patch5:         %{name}-errorhandler.patch
51 # packaging patches that probably never go upstream
52 Patch100:       %{name}-paths.patch
53 Patch101:       %{name}-cvs-config.patch
54 Patch102:       %{name}-irc-config.patch
55 Patch103:       %{name}-PEAR.patch
56 Patch104:       %{name}-httpclient-clientside.patch
57 Patch105:       %{name}-bot-reconnect.patch
58 Patch107:       %{name}-mem-limits.patch
59 Patch108:       %{name}-gettext.patch
60 # some tests
61 Patch200:       %{name}-fixed-nav.patch
62 URL:            http://dev.mysql.com/downloads/other/eventum/
63 BuildRequires:  gettext-devel
64 BuildRequires:  rpm-php-pearprov >= 4.0.2-98
65 BuildRequires:  rpmbuild(macros) >= 1.268
66 BuildRequires:  sed >= 4.0
67 Requires(triggerpostun):        /usr/bin/php
68 Requires(triggerpostun):        sed >= 4.0
69 Requires:       %{name}-base = %{version}-%{release}
70 Requires:       Smarty >= 2.6.10-4
71 Requires:       apache(mod_dir)
72 Requires:       php(gd)
73 Requires:       php(imap)
74 Requires:       php(mbstring)
75 Requires:       php(mysql)
76 Requires:       php(pcre)
77 Requires:       php(session)
78 Requires:       php-pear-DB
79 Requires:       php-pear-Date
80 Requires:       php-pear-HTTP_Request
81 Requires:       php-pear-Mail
82 Requires:       php-pear-Mail_Mime
83 Requires:       php-pear-Math_Stats
84 Requires:       php-pear-Net_DIME
85 Requires:       php-pear-Net_SMTP
86 Requires:       php-pear-Net_Socket
87 Requires:       php-pear-Net_URL
88 Requires:       php-pear-Net_UserAgent_Detect
89 Requires:       php-pear-PEAR-core
90 Requires:       php-pear-Text_Diff
91 Requires:       php-pear-XML_RPC
92 Requires:       smarty-gettext
93 Requires:       webapps
94 Requires:       webserver(access)
95 Requires:       webserver(alias)
96 Requires:       webserver(php) >= 4.2.0
97 BuildArch:      noarch
98 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99
100 %define         _noautoreq      'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Benchmark/.*)'
101
102 %define         _libdir         %{_prefix}/lib/%{name}
103 %define         _appdir         %{_datadir}/%{name}
104 %define         _smartyplugindir        %{_appdir}/include/smarty
105 %define         _smartydir      /usr/share/php/Smarty
106 %define         _webapps        /etc/webapps
107 %define         _webapp         %{name}
108 %define         _webappdir      %{_webapps}/%{_webapp}
109 %define         _sysconfdir     /etc/%{name}
110
111 %description
112 Eventum is a user-friendly and flexible issue tracking system that can
113 be used by a support department to track incoming technical support
114 requests, or by a software development team to quickly organize tasks
115 and bugs. Eventum is used by the MySQL AB Technical Support team, and
116 has allowed us to dramatically improve our response times.
117
118 %description -l pl.UTF-8
119 Eventum to przyjazny dla użytkownika system śledzenia spraw, który
120 może być używany przez dział obsługi do śledzenia przychodzących żądań
121 obsługi technicznej albo przez zespół tworzący oprogramowanie do
122 szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
123 Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
124 reakcji.
125
126 %package base
127 Summary:        Eventum base package
128 Summary(pl.UTF-8):      Podstawowy pakiet Eventum
129 Group:          Applications/WWW
130 Requires(postun):       /usr/sbin/groupdel
131 Requires(postun):       /usr/sbin/userdel
132 Requires(pre):  /bin/id
133 Requires(pre):  /usr/bin/getgid
134 Requires(pre):  /usr/sbin/groupadd
135 Requires(pre):  /usr/sbin/useradd
136 Provides:       group(eventum)
137 Provides:       user(eventum)
138
139 %description base
140 This package contains base directory structure for Eventum.
141
142 %description base -l pl.UTF-8
143 Ten pakiet zawiera podstawową strukturę katalogów dla Eventum.
144
145 %package setup
146 Summary:        Eventum setup package
147 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Eventum
148 Group:          Applications/WWW
149 Requires:       %{name} = %{version}-%{release}
150
151 %description setup
152 Install this package to configure initial Eventum installation. You
153 should uninstall this package when you're done, as it considered
154 insecure to keep the setup files in place.
155
156 %description setup -l pl.UTF-8
157 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
158 pierwszej instalacji. Potem należy go odinstalować, jako że
159 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
160
161 %package mail-queue
162 Summary:        Eventum mail queue process
163 Summary(pl.UTF-8):      Przetwarzanie kolejki poczty Eventum
164 Group:          Applications/WWW
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       crondaemon
167
168 %description mail-queue
169 Beginning with the first release of Eventum, emails are not directly
170 sent out from the various scripts, but rather added to a mail queue
171 table that is processed by a cron job. If an email cannot be sent, it
172 will be marked as such in the mail queue log, and the cron job script
173 will re-try to send it again the next time it runs.
174
175 This package contains the cron job.
176
177 %description mail-queue -l pl.UTF-8
178 Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
179 różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
180 Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
181 kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
182 następnym razem.
183
184 Ten pakiet zawiera zadanie dla crona.
185
186 %package mail-download
187 Summary:        Eventum email download
188 Summary(pl.UTF-8):      Ściąganie poczty Eventum
189 Group:          Applications/WWW
190 Requires:       %{name} = %{version}-%{release}
191 Requires:       crondaemon
192
193 %description mail-download
194 In order for Eventum's email integration feature to work, you need to
195 setup a cron job to run the script every so often.
196
197 This package contains the cron job.
198
199 %description mail-download -l pl.UTF-8
200 Aby integracja poczty elektronicznej w Eventum działała, trzeba
201 ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
202 często.
203
204 Ten pakiet zawiera zadanie dla crona.
205
206 %package reminder
207 Summary:        Eventum Reminder System
208 Summary(pl.UTF-8):      System przypominania dla Eventum
209 Group:          Applications/WWW
210 Requires:       %{name} = %{version}-%{release}
211 Requires:       crondaemon
212
213 %description reminder
214 The reminder system was designed with the objective as serving as a
215 safe net for issues that need attention. Depending on what
216 configuration you create, you may have several reminders (or alerts)
217 be sent out whenever an issue needs attention, for whatever parameter
218 you may deem necessary.
219
220 This package contains the cron job.
221
222 %description reminder -l pl.UTF-8
223 System przypominania został zaprojektowany tak, aby służył jako
224 bezpieczna sieć dla spraw wymagających uwagi. W zależności od
225 konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
226 przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
227 uważać za potrzebny.
228
229 Ten pakiet zawiera zadanie dla crona.
230
231 %package monitor
232 Summary:        Eventum Heartbeat Monitor
233 Summary(pl.UTF-8):      Monitor życia dla Eventum
234 Group:          Applications/WWW
235 Requires:       %{name} = %{version}-%{release}
236 Requires:       crondaemon
237 Requires:       php(posix)
238
239 %description monitor
240 The heartbeat monitor is a feature designed for the administrator that
241 wants to be alerted whenever a common problem in Eventum is detected,
242 like the database server not being available anymore, or maybe when
243 the recommended permissions for certain configuration files are
244 changed.
245
246 Please note that before running the heartbeat monitor, you may need to
247 customize some of the checks to be appropriate for your own system,
248 particularly the permission and file checks on
249 Monitor::checkConfiguration().
250
251 This package contains the cron job.
252
253 %description monitor -l pl.UTF-8
254 Monitor życia to funkcjonalność zaprojektowana dla administratora
255 chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
256 Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
257 do plików konfiguracyjnych.
258
259 Należy zauważyć, że przed uruchomieniem tego monitora może być
260 konieczne dostosowanie niektórych testów do systemu, w szczególności
261 testów uprawnień i plików w Monitor::checkConfiguration().
262
263 Ten pakiet zawiera zadanie dla crona.
264
265 %package route-drafts
266 Summary:        Eventum Draft Routing
267 Summary(pl.UTF-8):      Przekazywanie szkiców dla Eventum
268 Group:          Applications/WWW
269 Requires:       %{name} = %{version}-%{release}
270 Requires:       eventum(router)
271
272 %description route-drafts
273 The draft routing feature is used to automatically associate a thread
274 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
275 to deliver emails sent to a specific address (usually
276 draft-<number>@<domain>) to the above script, users are able to send
277 drafts written in their mail client to be stored in Eventum. These
278 drafts will NOT broadcasted to the notification list.
279
280 %description route-drafts -l pl.UTF-8
281 Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
282 problemem w Eventum. Ustawiając qmaila (czy nawet Postfiksa), aby
283 dostarczał pocztę wysłaną na podany adres (zwykle
284 draft-<liczba>@<domena>) do tego skryptu umożliwia się użytkownikom
285 wysyłanie szkiców napisanych w ich kliencie pocztowym do zapisania w
286 Eventum. Szkice te NIE będą wysyłane na listę powiadomień.
287
288 %package route-emails
289 Summary:        Eventum Email Routing
290 Summary(pl.UTF-8):      Przekazywanie poczty dla Eventum
291 Group:          Applications/WWW
292 Requires:       %{name} = %{version}-%{release}
293 Requires:       eventum(router)
294
295 %description route-emails
296 The email routing feature is used to automatically associate a thread
297 of emails into an Eventum issue. By setting up qmail (or even postfix)
298 to deliver emails sent to a specific address (usually
299 issue-<number>@<domain>) to the above script, users are able to use
300 their email clients to reply to emails coming from Eventum, and those
301 replies will be automatically associated with the issue and
302 broadcasted to the entire notification list.
303
304 %description route-emails -l pl.UTF-8
305 Funkcjonalność przekazywania poczty służy do automatycznego wiązania
306 wątku listów ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
307 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
308 issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
309 używać klientów pocztowych do odpowiadania na listy przychodzące z
310 Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
311 rozprowadzane do całej listy ogłoszeniowej.
312
313 %package route-notes
314 Summary:        Eventum Note Routing
315 Summary(pl.UTF-8):      Przekazywanie notatek dla Eventum
316 Group:          Applications/WWW
317 Requires:       %{name} = %{version}-%{release}
318 Requires:       eventum(router)
319
320 %description route-notes
321 The note routing feature is used to automatically associate a thread
322 of notes into an Eventum issue. By setting up qmail (or even postfix)
323 to deliver emails sent to a specific address (usually
324 note-<number>@<domain>) to the above script, users are able to use
325 their email clients to reply to internal notes coming from Eventum,
326 and those replies will be automatically associated with the issue and
327 broadcasted to the notification list staff members.
328
329 %description route-notes -l pl.UTF-8
330 Funkcjonalność przekazywania notatek służy do automatycznego wiązania
331 wątku notatek ze sprawą w Eventum. Po ustawieniu qmaila (czy nawet
332 postfiksa), aby dostarczał listy wysyłane na pewien adres (zwykle
333 note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
334 używać klientów pocztowych do odpowiadania na wewnętrzne notatki
335 pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
336 sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
337
338 %package router-qmail
339 Summary:        Eventum Mail Routing - qmail
340 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - qmail
341 Group:          Applications/Mail
342 # loose dep is intentional. qmail subpackage isn't built on PLD
343 # builders and there really nothing changes.
344 Requires:       %{name} >= %{version}-%{release}
345 Requires:       qmail >= 1.03
346 Provides:       eventum(router)
347 Obsoletes:      eventum(router)
348
349 %description router-qmail
350 This package provides way of routing notes and emails back to Eventum
351 via qmail.
352
353 %description router-qmail -l pl.UTF-8
354 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
355 przez qmaila.
356
357 %package router-postfix
358 Summary:        Eventum Mail Routing - Postfix
359 Summary(pl.UTF-8):      Przekazywanie poczty Eventum - Postfix
360 Group:          Applications/Mail
361 Requires:       %{name} = %{version}-%{release}
362 Requires:       postfix
363 Provides:       eventum(router)
364 Obsoletes:      eventum(router)
365
366 %description router-postfix
367 This package provides way of routing notes and emails back to Eventum
368 via Postfix.
369
370 The Postfix configuration instructions you can find from
371 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
372
373 %description router-postfix -l pl.UTF-8
374 Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
375 przez Postfiksa.
376
377 Opis konfiguracji Postfiksa można znaleźć pod adresem
378 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
379
380 %package irc
381 Summary:        Eventum IRC Notification Bot
382 Summary(pl.UTF-8):      IRC-owy bot powiadamiający dla Eventum
383 Group:          Applications/WWW
384 Requires(post,preun):   /sbin/chkconfig
385 Requires(triggerpostun):        sed >= 4.0
386 Requires:       %{name} = %{version}-%{release}
387 Requires:       php(sockets)
388 Requires:       php-pear-Net_SmartIRC
389 Requires:       rc-scripts >= 0.4.0.18
390
391 %description irc
392 The IRC notification bot is a nice feature for remote teams that want
393 to handle issues and want to have a quick and easy way to get simple
394 notifications. Right now the bot notifies of the following actions:
395 - New Issues
396 - Blocked emails
397 - Issues that got their assignment list changed
398
399 NOTE: You will need to manually edit the bot.php script to set your
400 appropriate preferences, like IRC server and channel that the bot
401 should join.
402
403 %description irc -l pl.UTF-8
404 IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
405 zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
406 uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
407 następujących zdarzeniach:
408 - nowych sprawach
409 - zablokowanych listach
410 - sprawach, dla których zmieniła się lista powiązań
411
412 UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
413 kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
414
415 %package cli
416 Summary:        Eventum command-line interface
417 Summary(pl.UTF-8):      Interfejs linii poleceń dla Eventum
418 Group:          Applications/WWW
419 Requires:       %{name}-base = %{version}-%{release}
420 Requires:       php-cli
421 Requires:       php-common >= 3:4.1.0
422 Requires:       php-pear-XML_RPC
423
424 %description cli
425 The Eventum command-line interface allows you to access most of the
426 features of the web interface straight from your command shell.
427
428 %description cli -l pl.UTF-8
429 Interfejs linii poleceń Eventum pozwala na dostęp do większości
430 funkcji interfejsu WWW prosto z linii poleceń powłoki.
431
432 %package scm
433 Summary:        Eventum SCM integration
434 Summary(pl.UTF-8):      Integracja SCM dla Eventum
435 Group:          Applications/WWW
436 Requires:       %{name}-base = %{version}-%{release}
437 Requires:       php(pcre)
438 Requires:       php-cli
439 Requires:       php-common >= 3:4.1.0
440
441 %description scm
442 This feature allows your software development teams to integrate your
443 Source Control Management system with your Issue Tracking System.
444
445 The integration is implemented in such a way that it will be forward
446 compatible with pretty much any SCM system, such as CVS.
447
448 For installation see
449 </eventum/help.php?topic=scm_integration_installation>.
450
451 %description scm -l pl.UTF-8
452 Ten pakiet pozwala zespołom programistów na integrację systemu
453 zarządzania źródłami (SCM - Source Control Management) z systemem
454 śledzenia spraw.
455
456 Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
457 prawie każdym systemem SCM, jak np. CVS.
458
459 Szczegóły na temat instalacji można przeczytać pod
460 </eventum/help.php?topic=scm_integration_installation>.
461
462 %prep
463 %setup -q %{?_snap:-n %{name}-%{_snap}}%{?_svn:-n %{name}}
464 # undos the source
465 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
466
467 rm benchmark.php
468 rm -r misc/upgrade/*v1.[123]* # too old to support in PLD Linux
469 rm misc/upgrade/flush_compiled_templates.php
470 rm -r misc/upgrade/*/upgrade_config.php # not needed in PLD Linux
471 rm -r misc/upgrade/*/index.html # not needed in PLD Linux
472
473 rm -r include/php-gettext
474 # sample, not used in eventum
475 rm rpc/xmlrpc_client.php
476
477 # bug fixes.
478 %patch0 -p1
479
480 %patch2 -p1
481 %patch3 -p1
482 %patch4 -p1
483 %patch5 -p1
484
485 #%patch200 -p1
486
487 # packaging
488 %patch100 -p1
489 %patch101 -p1
490 %patch102 -p1
491 %patch103 -p1
492 %patch104 -p1
493 %patch105 -p1
494 %patch107 -p1
495 %patch108 -p1
496
497 cat <<'EOF'> mysql-permissions.sql
498 # use this schema if you want to grant permissions manually instead of using setup
499 # this schema is extracted from setup/index.php.
500 GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
501 EOF
502
503 mv misc/localization/de{_DE,}
504 mv misc/localization/es{_ES,}
505 mv misc/localization/fi{_FI,}
506 mv misc/localization/fr{_FR,}
507 mv misc/localization/it{_IT,}
508 mv misc/localization/nl{_NL,}
509 mv misc/localization/ru{_RU,}
510 mv misc/localization/sv{_SE,}
511
512 # oops, the file got truncated - quick fix
513 cp misc/localization/eventum.po misc/localization/de/LC_MESSAGES/eventum.po
514 cp misc/localization/eventum.po misc/localization/es/LC_MESSAGES/eventum.po
515 cp misc/localization/eventum.po misc/localization/fi/LC_MESSAGES/eventum.po
516 cp misc/localization/eventum.po misc/localization/fr/LC_MESSAGES/eventum.po
517 cp misc/localization/eventum.po misc/localization/nl/LC_MESSAGES/eventum.po
518 cp misc/localization/eventum.po misc/localization/ru/LC_MESSAGES/eventum.po
519 cp misc/localization/eventum.po misc/localization/en_US/LC_MESSAGES/eventum.po
520
521 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
522 sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > process_cvs_commits
523 cat misc/scm/process_svn_commits.php > process_svn_commits
524 mv misc/cli/eventumrc_example eventumrc
525 sed -i -e '1i#!%{_bindir}/php' misc/*.php
526 chmod +x misc/*.php
527
528 # remove backups from patching as we use globs to package files to buildroot
529 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
530
531 %build
532 cd misc/localization
533 for a in */LC_MESSAGES; do
534         msgfmt -o $a/eventum.mo $a/eventum.po
535 done
536
537 %install
538 rm -rf $RPM_BUILD_ROOT
539 install -d \
540         $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
541         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
542         $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
543         $RPM_BUILD_ROOT/var/log/{archiv/,}%{name} \
544         $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
545         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
546
547 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
548 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
549 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
550 cp -a templates $RPM_BUILD_ROOT%{_appdir}
551 cp -a include/{customer,custom_field,jpgraph,workflow} $RPM_BUILD_ROOT%{_appdir}/include
552 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
553 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
554 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
555
556 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
557 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
558
559 # cli
560 install -d $RPM_BUILD_ROOT%{_appdir}/cli
561 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
562 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
563 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
564 install misc/irc/bot.php $RPM_BUILD_ROOT%{_sbindir}/%{name}-bot
565
566 # scm
567 install process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
568 install process_svn_commits $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
569 ln -s process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
570 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
571
572 # private key
573 echo '<?php
574 $private_key = "DEFAULTPRIVATEKEY";' > $RPM_BUILD_ROOT%{_webappdir}/private_key.php
575 touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
576
577 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
578 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
579 cp -a %{SOURCE16} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
580 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
581 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
582 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
583 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
584 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
585 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
586 cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
587
588
589 %{__sed} -i -e "/define('APP_VERSION'/ {
590     idefine('APP_VERSION', '%{version}%{?_snap:-%{_snap}}%{?_rc:-%{_rc}}%{?_svn:-%{_svn}}');
591     d
592
593 }" $RPM_BUILD_ROOT%{_appdir}/htdocs/init.php
594
595 # config
596 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
597 > $RPM_BUILD_ROOT%{_webappdir}/config.php
598
599 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
600 # These plugins are not in Smarty package (Smarty-2.6.2-3)
601 cp -a \
602         include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
603         include/Smarty/plugins/modifier.highlight_quoted.php \
604         $RPM_BUILD_ROOT%{_smartyplugindir}
605
606 # qmail router
607 %if %{with qmail}
608 d=$RPM_BUILD_ROOT/var/lib/%{name}
609 echo 'root' > $d/.qmail
610 echo 'root' > $d/.qmail-default
611 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
612 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
613 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
614 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
615 %endif
616 # postfix router
617 install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix
618
619 install -D %{SOURCE15} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
620 # locale
621 cd misc/localization
622 for a in */LC_MESSAGES; do
623         install -d $RPM_BUILD_ROOT%{_datadir}/locale/$a
624         cp -a $a/%{name}.mo $RPM_BUILD_ROOT%{_datadir}/locale/$a
625 done
626 cd -
627
628 %find_lang %{name}
629
630 %clean
631 rm -rf $RPM_BUILD_ROOT
632
633 %pre
634 %addusertogroup http %{name}
635
636 %post
637 # check if the package is configured.
638 if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
639 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
640 %banner %{name} -e <<EOF
641
642 You haven't yet configured Eventum!
643 Please open in browser <http://localhost/eventum/>
644 If you need access from elsewhere, you need to edit
645 %{_webappdir}/apache.conf and restart apache.
646
647 IMPORTANT: When You have configured Eventum, please uninstall the
648 setup package, so that %{name}-setup is able to secure your Eventum
649 installation.
650
651 EOF
652 #' vim syntax hack
653 else
654 %banner %{name} -e <<EOF
655
656 You haven't yet configured Eventum!
657
658 To setup eventum, please install %{name}-setup and open in browser
659 <http://localhost/eventum/>.
660 If you need access from elsewhere, you need to edit
661 %{_webappdir}/*.conf depending on webserver and restart the webserver.
662
663 IMPORTANT: When You have configured Eventum, please uninstall the
664 setup package, so that %{name}-setup is able to secure your Eventum
665 installation.
666
667 EOF
668 #' vim syntax hack
669 fi
670
671 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
672 %banner %{name} -e <<EOF
673
674 You have default private key installed!
675
676 Install %{name}-setup and open up http://yourserver/eventum/setup/
677 -- that will help you setup initial config.
678
679 when have configured Eventum, please uninstall the setup package,
680 so that %{name}-setup is able to secure your Eventum installation.
681
682 EOF
683         elif [ -d %{_appdir}/setup ]; then
684 %banner %{name} -e <<EOF
685
686 If you have have configured Eventum, please uninstall the setup package,
687 so that %{name}-setup is able to secure your Eventum installation.
688
689 EOF
690 fi
691
692 # nuke Smarty templates cache after upgrade
693 rm -f /var/cache/eventum/*.php
694
695 %preun
696 if [ "$1" = "0" ]; then
697         # nuke cache
698         rm -f /var/cache/eventum/*.php 2>/dev/null || :
699 fi
700
701 %pre base
702 %groupadd -P %{name}-base -g 146 %{name}
703 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
704
705 %postun base
706 if [ "$1" = "0" ]; then
707         %userremove %{name}
708         %groupremove %{name}
709 fi
710
711 %post router-qmail
712 CF=/etc/qmail/control/virtualdomains
713 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
714         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
715         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
716         umask 022
717         echo "#${FQDN}:%{name}" >> $CF
718
719 %banner %{name}-qmail -e <<EOF
720
721 Added "#${FQDN}:%{name}" to $CF,
722 Please verify that it is correct and restart qmail:
723 # service qmail reload
724
725 Consult qmail-send(8) for more information on virtualdomains.
726
727 EOF
728 fi
729
730 %preun router-qmail
731 if [ "$1" = "0" ]; then
732         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
733 fi
734
735 %post setup
736 chmod 660 %{_webappdir}/{config,private_key}.php
737 chown root:eventum %{_webappdir}/{config,private_key}.php
738
739 %postun setup
740 if [ "$1" = "0" ]; then
741         chmod 640 %{_webappdir}/{config,private_key}.php
742         chown root:eventum %{_webappdir}/{config,private_key}.php
743 fi
744
745 %post irc
746 /sbin/chkconfig --add eventum-irc
747 %service eventum-irc restart "Eventum IRC Bot"
748
749 %preun irc
750 if [ "$1" = 0 ]; then
751         %service eventum-irc stop
752         /sbin/chkconfig --del eventum-irc
753 fi
754
755 %triggerin -- apache1 < 1.3.37-3, apache1-base
756 %webapp_register apache %{_webapp}
757
758 %triggerun -- apache1 < 1.3.37-3, apache1-base
759 %webapp_unregister apache %{_webapp}
760
761 %triggerin -- apache < 2.2.0, apache-base
762 %webapp_register httpd %{_webapp}
763
764 %triggerun -- apache < 2.2.0, apache-base
765 %webapp_unregister httpd %{_webapp}
766
767 %triggerin -- lighttpd
768 %webapp_register lighttpd %{_webapp}
769
770 %triggerun -- lighttpd
771 %webapp_unregister lighttpd %{_webapp}
772
773 # FIXME
774 # only one upgrade trigger is called if you're upgrading over two
775 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
776 # use common trigger (the highest version and rpmvercmp from poldek?)
777 %triggerpostun -- eventum < 1.5.1-0.257
778 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
779 database_changes.php Perform database changes
780 EOF
781
782 %triggerpostun -- eventum < 1.5.2-0.289
783 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
784 database_changes.php Perform database changes
785 set_priority_ranks.php Fix the ranking of priority values
786 EOF
787
788 %triggerpostun -- eventum < 1.5.3-0.291
789 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
790 database_changes.php Perform database changes
791 EOF
792
793 %triggerpostun -- eventum < 1.5.4-1.12
794 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
795 database_changes.php Perform database changes
796 EOF
797
798 %triggerpostun -- eventum < 1.6.0-RC2.6
799 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
800 database_changes.php Perform database changes
801 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
802 EOF
803
804 %triggerpostun -- eventum < 1.6.1-0.2
805 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
806 database_changes.php Perform database changes
807 EOF
808
809 %triggerpostun -- eventum < 1.7.1-4.132.20061119.3143
810 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.7.1_to_v2.0 <<EOF
811 database_changes.php Perform database changes
812 EOF
813
814 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
815 sed -i -e '
816 s,\$irc_host,$irc_server_hostname,
817 s,\$irc_port,$irc_server_port,
818 s,\$irc_nick,$nickname,
819 s,\$irc_realname,$realname,
820 s,\$irc_username,$username,
821 s,\$irc_password,$password,
822 ' /etc/eventum/irc.php
823
824 %triggerpostun -- eventum < 1.7.0-2.0.48
825 # migrate from apache-config macros
826 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
827         if [ -d /etc/apache/webapps.d ]; then
828                 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
829                 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
830         fi
831
832         if [ -d /etc/httpd/webapps.d ]; then
833                 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
834                 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
835         fi
836 fi
837
838 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
839         /usr/sbin/webapp register apache %{_webapp}
840         rm -f /etc/apache/conf.d/99_%{_webapp}.conf
841         %service -q apache reload
842 fi
843 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
844         /usr/sbin/webapp register httpd %{_webapp}
845         rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
846         %service -q httpd reload
847 fi
848
849 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
850 database_changes.php Perform database changes
851 set_root_message_ids.php Set iss_root_message_id
852 EOF
853
854 # regular configs
855 for i in apache.conf config.php private_key.php setup.php; do
856         if [ -f /etc/eventum/$i.rpmsave ]; then
857                 mv -f %{_webappdir}/$i{,.rpmnew}
858                 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
859         fi
860 done
861
862 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
863 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
864         mv -f %{_sysconfdir}/cli.php{,.rpmnew}
865         mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
866 fi
867
868 %triggerpostun scm -- %{name}-scm < 1.7.1-2.70.20060724
869 if [ -f %{_sysconfdir}/cvs.php.rpmsave ]; then
870         mv -f %{_sysconfdir}/scm.php{,.rpmnew}
871         mv -f %{_sysconfdir}/cvs.php.rpmsave %{_sysconfdir}/scm.php
872 fi
873 ln -sf process_cvs_commits $RPM_BUILD_ROOT%{_libdir}/scm
874
875 %triggerpostun -- %{name} < 1.7.1-5.165
876 %{__sed} -i -e '
877         /define.*APP_URL/d
878 ' %{_webappdir}/config.php
879
880 %triggerpostun irc -- %{name}-irc < 1.7.1-5.181
881 # change from 1.7.0-3.4
882 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
883         mv -f %{_webappdir}/irc_config.php{,.rpmnew}
884         mv -f %{_webappdir}/irc.php.rpmsave %{_webappdir}/irc_config.php
885 fi
886
887 # change from 1.7.1-5.181
888 if [ -f %{_sysconfdir}/irc.php.rpmsave ]; then
889         mv -f %{_webappdir}/irc_config.php{,.rpmnew}
890         mv -f %{_sysconfdir}/irc.php.rpmsave %{_webappdir}/irc_config.php
891 fi
892
893 %files -f %{name}.lang
894 %defattr(644,root,root,755)
895 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
896 %doc docs/* setup/schema.sql mysql-permissions.sql
897 %attr(751,root,root) %dir %{_webappdir}
898 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
899 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
900 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
901 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
902 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
903 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
904 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
905
906 %dir %attr(731,root,eventum) /var/log/%{name}
907 %attr(620,root,eventum) %ghost /var/log/%{name}/*
908 %dir %attr(750,root,root) /var/log/archiv/%{name}
909 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
910
911 %dir %{_appdir}/htdocs
912 %{_appdir}/htdocs/*.php
913 %{_appdir}/htdocs/*.ico
914 %{_appdir}/htdocs/css
915 %{_appdir}/htdocs/customer
916 %{_appdir}/htdocs/images
917 %{_appdir}/htdocs/js
918 %{_appdir}/htdocs/manage
919 %{_appdir}/htdocs/reports
920 %{_appdir}/htdocs/rpc
921 %{_appdir}/htdocs/misc
922 %{_appdir}/templates
923 %dir %{_appdir}/upgrade
924 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
925 %{_appdir}/upgrade/[!u]*
926 %{_smartyplugindir}
927
928 %dir %{_appdir}/include
929 %{_appdir}/include/customer
930 %{_appdir}/include/custom_field
931 %{_appdir}/include/jpgraph
932 %{_appdir}/include/workflow
933 %{_appdir}/include/class.[!m]*.php
934 %{_appdir}/include/class.mail.php
935 %{_appdir}/include/class.mail_queue.php
936 %{_appdir}/include/class.mime_helper.php
937 %{_appdir}/include/class.misc.php
938 %{_appdir}/include/db_access.php
939
940 %dir %attr(730,root,eventum) /var/run/%{name}
941 %dir %attr(730,root,eventum) /var/cache/%{name}
942
943 %files base
944 %defattr(644,root,root,755)
945 %attr(751,root,root) %dir %{_sysconfdir}
946 %dir %{_libdir}
947 %dir %{_appdir}
948 # qmail will ignore user, if it's home directory is not owned
949 %attr(750,eventum,eventum) %dir /var/lib/%{name}
950 # saved mail copies
951 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
952 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
953 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
954
955 %files setup
956 %defattr(644,root,root,755)
957 %{_appdir}/htdocs/setup
958
959 %files mail-queue
960 %defattr(644,root,root,755)
961 %attr(755,root,root) %{_appdir}/process_mail_queue.php
962 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
963
964 %files mail-download
965 %defattr(644,root,root,755)
966 %attr(755,root,root) %{_appdir}/download_emails.php
967 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
968
969 %files reminder
970 %defattr(644,root,root,755)
971 %attr(755,root,root) %{_appdir}/check_reminders.php
972 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
973
974 %files monitor
975 %defattr(644,root,root,755)
976 %{_appdir}/include/class.monitor.php
977 %attr(755,root,root) %{_appdir}/monitor.php
978 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
979
980 %files route-drafts
981 %defattr(644,root,root,755)
982 %attr(755,root,root) %{_appdir}/route_drafts.php
983
984 %files route-emails
985 %defattr(644,root,root,755)
986 %attr(755,root,root) %{_appdir}/route_emails.php
987
988 %files route-notes
989 %defattr(644,root,root,755)
990 %attr(755,root,root) %{_appdir}/route_notes.php
991
992 %if %{with qmail}
993 %files router-qmail
994 %defattr(644,root,root,755)
995 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
996 %attr(755,root,root) %{_libdir}/router-qmail
997 %endif
998
999 %files router-postfix
1000 %defattr(644,root,root,755)
1001 %attr(755,root,root) %{_libdir}/router-postfix
1002
1003 %files irc
1004 %defattr(644,root,root,755)
1005 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
1006 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
1007 %attr(755,root,root) %{_sbindir}/%{name}-bot
1008 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
1009
1010 %files cli
1011 %defattr(644,root,root,755)
1012 %doc eventumrc
1013 %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
1014 %attr(755,root,root) %{_bindir}/%{name}
1015 %{_appdir}/cli
1016
1017 %files scm
1018 %defattr(644,root,root,755)
1019 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
1020 %attr(755,root,root) %{_libdir}/process_cvs_commits
1021 %attr(755,root,root) %{_libdir}/process_svn_commits
1022 # legacy
1023 %ghost %{_libdir}/scm
This page took 0.143696 seconds and 3 git commands to generate.