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