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