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