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