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