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