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