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