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