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