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