]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- fix missing DST TZ for baltic states
[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 # - need start-stop-daemon (from dpkg for now)
11 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
12 # before STBR:
13 # - put useradd/groupadd macros into PLD rpm
14
15 %bcond_with     pear    # build with system PEAR packages (or use bundled ones)
16
17 %define uid     146
18 %define gid     146
19
20 # snapshot: DATE
21 #define _snap 20050227
22
23 %if 0%{?_snap}
24 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
25 %else
26 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
27 %endif
28
29 %define _rel 282
30
31 Summary:        Eventum Issue / Bug tracking system
32 Summary(pl):    Eventum - system ¶ledzenia spraw/b³êdów
33 Name:           eventum
34 Version:        1.5.1
35 Release:        0.%{?_snap:%{_snap}.}%{_rel}
36 License:        GPL
37 Group:          Applications/WWW
38 Source0:        %{_source}
39 # Source0-md5:  d326ef39b52001efcbbc0ae8db5454a5
40 Source1:        %{name}-apache.conf
41 Source2:        %{name}-mail-queue.cron
42 Source3:        %{name}-mail-download.cron
43 Source4:        %{name}-reminder.cron
44 Source5:        %{name}-monitor.cron
45 Source6:        %{name}-cvs.php
46 Source7:        %{name}-irc.php
47 Source8:        %{name}-irc.init
48 Source9:        %{name}-irc.sysconfig
49 Source10:       %{name}-config.php
50 Source11:       %{name}-router-qmail.sh
51 Source12:       http://dev.mysql.com/common/favicon.ico
52 # Source12-md5: 858be0130832da4144c08d4b59116411
53 Patch0:         %{name}-paths.patch
54 Patch1:         %{name}-cvs-config.patch
55 Patch2:         %{name}-irc-config.patch
56 Patch3:         %{name}-PEAR.patch
57 Patch4:         %{name}-db-20050227.patch
58 Patch10:        %{name}-charset-recent-activity.patch
59 Patch11:        http://glen.alkohol.ee/pld/%{name}-cli-rpc-base64.patch
60 Patch12:        http://glen.alkohol.ee/pld/%{name}-send-height.patch
61 Patch13:        http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
62 Patch14:        http://glen.alkohol.ee/pld/%{name}-rss-updates.patch
63 Patch15:        http://glen.alkohol.ee/pld/%{name}-opera.patch
64 Patch16:        %{name}-lf.patch
65 Patch17:        %{name}-iss-ass-fix.patch
66 Patch18:        %{name}-iss-close.patch
67 Patch19:        http://glen.alkohol.ee/pld/%{name}-attach-activate-links.patch
68 Patch20:        %{name}-irc-memlimit.patch
69 Patch21:        http://glen.alkohol.ee/pld/eventum-link-tilde2.patch
70 Patch22:        http://glen.alkohol.ee/pld/eventum-reply-timestamp.patch
71 Patch23:        http://glen.alkohol.ee/pld/eventum-lf-checkins.patch
72 Patch24:        eventum-strip-bcc.patch
73 Patch25:        php-pear-Date-tz-baltic-hasdst.patch
74 URL:            http://dev.mysql.com/downloads/other/eventum/
75 BuildRequires:  rpmbuild(macros) >= 1.177
76 BuildRequires:  sed >= 4.0
77 Requires:       php >= 4.2.0
78 Requires:       php-gd
79 Requires:       php-imap
80 Requires:       php-mysql
81 Requires:       php-pcre
82 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
83 Requires:       Smarty >= 2.6.2
84 %if %{with pear}
85 Requires:       php-pear-Benchmark
86 Requires:       php-pear-DB
87 Requires:       php-pear-Date
88 Requires:       php-pear-HTTP_Request
89 Requires:       php-pear-Mail
90 Requires:       php-pear-Math_Stats
91 Requires:       php-pear-Net_DIME
92 Requires:       php-pear-Net_POP3
93 Requires:       php-pear-Net_SMTP
94 Requires:       php-pear-Net_SmartIRC
95 Requires:       php-pear-Net_Socket
96 Requires:       php-pear-Net_URL
97 Requires:       php-pear-Net_UserAgent_Detect
98 Requires:       php-pear-PEAR
99 Requires:       php-pear-Text_Diff
100 Requires:       php-pear-XML_RPC
101 %endif
102 Requires:       apache >= 1.3.33-2
103 Requires:       apache(mod_dir)
104 Requires(triggerpostun):        sed >= 4.0
105 BuildArch:      noarch
106 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
107
108 %define         _sysconfdir     /etc/%{name}
109 %define         _libdir         %{_prefix}/%{_lib}/%{name}
110 %define         _appdir %{_datadir}/%{name}
111 %define         _smartyplugindir        %{php_pear_dir}/Smarty/plugins
112
113 %define         _apache1dir     /etc/apache
114 %define         _apache2dir     /etc/httpd
115
116 %description
117 Eventum is a user-friendly and flexible issue tracking system that can
118 be used by a support department to track incoming technical support
119 requests, or by a software development team to quickly organize tasks
120 and bugs. Eventum is used by the MySQL AB Technical Support team, and
121 has allowed us to dramatically improve our response times.
122
123 %description -l pl
124 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
125 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
126 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
127 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
128 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
129 reakcji.
130
131 %package base
132 Summary:        Eventum base package
133 Summary(pl):    Podstawowy pakiet Eventum
134 Group:          Applications/WWW
135 Requires(pre):  /bin/id
136 Requires(pre):  /usr/bin/getgid
137 Requires(pre):  /usr/sbin/useradd
138 Requires(pre):  /usr/sbin/groupadd
139 Provides:       user(eventum)
140 Provides:       group(eventum)
141
142 %description base
143 This package contains base directory structure for Eventum.
144
145 %description base -l pl
146 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
147
148 %package setup
149 Summary:        Eventum setup package
150 Summary(pl):    Pakiet do wstêpnej konfiguracji Eventum
151 Group:          Applications/WWW
152 PreReq:         %{name} = %{epoch}:%{version}-%{release}
153
154 %description setup
155 Install this package to configure initial Eventum installation. You
156 should uninstall this package when you're done, as it considered
157 insecure to keep the setup files in place.
158
159 %description setup -l pl
160 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
161 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
162 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
163
164 %package mail-queue
165 Summary:        Eventum mail queue process
166 Summary(pl):    Przetwarzanie kolejki poczty Eventum
167 Group:          Applications/WWW
168 Requires:       %{name} = %{epoch}:%{version}-%{release}
169 Requires:       crondaemon
170 Requires:       php >= 4.1.0
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 Requires:       php >= 4.1.0
197
198 %description mail-download
199 In order for Eventum's email integration feature to work, you need to
200 setup a cron job to run the script every so often.
201
202 This package contains the cron job.
203
204 %description mail-download -l pl
205 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
206 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
207 czêsto.
208
209 Ten pakiet zawiera zadanie dla crona.
210
211 %package reminder
212 Summary:        Eventum Reminder System
213 Summary(pl):    System przypominania dla Eventum
214 Group:          Applications/WWW
215 Requires:       %{name} = %{epoch}:%{version}-%{release}
216 Requires:       php >= 4.1.0
217 Requires:       crondaemon
218
219 %description reminder
220 The reminder system was designed with the objective as serving as a
221 safe net for issues that need attention. Depending on what
222 configuration you create, you may have several reminders (or alerts)
223 be sent out whenever an issue needs attention, for whatever parameter
224 you may deem necessary.
225
226 This package contains the cron job.
227
228 %description reminder -l pl
229 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
230 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
231 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
232 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
233 uwa¿aæ za potrzebny.
234
235 Ten pakiet zawiera zadanie dla crona.
236
237 %package monitor
238 Summary:        Eventum Heartbeat Monitor
239 Summary(pl):    Monitor ¿ycia dla Eventum
240 Group:          Applications/WWW
241 Requires:       %{name} = %{epoch}:%{version}-%{release}
242 Requires:       php >= 4.1.0
243 Requires:       php-posix
244 Requires:       crondaemon
245
246 %description monitor
247 The heartbeat monitor is a feature designed for the administrator that
248 wants to be alerted whenever a common problem in Eventum is detected,
249 like the database server not being available anymore, or maybe when
250 the recommended permissions for certain configuration files are
251 changed.
252
253 Please note that before running the heartbeat monitor, you may need to
254 customize some of the checks to be appropriate for your own system,
255 particularly the permission and file checks on
256 Monitor::checkConfiguration().
257
258 This package contains the cron job.
259
260 %description monitor -l pl
261 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
262 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
263 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
264 do plików konfiguracyjnych.
265
266 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
267 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
268 testów uprawnieñ i plików w Monitor::checkConfiguration().
269
270 Ten pakiet zawiera zadanie dla crona.
271
272 %package route-emails
273 Summary:        Eventum Email Routing
274 Summary(pl):    Przekazywanie poczty dla Eventum
275 Group:          Applications/WWW
276 Requires:       %{name} = %{epoch}:%{version}-%{release}
277 Requires:       php >= 4.1.0
278 Requires:       eventum(router)
279
280 %description route-emails
281 The email routing feature is used to automatically associate a thread
282 of emails into an Eventum issue. By setting up qmail (or even postfix)
283 to deliver emails sent to a specific address (usually
284 issue-<number>@<domain>) to the above script, users are able to use
285 their email clients to reply to emails coming from Eventum, and those
286 replies will be automatically associated with the issue and
287 broadcasted to the entire notification list.
288
289 %description route-emails -l pl
290 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
291 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
292 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
293 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
294 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
295 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
296 rozprowadzane do ca³ej listy og³oszeniowej.
297
298 %package route-notes
299 Summary:        Eventum Note Routing
300 Summary(pl):    Przekazywanie notatek dla Eventum
301 Group:          Applications/WWW
302 Requires:       %{name} = %{epoch}:%{version}-%{release}
303 Requires:       php >= 4.1.0
304 Requires:       eventum(router)
305
306 %description route-notes
307 The note routing feature is used to automatically associate a thread
308 of notes into an Eventum issue. By setting up qmail (or even postfix)
309 to deliver emails sent to a specific address (usually
310 note-<number>@<domain>) to the above script, users are able to use
311 their email clients to reply to internal notes coming from Eventum,
312 and those replies will be automatically associated with the issue and
313 broadcasted to the notification list staff members.
314
315 %description route-notes -l pl
316 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
317 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
318 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
319 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
320 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
321 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
322 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
323
324 %package router-qmail
325 Summary:        Eventum Mail Routing - qmail
326 Summary(pl):    Przekazywanie poczty Eventum - qmail
327 Group:          Applications/Mail
328 Requires:       %{name} = %{epoch}:%{version}-%{release}
329 Requires:       qmail >= 1.03
330 Provides:       eventum(router)
331 Obsoletes:      eventum(router)
332
333 %description router-qmail
334 This package provides way of routing notes and emails back to Eventum
335 via qmail.
336
337 %description router-qmail -l pl
338 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
339 przez qmaila.
340
341 %package router-postfix
342 Summary:        Eventum Mail Routing - Postfix
343 Summary(pl):    Przekazywanie poczty Eventum - Postfix
344 Group:          Applications/Mail
345 Requires:       %{name} = %{epoch}:%{version}-%{release}
346 Requires:       postfix
347 Provides:       eventum(router)
348 Obsoletes:      eventum(router)
349
350 %description router-postfix
351 This package provides way of routing notes and emails back to Eventum
352 via Postfix.
353
354 %description router-postfix -l pl
355 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
356 przez Postfiksa.
357
358 %package irc
359 Summary:        Eventum IRC Notification Bot
360 Summary(pl):    IRC-owy bot powiadamiaj±cy dla Eventum
361 Group:          Applications/WWW
362 Requires:       %{name} = %{epoch}:%{version}-%{release}
363 Requires:       php >= 4.1.0
364 Requires:       php-sockets
365 Requires:       rc-scripts >= 0.4.0.18
366
367 %description irc
368 The IRC notification bot is a nice feature for remote teams that want
369 to handle issues and want to have a quick and easy way to get simple
370 notifications. Right now the bot notifies of the following actions:
371 - New Issues
372 - Blocked emails
373 - Issues that got their assignment list changed
374
375 NOTE: You will need to manually edit the bot.php script to set your
376 appropriate preferences, like IRC server and channel that the bot
377 should join.
378
379 %description irc -l pl
380 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
381 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
382 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
383 nastêpuj±cych zdarzeniach:
384 - nowych sprawach
385 - zablokowanych listach
386 - sprawach, dla których zmieni³a siê lista powi±zañ
387
388 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
389 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
390
391 %package cli
392 Summary:        Eventum command-line interface
393 Summary(pl):    Interfejs linii poleceñ dla Eventum
394 Group:          Applications/WWW
395 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
396 Requires:       php >= 4.1.0
397 Requires:       php-cli
398 Requires:       php-curl
399 Requires:       php-xml
400 Requires:       php-pear-XML_RPC
401
402 %description cli
403 The Eventum command-line interface allows you to access most of the
404 features of the web interface straight from your command shell.
405
406 %description cli -l pl
407 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
408 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
409
410 %package scm
411 Summary:        Eventum SCM integration
412 Summary(pl):    Integracja SCM dla Eventum
413 Group:          Applications/WWW
414 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
415 Requires:       php >= 4.1.0
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,
442 $,,'
443
444 # packaging
445 %patch0 -p1 -b .paths
446 %patch1 -p1
447 %patch2 -p1
448 %{?with_pear:%patch3 -p1 -b .PEAR}
449 %patch4 -p1
450
451 # bug fixes.
452 %patch10 -p1
453 %patch11 -p1
454 %patch12 -p0
455 %patch13 -p1
456 %patch14 -p1
457 %patch15 -p1
458 %patch16 -p1
459 %patch17 -p1
460 %patch18 -p1
461 %patch19 -p1
462 %patch20 -p1
463 %patch21 -p1
464 %patch22 -p1
465 %patch23 -p1
466 %patch24 -p1
467
468 # replace in remaining scripts config.inc.php to system one
469 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
470         s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
471 '
472 sed -i -e '
473         s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
474 ' misc/download_emails.php
475
476 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
477         s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
478 '
479
480 # reuse pear patch
481 cd include/pear
482 %patch25 -p1
483
484 rm -f */*~ */*/*~
485
486 %install
487 rm -rf $RPM_BUILD_ROOT
488 install -d \
489         $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
490         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
491         $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
492         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
493
494 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
495 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
496 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
497 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
498 cp -a templates $RPM_BUILD_ROOT%{_appdir}
499 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
500 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
501 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
502 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
503
504 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
505
506 # cli
507 install -d $RPM_BUILD_ROOT%{_appdir}/cli
508 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
509 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
510 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
511         misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
512 cp -f misc/cli/eventumrc_example eventumrc
513
514 # scm
515 echo '#!%{_bindir}/php4 -q' > %{name}-scm
516 cat misc/scm/process_cvs_commits.php >> %{name}-scm
517 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
518
519 # private key
520 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
521 # change private key, so we can easily grep
522 sed -i -e '
523 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
524 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
525
526 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
527 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
528 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
529 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
530 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
531 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
532 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
533 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
534 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
535 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
536         %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
537
538 # config
539 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
540 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
541
542 # sample, not used in eventum
543 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
544
545 %if %{with pear}
546 # provided by PEAR
547 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
548 %endif
549
550 # use system Smarty
551 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
552 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
553 # These plugins are not in Smarty package (Smarty-2.6.2-3)
554 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
555         $RPM_BUILD_ROOT%{_smartyplugindir}
556
557 # qmail router
558 d=$RPM_BUILD_ROOT/var/lib/%{name}
559 echo 'root' > $d/.qmail
560 echo 'root' > $d/.qmail-default
561 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
562 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
563 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
564 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
565
566 %clean
567 rm -rf $RPM_BUILD_ROOT
568
569 %pre
570 %addusertogroup http %{name}
571
572 %post
573 # apache1
574 if [ -d %{_apache1dir}/conf.d ]; then
575         ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
576         if [ -f /var/lock/subsys/apache ]; then
577                 /etc/rc.d/init.d/apache restart 1>&2
578         fi
579 fi
580 # apache2
581 if [ -d %{_apache2dir}/httpd.conf ]; then
582         ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
583         if [ -f /var/lock/subsys/httpd ]; then
584                 /etc/rc.d/init.d/httpd restart 1>&2
585         fi
586 fi
587
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         # apache1
649         if [ -f %{_apache1dir}/apache.conf ]; then
650                 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
651                 if [ -f /var/lock/subsys/apache ]; then
652                         /etc/rc.d/init.d/apache restart 1>&2
653                 fi
654         fi
655         # apache2
656         if [ -d %{_apache2dir}/httpd.conf ]; then
657                 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
658                 if [ -f /var/lock/subsys/httpd ]; then
659                         /etc/rc.d/init.d/httpd restart 1>&2
660                 fi
661         fi
662
663         # nuke cache
664         rm -f /var/cache/eventum/*.php 2>/dev/null || :
665 fi
666
667 %pre base
668 %groupadd -P %{name}-base -g %{gid} %{name}
669 %useradd -P %{name}-base -u %{uid} -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
670
671 %postun base
672 if [ "$1" = "0" ]; then
673         %userremove %{name}
674         %groupremove %{name}
675 fi
676
677 %post router-qmail
678 CF=/etc/qmail/control/virtualdomains
679 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
680         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
681         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
682         umask 022
683         echo "#${FQDN}:%{name}" >> $CF
684
685 %banner %{name}-qmail -e <<EOF
686
687 Added "#${FQDN}:%{name}" to $CF,
688 Please verify that it is correct and restart qmail:
689 # service qmail reload
690
691 Consult qmail-send(8) for more information on virtualdomains.
692
693 EOF
694 fi
695
696 %preun router-qmail
697 if [ "$1" = "0" ]; then
698         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
699 fi
700
701 %post setup
702 chmod 660 %{_sysconfdir}/{config,private_key}.php
703 chown root:eventum %{_sysconfdir}/{config,private_key}.php
704
705 %postun setup
706 if [ "$1" = "0" ]; then
707         chmod 640 %{_sysconfdir}/{config,private_key}.php
708         chown root:eventum %{_sysconfdir}/{config,private_key}.php
709 fi
710
711 %triggerpostun base -- eventum-base < 1.4-2.20050222.212
712 if [ "`getent passwd %{name} | cut -d: -f6`" = "%{_appdir}" ]; then
713         /usr/sbin/usermod -d /var/lib/%{name} %{name}
714 fi
715
716 %triggerpostun -- eventum < 1.5-0.240
717 scriptdir=%{_appdir}/upgrade/v1.4_to_1.5
718 %banner %{name}-trigger-1.5 -e <<-EOF
719
720         Running eventum upgrade scripts to 1.5 in $scriptdir
721         These will fail if your eventum user doesn't have ALTER privilege to database.
722
723 EOF
724 #'
725
726 /usr/bin/php4 -q $scriptdir/database_changes.php || {
727         echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
728 }
729
730 %triggerpostun -- eventum < 1.5.1-0.257
731 scriptdir=%{_appdir}/upgrade/v1.5_to_v1.5.1
732 %banner %{name}-trigger-1.5.1 -e <<-EOF
733
734         Running eventum upgrade scripts to 1.5.1 in $scriptdir
735         These will fail if your eventum user doesn't have ALTER privilege to database.
736
737 EOF
738 #'
739
740 /usr/bin/php4 -q $scriptdir/database_changes.php || {
741         echo >&2 "Please run manually: /usr/bin/php4 -q $scriptdir/database_changes.php"
742 }
743
744 %files
745 %defattr(644,root,root,755)
746 %doc ChangeLog FAQ INSTALL README UPGRADE
747 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
748 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
749 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
750 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
751 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
752 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
753
754 %dir %attr(731,root,eventum) /var/log/%{name}
755 %attr(620,root,eventum) %ghost /var/log/%{name}/*
756
757 %dir %{_appdir}/htdocs
758 %{_appdir}/htdocs/*.php
759 %{_appdir}/htdocs/*.ico
760 %{_appdir}/htdocs/css
761 %{_appdir}/htdocs/customer
762 %{_appdir}/htdocs/images
763 %{_appdir}/htdocs/js
764 %{_appdir}/htdocs/manage
765 %{_appdir}/htdocs/reports
766 %{_appdir}/htdocs/rpc
767 %{_appdir}/htdocs/misc
768
769 %{_appdir}/templates
770 %{_appdir}/upgrade
771
772 %{_smartyplugindir}/*
773 %if %{without pear}
774 %{_appdir}/include/pear
775 %endif
776
777 %dir %{_appdir}/include
778 %{_appdir}/include/customer
779 %{_appdir}/include/jpgraph
780 %{_appdir}/include/workflow
781 %{_appdir}/include/class.[!m]*.php
782 %{_appdir}/include/class.mail.php
783 %{_appdir}/include/class.mail_queue.php
784 %{_appdir}/include/class.mime_helper.php
785 %{_appdir}/include/class.misc.php
786 %{_appdir}/include/db_access.php
787 %{_appdir}/include/jsrsServer.inc.php
788
789 %dir %attr(730,root,eventum) /var/run/%{name}
790 %dir %attr(730,root,eventum) /var/cache/%{name}
791
792 %files base
793 %defattr(644,root,root,755)
794 %attr(751,root,root) %dir %{_sysconfdir}
795 %dir %{_libdir}
796 %dir %{_appdir}
797 # qmail will ignore user, if it's home directory is not owned
798 %attr(750,eventum,eventum) %dir /var/lib/%{name}
799
800 %files setup
801 %defattr(644,root,root,755)
802 %{_appdir}/htdocs/setup
803
804 %files mail-queue
805 %defattr(644,root,root,755)
806 %{_appdir}/process_mail_queue.php
807 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
808
809 %files mail-download
810 %defattr(644,root,root,755)
811 %{_appdir}/download_emails.php
812 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
813
814 %files reminder
815 %defattr(644,root,root,755)
816 %{_appdir}/check_reminders.php
817 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
818
819 %files monitor
820 %defattr(644,root,root,755)
821 %{_appdir}/include/class.monitor.php
822 %{_appdir}/monitor.php
823 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
824
825 %files route-emails
826 %defattr(644,root,root,755)
827 %{_appdir}/route_emails.php
828
829 %files route-notes
830 %defattr(644,root,root,755)
831 %{_appdir}/route_drafts.php
832 %{_appdir}/route_notes.php
833
834 %files router-qmail
835 %defattr(644,root,root,755)
836 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
837 %attr(755,root,root) %{_libdir}/router-qmail
838
839 %files router-postfix
840 %defattr(644,root,root,755)
841
842 %files irc
843 %defattr(644,root,root,755)
844 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
845 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
846 %{_appdir}/irc
847 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
848
849 %files cli
850 %defattr(644,root,root,755)
851 %doc eventumrc
852 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
853 %attr(755,root,root) %{_bindir}/%{name}
854 %{_appdir}/cli
855
856 %files scm
857 %defattr(644,root,root,755)
858 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
859 %attr(755,root,root) %{_libdir}/scm
This page took 0.094397 seconds and 4 git commands to generate.