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