]> git.pld-linux.org Git - packages/eventum.git/blame - eventum.spec
- update to 2.2-dev-r3890
[packages/eventum.git] / eventum.spec
CommitLineData
bb01d732
ER
1# TODO
2# - discard bundled packages (from INSTALL):
3# - JpGraph 1.5.3 (last GPL version)
bb01d732
ER
4# - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
5# - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
6# - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
7# - A few other small javascript libraries
a659c698
JB
8#
9# Conditional build:
422dcc8e 10%bcond_without order # with experimental order patch
cddf3011 11
0bb7ad7c 12#define snap 20060921
b33d41f0
ER
13%define rev r3890
14%define rel 2.28
b8b72891 15#define _rc RC3
87d15bba 16
b3857e8b 17%include /usr/lib/rpm/macros.php
c96aabf5 18Summary: Eventum Issue / Bug tracking system
9f49cf47 19Summary(pl.UTF-8): Eventum - system śledzenia spraw/błędów
bb01d732 20Name: eventum
847270fe 21Version: 2.2
c11e5ae6 22Release: %{?_rc:%{_rc}.}%{rel}%{?snap:.%{snap}}%{?rev:.%{rev}}
6850abd9
ER
23License: GPL
24Group: Applications/WWW
0bb7ad7c 25#Source0: http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{snap}.tar.gz
6cb55287 26#Source0: http://eventum.mysql.org/downloads/eventum-2.0.RC3.tar.gz
c2e7ae63 27#Source0: http://mysql.easynet.be/Downloads/eventum/%{name}-%{version}.tar.gz
c11e5ae6 28# bzr branch lp:eventum eventum && tar -cjf eventum.tar.bz2 --exclude=.bzr --exclude=.bzrignore eventum
ae3e48e6 29Source0: eventum-%{version}-dev-%{rev}.tar.gz
b33d41f0 30# Source0-md5: 2c1a0fb3a6d7ee885184376d4db49264
82121306 31Source1: %{name}-apache.conf
cd719538
ER
32Source2: %{name}-mail-queue.cron
33Source3: %{name}-mail-download.cron
34Source4: %{name}-reminder.cron
35Source5: %{name}-monitor.cron
36Source6: %{name}-cvs.php
37Source7: %{name}-irc.php
38Source8: %{name}-irc.init
73f6a3e6 39Source9: %{name}-irc.sysconfig
cfcdd0a9
ER
40Source13: %{name}-router-postfix.sh
41Source14: %{name}.logrotate
42Source15: %{name}-lighttpd.conf
d0dabd47
ER
43Source16: http://www.isocra.com/images/updown2.gif
44# Source16-md5: deb6eeb2552ba757d3a949ed10c4107d
ac27ba92 45Patch0: %{name}-lf.patch
4f627938 46Patch2: %{name}-order.patch
14ff3418 47# packaging patches that probably never go upstream
ac27ba92
ER
48Patch100: %{name}-paths.patch
49Patch101: %{name}-cvs-config.patch
4c823356 50Patch105: %{name}-bot-reconnect.patch
cfcdd0a9 51Patch107: %{name}-gettext.patch
a6016bab
ER
52# some tests
53Patch200: %{name}-fixed-nav.patch
3cf7d1aa 54URL: http://eventum.mysql.org/
2bbc9c41 55BuildRequires: gettext-devel
b3857e8b 56BuildRequires: rpm-php-pearprov >= 4.0.2-98
d1c44829 57BuildRequires: rpmbuild(macros) >= 1.461
4068cb73 58BuildRequires: sed >= 4.0
00e0fc89
ER
59Requires(triggerpostun): /usr/bin/php
60Requires(triggerpostun): sed >= 4.0
5b165428 61Requires: %{name}-base = %{version}-%{release}
7db4d346 62Requires: Smarty >= 2.6.10-4
cf66850b
ER
63Requires: php-common >= 4:5.0
64Requires: php-gd
65Requires: php-iconv
66Requires: php-imap
67Requires: php-mbstring
68Requires: php-mysql
69Requires: php-pcre
71b01fde
ER
70Requires: php-pear-DB
71Requires: php-pear-Date
72Requires: php-pear-HTTP_Request
73Requires: php-pear-Mail
723da18a 74Requires: php-pear-Mail_Mime
fb0b2f83 75Requires: php-pear-Mail_mimeDecode
71b01fde
ER
76Requires: php-pear-Math_Stats
77Requires: php-pear-Net_DIME
71b01fde 78Requires: php-pear-Net_SMTP
71b01fde
ER
79Requires: php-pear-Net_Socket
80Requires: php-pear-Net_URL
81Requires: php-pear-Net_UserAgent_Detect
3223fb64 82Requires: php-pear-PEAR-core
71b01fde
ER
83Requires: php-pear-Text_Diff
84Requires: php-pear-XML_RPC
465c3ab7 85Requires: smarty-gettext
bdf85dc8 86Requires: webapps
f399f1c0
ER
87Requires: webserver(access)
88Requires: webserver(alias)
897bdb2c 89Requires: webserver(indexfile)
61351540 90Requires: webserver(php) >= 4.2.0
0f8c2c4a 91Conflicts: logrotate < 3.7-4
35fa3cf8 92BuildArch: noarch
bb01d732
ER
93BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
ae3e48e6 95%define _noautoreq 'pear(init.php)' 'pear(/etc/webapps/.*)' 'pear(%{_appdir}/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
3223fb64 96
1d760108 97%define _libdir %{_prefix}/lib/%{name}
71f56750 98%define _appdir %{_datadir}/%{name}
d1c44829 99%define _smartydir %{php_data_dir}/Smarty
bdf85dc8
ER
100%define _webapps /etc/webapps
101%define _webapp %{name}
8a37ad9d
ER
102%define _webappdir %{_webapps}/%{_webapp}
103%define _sysconfdir /etc/%{name}
bb01d732
ER
104
105%description
106Eventum is a user-friendly and flexible issue tracking system that can
107be used by a support department to track incoming technical support
108requests, or by a software development team to quickly organize tasks
109and bugs. Eventum is used by the MySQL AB Technical Support team, and
110has allowed us to dramatically improve our response times.
111
d8cfa9f0
JR
112%description -l pl.UTF-8
113Eventum to przyjazny dla użytkownika system śledzenia spraw, który
114może być używany przez dział obsługi do śledzenia przychodzących żądań
115obsługi technicznej albo przez zespół tworzący oprogramowanie do
116szybkiej organizacji zadań i błędów. Eventum jest używany przez zespół
117Technical Support MySQL AB i umożliwił im znacząco poprawić czasy
4068cb73
JB
118reakcji.
119
d2e501e8
ER
120%package base
121Summary: Eventum base package
9f49cf47 122Summary(pl.UTF-8): Podstawowy pakiet Eventum
d2e501e8 123Group: Applications/WWW
3223fb64
ER
124Requires(postun): /usr/sbin/groupdel
125Requires(postun): /usr/sbin/userdel
5bbd68c9
ER
126Requires(pre): /bin/id
127Requires(pre): /usr/bin/getgid
5bbd68c9 128Requires(pre): /usr/sbin/groupadd
3223fb64 129Requires(pre): /usr/sbin/useradd
9f768793 130Provides: group(eventum)
d080edb6 131Provides: user(eventum)
d2e501e8
ER
132
133%description base
134This package contains base directory structure for Eventum.
135
d8cfa9f0
JR
136%description base -l pl.UTF-8
137Ten pakiet zawiera podstawową strukturę katalogów dla Eventum.
1bb5e749 138
ab983aaa 139%package setup
4068cb73 140Summary: Eventum setup package
9f49cf47 141Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Eventum
ab983aaa 142Group: Applications/WWW
5b165428 143Requires: %{name} = %{version}-%{release}
ab983aaa
ER
144
145%description setup
146Install this package to configure initial Eventum installation. You
147should uninstall this package when you're done, as it considered
148insecure to keep the setup files in place.
149
d8cfa9f0
JR
150%description setup -l pl.UTF-8
151Ten pakiet należy zainstalować w celu wstępnej konfiguracji Eventum po
152pierwszej instalacji. Potem należy go odinstalować, jako że
153pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
4068cb73 154
0da8e1f2 155%package mail-queue
30689148 156Summary: Eventum mail queue process
9f49cf47 157Summary(pl.UTF-8): Przetwarzanie kolejki poczty Eventum
0da8e1f2 158Group: Applications/WWW
5b165428 159Requires: %{name} = %{version}-%{release}
0da8e1f2
ER
160Requires: crondaemon
161
162%description mail-queue
163Beginning with the first release of Eventum, emails are not directly
164sent out from the various scripts, but rather added to a mail queue
165table that is processed by a cron job. If an email cannot be sent, it
166will be marked as such in the mail queue log, and the cron job script
167will re-try to send it again the next time it runs.
168
169This package contains the cron job.
170
d8cfa9f0
JR
171%description mail-queue -l pl.UTF-8
172Od pierwszego wydania Eventum poczta nie jest wysyłana bezpośrednio z
173różnych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
174Jeśli poczta nie może być wysłana, będzie odpowiednio oznaczona w logu
175kolejki poczty, a skrypt z crona będzie próbował wysłać ją ponownie
176następnym razem.
0181746f 177
30689148 178Ten pakiet zawiera zadanie dla crona.
179
ea084bcb 180%package mail-download
30689148 181Summary: Eventum email download
9f49cf47 182Summary(pl.UTF-8): Ściąganie poczty Eventum
ea084bcb 183Group: Applications/WWW
5b165428 184Requires: %{name} = %{version}-%{release}
ea084bcb
ER
185Requires: crondaemon
186
187%description mail-download
188In order for Eventum's email integration feature to work, you need to
189setup a cron job to run the script every so often.
190
191This package contains the cron job.
192
d8cfa9f0
JR
193%description mail-download -l pl.UTF-8
194Aby integracja poczty elektronicznej w Eventum działała, trzeba
195ustawić zadanie crona, aby uruchamiał odpowiedni skrypt wystarczająco
196często.
0181746f
JB
197
198Ten pakiet zawiera zadanie dla crona.
199
cd719538
ER
200%package reminder
201Summary: Eventum Reminder System
9f49cf47 202Summary(pl.UTF-8): System przypominania dla Eventum
cd719538 203Group: Applications/WWW
5b165428 204Requires: %{name} = %{version}-%{release}
cd719538
ER
205Requires: crondaemon
206
207%description reminder
208The reminder system was designed with the objective as serving as a
209safe net for issues that need attention. Depending on what
210configuration you create, you may have several reminders (or alerts)
211be sent out whenever an issue needs attention, for whatever parameter
212you may deem necessary.
213
214This package contains the cron job.
215
d8cfa9f0
JR
216%description reminder -l pl.UTF-8
217System przypominania został zaprojektowany tak, aby służył jako
218bezpieczna sieć dla spraw wymagających uwagi. W zależności od
219konfiguracji można ustawić różne przypominajki (lub alarmy) wysyłane
220przy każdej sprawie wymagającej uwagi lub przy parametrze, który można
221uważać za potrzebny.
6341f096
JB
222
223Ten pakiet zawiera zadanie dla crona.
224
cd719538
ER
225%package monitor
226Summary: Eventum Heartbeat Monitor
9f49cf47 227Summary(pl.UTF-8): Monitor życia dla Eventum
cd719538 228Group: Applications/WWW
5b165428 229Requires: %{name} = %{version}-%{release}
cd719538 230Requires: crondaemon
61351540 231Requires: php(posix)
cd719538
ER
232
233%description monitor
234The heartbeat monitor is a feature designed for the administrator that
235wants to be alerted whenever a common problem in Eventum is detected,
236like the database server not being available anymore, or maybe when
237the recommended permissions for certain configuration files are
238changed.
239
240Please note that before running the heartbeat monitor, you may need to
241customize some of the checks to be appropriate for your own system,
242particularly the permission and file checks on
243Monitor::checkConfiguration().
244
245This package contains the cron job.
246
d8cfa9f0
JR
247%description monitor -l pl.UTF-8
248Monitor życia to funkcjonalność zaprojektowana dla administratora
249chcącego być alarmowanym przy każdym wykryciu popularnego problemu z
250Eventum, jak nie działanie serwera bazy danych albo zmiana uprawnień
251do plików konfiguracyjnych.
6341f096 252
d8cfa9f0
JR
253Należy zauważyć, że przed uruchomieniem tego monitora może być
254konieczne dostosowanie niektórych testów do systemu, w szczególności
255testów uprawnień i plików w Monitor::checkConfiguration().
6341f096
JB
256
257Ten pakiet zawiera zadanie dla crona.
258
5b165428
ER
259%package route-drafts
260Summary: Eventum Draft Routing
9f49cf47 261Summary(pl.UTF-8): Przekazywanie szkiców dla Eventum
5b165428
ER
262Group: Applications/WWW
263Requires: %{name} = %{version}-%{release}
5b165428
ER
264Requires: eventum(router)
265
266%description route-drafts
71f56750 267The draft routing feature is used to automatically associate a thread
ae3e48e6 268of drafts into an Eventum issue. By setting up Postfix
71f56750
ER
269to deliver emails sent to a specific address (usually
270draft-<number>@<domain>) to the above script, users are able to send
271drafts written in their mail client to be stored in Eventum. These
272drafts will NOT broadcasted to the notification list.
5b165428 273
d8cfa9f0
JR
274%description route-drafts -l pl.UTF-8
275Przekazywanie szkiców służy do automatycznego wiązania wątku szkiców z
ae3e48e6 276problemem w Eventum. Ustawiając Postfiksa, aby
d8cfa9f0
JR
277dostarczał pocztę wysłaną na podany adres (zwykle
278draft-<liczba>@<domena>) do tego skryptu umożliwia się użytkownikom
279wysyłanie szkiców napisanych w ich kliencie pocztowym do zapisania w
280Eventum. Szkice te NIE będą wysyłane na listę powiadomień.
5410173f 281
cd719538
ER
282%package route-emails
283Summary: Eventum Email Routing
9f49cf47 284Summary(pl.UTF-8): Przekazywanie poczty dla Eventum
cd719538 285Group: Applications/WWW
5b165428 286Requires: %{name} = %{version}-%{release}
8bc4bcd1 287Requires: eventum(router)
cd719538
ER
288
289%description route-emails
290The email routing feature is used to automatically associate a thread
ae3e48e6 291of emails into an Eventum issue. By setting up Postfix
cd719538
ER
292to deliver emails sent to a specific address (usually
293issue-<number>@<domain>) to the above script, users are able to use
294their email clients to reply to emails coming from Eventum, and those
295replies will be automatically associated with the issue and
296broadcasted to the entire notification list.
297
d8cfa9f0
JR
298%description route-emails -l pl.UTF-8
299Funkcjonalność przekazywania poczty służy do automatycznego wiązania
ae3e48e6
ER
300wątku listów ze sprawą w Eventum. Po ustawieniu czy nawet
301Postfiksa, aby dostarczał listy wysyłane na pewien adres (zwykle
d8cfa9f0
JR
302issue-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
303używać klientów pocztowych do odpowiadania na listy przychodzące z
304Eventum, a odpowiedzi te będą automatycznie wiązane ze sprawą i
305rozprowadzane do całej listy ogłoszeniowej.
6341f096 306
cd719538
ER
307%package route-notes
308Summary: Eventum Note Routing
9f49cf47 309Summary(pl.UTF-8): Przekazywanie notatek dla Eventum
cd719538 310Group: Applications/WWW
5b165428 311Requires: %{name} = %{version}-%{release}
8bc4bcd1 312Requires: eventum(router)
cd719538
ER
313
314%description route-notes
315The note routing feature is used to automatically associate a thread
ae3e48e6 316of notes into an Eventum issue. By setting up Postfix
cd719538
ER
317to deliver emails sent to a specific address (usually
318note-<number>@<domain>) to the above script, users are able to use
319their email clients to reply to internal notes coming from Eventum,
320and those replies will be automatically associated with the issue and
321broadcasted to the notification list staff members.
322
d8cfa9f0
JR
323%description route-notes -l pl.UTF-8
324Funkcjonalność przekazywania notatek służy do automatycznego wiązania
ae3e48e6
ER
325wątku notatek ze sprawą w Eventum. Po ustawieniu
326Postfiksa, aby dostarczał listy wysyłane na pewien adres (zwykle
d8cfa9f0
JR
327note-<numer>@<domena>) na powyższy skrypt, użytkownicy będą mogli
328używać klientów pocztowych do odpowiadania na wewnętrzne notatki
329pochodzące od Eventu, a odpowiedzi te będą automatycznie wiązane ze
330sprawą i rozprowadzane do członków personelu listy ogłoszeniowej.
6341f096 331
a6d2ad69
ER
332%package router-postfix
333Summary: Eventum Mail Routing - Postfix
9f49cf47 334Summary(pl.UTF-8): Przekazywanie poczty Eventum - Postfix
a6d2ad69 335Group: Applications/Mail
5b165428 336Requires: %{name} = %{version}-%{release}
a6d2ad69 337Requires: postfix
8bc4bcd1
ER
338Provides: eventum(router)
339Obsoletes: eventum(router)
a6d2ad69
ER
340
341%description router-postfix
342This package provides way of routing notes and emails back to Eventum
343via Postfix.
344
e1bb3563
ER
345The Postfix configuration instructions you can find from
346<http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
347
d8cfa9f0
JR
348%description router-postfix -l pl.UTF-8
349Ten pakiet udostępnia metodę przekazywania notatek i listów do Eventum
995fa554
JB
350przez Postfiksa.
351
d8cfa9f0 352Opis konfiguracji Postfiksa można znaleźć pod adresem
a659c698
JB
353<http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
354
cd719538
ER
355%package irc
356Summary: Eventum IRC Notification Bot
9f49cf47 357Summary(pl.UTF-8): IRC-owy bot powiadamiający dla Eventum
cd719538 358Group: Applications/WWW
b79fc4aa 359Requires(post,preun): /sbin/chkconfig
e1c0f343 360Requires(triggerpostun): sed >= 4.0
5b165428 361Requires: %{name} = %{version}-%{release}
61351540 362Requires: php(sockets)
71f56750 363Requires: php-pear-Net_SmartIRC
e1c0f343 364Requires: rc-scripts >= 0.4.0.18
cd719538
ER
365
366%description irc
367The IRC notification bot is a nice feature for remote teams that want
368to handle issues and want to have a quick and easy way to get simple
369notifications. Right now the bot notifies of the following actions:
370- New Issues
371- Blocked emails
372- Issues that got their assignment list changed
373
374NOTE: You will need to manually edit the bot.php script to set your
375appropriate preferences, like IRC server and channel that the bot
376should join.
377
d8cfa9f0
JR
378%description irc -l pl.UTF-8
379IRC-owy bot powiadamiający to miła funkcjonalność dla zdalnych
380zespołów chcących obsługiwać sprawy i mieć szybki i łatwy sposób na
381uzyskiwanie prostych powiadomień. Aktualnie bot powiadamia o
382następujących zdarzeniach:
6341f096
JB
383- nowych sprawach
384- zablokowanych listach
d8cfa9f0 385- sprawach, dla których zmieniła się lista powiązań
6341f096 386
d8cfa9f0
JR
387UWAGA: w celu wprowadzenia własnych ustawień, takich jak serwer IRC i
388kanał używany przez bota, trzeba ręcznie zmodyfikować skrypt bot.php .
6341f096 389
abd490e4
ER
390%package cli
391Summary: Eventum command-line interface
9f49cf47 392Summary(pl.UTF-8): Interfejs linii poleceń dla Eventum
abd490e4 393Group: Applications/WWW
5b165428 394Requires: %{name}-base = %{version}-%{release}
9500cdeb 395Requires: php-cli
cf66850b 396Requires: php-common >= 4:5.0
71b01fde 397Requires: php-pear-XML_RPC
abd490e4
ER
398
399%description cli
400The Eventum command-line interface allows you to access most of the
401features of the web interface straight from your command shell.
abd490e4 402
d8cfa9f0
JR
403%description cli -l pl.UTF-8
404Interfejs linii poleceń Eventum pozwala na dostęp do większości
405funkcji interfejsu WWW prosto z linii poleceń powłoki.
958cd5a0 406
5cb2e61d 407%package scm
30689148 408Summary: Eventum SCM integration
9f49cf47 409Summary(pl.UTF-8): Integracja SCM dla Eventum
5cb2e61d 410Group: Applications/WWW
5b165428 411Requires: %{name}-base = %{version}-%{release}
bdf85dc8 412Requires: php-cli
cf66850b
ER
413Requires: php-common >= 4:5.0
414Requires: php-pcre
5cb2e61d
ER
415
416%description scm
417This feature allows your software development teams to integrate your
418Source Control Management system with your Issue Tracking System.
419
420The integration is implemented in such a way that it will be forward
421compatible with pretty much any SCM system, such as CVS.
422
0181746f 423For installation see
a392a259 424</eventum/help.php?topic=scm_integration_installation>.
0181746f 425
d8cfa9f0
JR
426%description scm -l pl.UTF-8
427Ten pakiet pozwala zespołom programistów na integrację systemu
428zarządzania źródłami (SCM - Source Control Management) z systemem
429śledzenia spraw.
0181746f 430
d8cfa9f0
JR
431Integracja jest zaimplementowana tak, aby być kompatybilna w przód z
432prawie każdym systemem SCM, jak np. CVS.
0181746f 433
d8cfa9f0 434Szczegóły na temat instalacji można przeczytać pod
a392a259 435</eventum/help.php?topic=scm_integration_installation>.
5cb2e61d 436
bb01d732 437%prep
ae3e48e6 438%setup -q
5b165428 439
ae3e48e6
ER
440rm -r upgrade/*v1.[123]* # too old to support in PLD Linux
441rm -r upgrade/v{1.,2.0,2.1_}* # no longer supported in PLD Linux
442rm upgrade/flush_compiled_templates.php
443rm -r upgrade/{*/,}index.html # not needed in PLD Linux
e1c0f343 444
9487d524 445# bug fixes / features
0b3b58dd 446%patch0 -p1
4f627938 447%{?with_order:%patch2 -p1}
57e65e62 448
422dcc8e
ER
449cp -a %{SOURCE16} images
450
a6016bab 451#%patch200 -p1
ac27ba92
ER
452
453# packaging
454%patch100 -p1
455%patch101 -p1
ac27ba92 456%patch105 -p1
ac27ba92 457%patch107 -p1
0b3b58dd 458
3d92cbd2
ER
459cat <<'EOF'> mysql-permissions.sql
460# use this schema if you want to grant permissions manually instead of using setup
461# this schema is extracted from setup/index.php.
462GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON eventum.* TO 'eventum'@'localhost' IDENTIFIED BY 'password';
463EOF
464
25123ce7 465%{__sed} -i -e "
25123ce7 466s;define('CONFIG_PATH'.*');define('CONFIG_PATH', '%{_webappdir}');
ae3e48e6 467" upgrade/{*/,}*.php
c3fd3767 468
5b165428 469# remove backups from patching as we use globs to package files to buildroot
73c437a6 470find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
085e39c0 471
465c3ab7 472%build
ae3e48e6 473%{__make} -C localization
465c3ab7 474
bb01d732
ER
475%install
476rm -rf $RPM_BUILD_ROOT
cfc3bce6 477install -d \
8a37ad9d 478 $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
cfc3bce6 479 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
c1e74aa1 480 $RPM_BUILD_ROOT/var/{run,cache,lib}/%{name} \
685fc383 481 $RPM_BUILD_ROOT/var/log/{archive/,}%{name} \
89522a33 482 $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
761ae7dd 483 $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
cfc3bce6 484
ae3e48e6
ER
485%{__make} install-eventum install-cli install-irc install-scm install-jpgraph install-localization \
486 sysconfdir=%{_webappdir} \
487 DESTDIR=$RPM_BUILD_ROOT
da8d6134 488
ae3e48e6 489%{?with_order:cp -a htdocs/ajax $RPM_BUILD_ROOT%{_appdir}/htdocs}
9cdc5027 490
f399f1c0 491touch $RPM_BUILD_ROOT%{_webappdir}/htpasswd
31dabce6
ER
492cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
493cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
cfcdd0a9 494cp -a %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
ae3e48e6 495
31dabce6
ER
496cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
497cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
498cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
499cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
ae3e48e6 500
77b3db3b 501cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_webappdir}/irc_config.php
ae3e48e6 502
31dabce6
ER
503cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
504cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
505
410d72c7 506# postfix router
cfcdd0a9 507install %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix
a6d2ad69 508
cfcdd0a9 509install -D %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
465c3ab7 510
600d96a0 511%find_lang %{name}
c1e74aa1 512
ae3e48e6
ER
513# scm
514install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php
515
516# old compat
517ln -s %{_sbindir}/eventum-cvs-hook $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits
518ln -s %{_sbindir}/eventum-svn-hook $RPM_BUILD_ROOT%{_libdir}/process_svn_commits
519
520# skip pear for cli
521rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/cli
522cp -a cli/lib/eventum $RPM_BUILD_ROOT%{_datadir}/%{name}/cli
523
bb01d732
ER
524%clean
525rm -rf $RPM_BUILD_ROOT
526
01b84746
ER
527%pre
528%addusertogroup http %{name}
529
82121306 530%post
ec185415 531# check if the package is configured.
2bf6ebce 532if grep -q "Header('Location: setup/')" %{_webappdir}/config.php; then
ac9278b5 533if [ -f %{_appdir}/htdocs/setup/index.php ]; then
ec185415
ER
534%banner %{name} -e <<EOF
535
536You haven't yet configured Eventum!
ac9278b5
ER
537Please open in browser <http://localhost/eventum/>
538If you need access from elsewhere, you need to edit
8a37ad9d 539%{_webappdir}/apache.conf and restart apache.
ec185415 540
ac9278b5
ER
541IMPORTANT: When You have configured Eventum, please uninstall the
542setup package, so that %{name}-setup is able to secure your Eventum
543installation.
ec185415 544
ac9278b5 545EOF
5b165428 546#' vim syntax hack
ac9278b5
ER
547else
548%banner %{name} -e <<EOF
549
550You haven't yet configured Eventum!
551
552To setup eventum, please install %{name}-setup and open in browser
553<http://localhost/eventum/>.
554If you need access from elsewhere, you need to edit
2bf6ebce 555%{_webappdir}/*.conf depending on webserver and restart the webserver.
ac9278b5
ER
556
557IMPORTANT: When You have configured Eventum, please uninstall the
558setup package, so that %{name}-setup is able to secure your Eventum
559installation.
ec185415
ER
560
561EOF
5b165428 562#' vim syntax hack
ac9278b5 563fi
47033007 564
8a37ad9d 565elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
47033007
ER
566%banner %{name} -e <<EOF
567
568You have default private key installed!
569
570Install %{name}-setup and open up http://yourserver/eventum/setup/
571-- that will help you setup initial config.
572
573when have configured Eventum, please uninstall the setup package,
574so that %{name}-setup is able to secure your Eventum installation.
575
576EOF
577 elif [ -d %{_appdir}/setup ]; then
107fc31b
ER
578%banner %{name} -e <<EOF
579
580If you have have configured Eventum, please uninstall the setup package,
581so that %{name}-setup is able to secure your Eventum installation.
582
583EOF
ec185415 584fi
94bd779f 585
08196fe2
ER
586# greate empty ghost files
587for a in cli.log errors.log irc_bot.log login_attempts.log; do
588 if [ ! -f /var/log/%{name}/$a ]; then
589 install -m620 -oroot -geventum /dev/null /var/log/%{name}/$a
590 fi
591done
592
847270fe
ER
593# database update
594%{_appdir}/upgrade/update-database.php || :
595
da8d6134
ER
596# nuke Smarty templates cache after upgrade
597rm -f /var/cache/eventum/*.php
598
82121306
ER
599%preun
600if [ "$1" = "0" ]; then
dfe0f6d6
ER
601 # nuke cache
602 rm -f /var/cache/eventum/*.php 2>/dev/null || :
603fi
cfc3bce6 604
01b84746 605%pre base
1d760108
ER
606%groupadd -P %{name}-base -g 146 %{name}
607%useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
01b84746
ER
608
609%postun base
610if [ "$1" = "0" ]; then
a6d2ad69 611 %userremove %{name}
1f52d1fe 612 %groupremove %{name}
a6d2ad69
ER
613fi
614
94bd779f 615%post setup
8a37ad9d
ER
616chmod 660 %{_webappdir}/{config,private_key}.php
617chown root:eventum %{_webappdir}/{config,private_key}.php
94bd779f
ER
618
619%postun setup
620if [ "$1" = "0" ]; then
8a37ad9d
ER
621 chmod 640 %{_webappdir}/{config,private_key}.php
622 chown root:eventum %{_webappdir}/{config,private_key}.php
94bd779f
ER
623fi
624
e1c0f343
ER
625%post irc
626/sbin/chkconfig --add eventum-irc
99bbe3cb 627%service eventum-irc restart "Eventum IRC Bot"
e1c0f343 628
add0e245
ER
629%preun irc
630if [ "$1" = 0 ]; then
631 %service eventum-irc stop
632 /sbin/chkconfig --del eventum-irc
633fi
634
09f58a75 635%triggerin -- apache1 < 1.3.37-3, apache1-base
bdf85dc8 636%webapp_register apache %{_webapp}
1d760108 637
09f58a75 638%triggerun -- apache1 < 1.3.37-3, apache1-base
bdf85dc8 639%webapp_unregister apache %{_webapp}
1d760108 640
00e0fc89 641%triggerin -- apache < 2.2.0, apache-base
bdf85dc8 642%webapp_register httpd %{_webapp}
1d760108 643
00e0fc89 644%triggerun -- apache < 2.2.0, apache-base
bdf85dc8 645%webapp_unregister httpd %{_webapp}
1d760108 646
f399f1c0
ER
647%triggerin -- lighttpd
648%webapp_register lighttpd %{_webapp}
649
650%triggerun -- lighttpd
651%webapp_unregister lighttpd %{_webapp}
652
600d96a0 653%files -f %{name}.lang
bb01d732 654%defattr(644,root,root,755)
5e8e4e5e 655%doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
ae3e48e6 656%doc docs/* htdocs/setup/schema.sql mysql-permissions.sql
8a37ad9d
ER
657%attr(751,root,root) %dir %{_webappdir}
658%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
659%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
f399f1c0 660%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
8a37ad9d
ER
661%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
662%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
663%attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
f399f1c0 664%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/htpasswd
d2e501e8 665
01b84746
ER
666%dir %attr(731,root,eventum) /var/log/%{name}
667%attr(620,root,eventum) %ghost /var/log/%{name}/*
3c6aa7a9 668%dir %attr(750,root,root) /var/log/archive/%{name}
8fd047ac 669%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
35f9d6a3 670
ae3e48e6 671%{_appdir}/init.php
cfc3bce6
ER
672%dir %{_appdir}/htdocs
673%{_appdir}/htdocs/*.php
da8d6134 674%{_appdir}/htdocs/*.ico
cfc3bce6
ER
675%{_appdir}/htdocs/css
676%{_appdir}/htdocs/customer
677%{_appdir}/htdocs/images
678%{_appdir}/htdocs/js
679%{_appdir}/htdocs/manage
680%{_appdir}/htdocs/reports
681%{_appdir}/htdocs/rpc
682%{_appdir}/htdocs/misc
422dcc8e
ER
683%if %{with order}
684%{_appdir}/htdocs/ajax
685%endif
9748a8c3 686%{_appdir}/templates
847270fe 687
c9165420 688%dir %{_appdir}/upgrade
ae3e48e6 689%{_appdir}/upgrade/init.php
847270fe
ER
690%attr(755,root,root) %{_appdir}/upgrade/update-database.php
691%dir %{_appdir}/upgrade/v*
692%attr(755,root,root) %{_appdir}/upgrade/v*/*.php
693%{_appdir}/upgrade/patches
694
ae3e48e6
ER
695%dir %{_appdir}/lib
696%{_appdir}/lib/eventum
697%{_appdir}/lib/jpgraph
698%exclude %{_appdir}/lib/eventum/class.monitor.php
9748a8c3 699
01b84746
ER
700%dir %attr(730,root,eventum) /var/run/%{name}
701%dir %attr(730,root,eventum) /var/cache/%{name}
ab983aaa 702
d2e501e8
ER
703%files base
704%defattr(644,root,root,755)
705%attr(751,root,root) %dir %{_sysconfdir}
a392a259 706%dir %{_libdir}
cfc3bce6 707%dir %{_appdir}
ae3e48e6 708%attr(755,root,root) %dir /var/lib/%{name}
89522a33 709# saved mail copies
1d760108 710%attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
89522a33
ER
711%attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
712%attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
d2e501e8 713
ab983aaa
ER
714%files setup
715%defattr(644,root,root,755)
cfc3bce6 716%{_appdir}/htdocs/setup
0da8e1f2
ER
717
718%files mail-queue
719%defattr(644,root,root,755)
16902912 720%attr(755,root,root) %{_appdir}/process_mail_queue.php
ea084bcb
ER
721%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
722
723%files mail-download
724%defattr(644,root,root,755)
790ebceb 725%attr(755,root,root) %{_appdir}/download_emails.php
ea084bcb 726%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
5cb2e61d 727
cd719538
ER
728%files reminder
729%defattr(644,root,root,755)
16902912 730%attr(755,root,root) %{_appdir}/check_reminders.php
cd719538
ER
731%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
732
733%files monitor
734%defattr(644,root,root,755)
ae3e48e6 735%{_appdir}/lib/eventum/class.monitor.php
16902912 736%attr(755,root,root) %{_appdir}/monitor.php
cd719538
ER
737%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
738
5b165428
ER
739%files route-drafts
740%defattr(644,root,root,755)
410d72c7 741%attr(755,root,root) %{_appdir}/route_drafts.php
5b165428 742
cd719538
ER
743%files route-emails
744%defattr(644,root,root,755)
410d72c7 745%attr(755,root,root) %{_appdir}/route_emails.php
cd719538
ER
746
747%files route-notes
748%defattr(644,root,root,755)
410d72c7 749%attr(755,root,root) %{_appdir}/route_notes.php
cd719538 750
a6d2ad69
ER
751%files router-postfix
752%defattr(644,root,root,755)
410d72c7 753%attr(755,root,root) %{_libdir}/router-postfix
a6d2ad69 754
cd719538
ER
755%files irc
756%defattr(644,root,root,755)
77b3db3b 757%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/irc_config.php
01b84746 758%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
ae3e48e6 759%attr(755,root,root) %{_sbindir}/%{name}-irc-bot
cd719538
ER
760%attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
761
abd490e4
ER
762%files cli
763%defattr(644,root,root,755)
ae3e48e6 764%doc cli/eventumrc
d2e501e8 765%attr(755,root,root) %{_bindir}/%{name}
cfc3bce6 766%{_appdir}/cli
abd490e4 767
5cb2e61d
ER
768%files scm
769%defattr(644,root,root,755)
ca6b8520 770%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php
bd7564e0
ER
771%attr(755,root,root) %{_libdir}/process_cvs_commits
772%attr(755,root,root) %{_libdir}/process_svn_commits
ae3e48e6
ER
773%attr(755,root,root) %{_sbindir}/eventum-cvs-hook
774%attr(755,root,root) %{_sbindir}/eventum-svn-hook
This page took 1.816695 seconds and 4 git commands to generate.