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