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