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