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