]> git.pld-linux.org Git - packages/eventum.git/blame - eventum.spec
- docs/* to %doc
[packages/eventum.git] / eventum.spec
CommitLineData
bb01d732 1# TODO
35f9d6a3 2# - where to put templates_c (templates cache dir)? /var/run/eventum? /var/run/php/eventum? /var/cache/eventum?
9748a8c3 3# - php5 is not tested, but not placing hard conflict on it, as it prevents php4 & php coinstallation
bb01d732
ER
4# - discard bundled packages (from INSTALL):
5# - JpGraph 1.5.3 (last GPL version)
6# - Smarty 2.3.0 (http://smarty.php.net)
7# - PEAR packages
8# - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
9# - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
10# - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
11# - A few other small javascript libraries
12# - Mail Queue Process, cron or separate package (misc/process_mail_queue.php)
13# - Email Download (misc/download_emails.php)
14# - Reminder System (misc/check_reminders.php)
15# - Heartbeat Monitor (misc/monitor.php)
16# - Email Routing Script (misc/route_emails.php)
17# - Note Routing Script (misc/route_notes.php)
18# - IRC Notification Bot (misc/irc/bot.php)
19# - Command-line Interface (misc/cli/eventum)
87d15bba
ER
20
21# snapshot: DATE
22#define _snap 20050114
23
24%if 0%{?_snap}
25%define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
26%else
27%define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
28%endif
29
3e7a0b70 30%define _rel 1.38
87d15bba 31
bb01d732
ER
32Summary: Eventum Issue / Bug Tracking System
33Name: eventum
34Version: 1.4
87d15bba 35Release: %{?_snap:0.%{_snap}.}%{_rel}
6850abd9
ER
36License: GPL
37Group: Applications/WWW
87d15bba 38Source0: %{_source}
bb01d732 39# Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
82121306 40Source1: %{name}-apache.conf
17a8bd0d
ER
41Patch0: %{name}-rpm.patch
42Patch1: %{name}-clock-status.patch
bb01d732
ER
43URL: http://dev.mysql.com/downloads/other/eventum/index.html
44BuildRequires: sed >= 4.0
ec185415 45BuildRequires: rpmbuild(macros) >= 1.177
9cdc5027 46Requires: php >= 4.1.0
bb01d732
ER
47Requires: php-pcre
48Requires: php-mysql
49Requires: php-gd
50Requires: php-imap
7a7a10b5 51#Requires: apache-mod_dir
82121306
ER
52# conflict with non-confdir apache
53Conflicts: apache1 < 1.3.33-1.1
bb01d732
ER
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
82121306 56%define _sysconfdir /etc/%{name}
9748a8c3 57%define _appdir %{_datadir}/%{name}
bb01d732 58
82121306
ER
59%define _apache1dir /etc/apache
60%define _apache2dir /etc/httpd
61
bb01d732
ER
62%description
63Eventum is a user-friendly and flexible issue tracking system that can
64be used by a support department to track incoming technical support
65requests, or by a software development team to quickly organize tasks
66and bugs. Eventum is used by the MySQL AB Technical Support team, and
67has allowed us to dramatically improve our response times.
68
ab983aaa
ER
69%package setup
70Summary: Eventum setup package.
71Group: Applications/WWW
94bd779f
ER
72PreReq: %{name}
73Requires: %{name} = %{epoch}:%{version}-%{release}
ab983aaa
ER
74
75%description setup
76Install this package to configure initial Eventum installation. You
77should uninstall this package when you're done, as it considered
78insecure to keep the setup files in place.
79
bb01d732 80%prep
87d15bba 81%setup -q %{?_snap:-n %{name}-%{_snap}}
d36b46b9 82%patch0 -p1
17a8bd0d 83%patch1 -p1
bb01d732
ER
84
85%build
86
87%install
88rm -rf $RPM_BUILD_ROOT
89
35f9d6a3 90install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{locks,templates_c},/var/log}
bb01d732 91
9748a8c3 92cp -a . $RPM_BUILD_ROOT%{_appdir}
bb01d732 93
9748a8c3 94> $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
9cdc5027 95
82121306
ER
96sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
97
98install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
99
c70112b1
ER
100# in conf
101mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
102ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
103ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
104
35f9d6a3
ER
105# log directory
106mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
107ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
108
bb01d732 109# in doc
9748a8c3 110rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
3e7a0b70 111rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
bb01d732
ER
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
82121306
ER
116%post
117# apache1
118if [ -f %{_apache1dir}/apache.conf ]; then
119 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
120 if [ -f /var/lock/subsys/apache ]; then
121 /etc/rc.d/init.d/apache restart 1>&2
122 fi
123fi
124# apache2
125if [ -d %{_apache2dir}/httpd.conf ]; then
126 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
127 if [ -f /var/lock/subsys/httpd ]; then
128 /etc/rc.d/init.d/httpd restart 1>&2
129 fi
130fi
131
ec185415 132# check if the package is configured.
c70112b1 133if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
ec185415
ER
134%banner %{name} -e <<EOF
135
136You haven't yet configured Eventum!
137
138Install %{name}-setup and open up http://yourserver/eventum/
139-- that will help you setup initial config.
140
141when have configured Eventum, please uninstall the setup package,
142so that %{name}-setup is able to secure your Eventum installation.
143
144EOF
145#' vim stupidity.
107fc31b
ER
146else
147 if [ -d %{_appdir}/setup ]; then
148%banner %{name} -e <<EOF
149
150If you have have configured Eventum, please uninstall the setup package,
151so that %{name}-setup is able to secure your Eventum installation.
152
153EOF
154 fi
ec185415 155fi
94bd779f 156
82121306
ER
157%preun
158if [ "$1" = "0" ]; then
159 # apache1
160 if [ -f %{_apache1dir}/apache.conf ]; then
161 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
162 if [ -f /var/lock/subsys/apache ]; then
163 /etc/rc.d/init.d/apache restart 1>&2
164 fi
165 fi
166 # apache2
167 if [ -d %{_apache2dir}/httpd.conf ]; then
168 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
169 if [ -f /var/lock/subsys/httpd ]; then
170 /etc/rc.d/init.d/httpd restart 1>&2
171 fi
172 fi
173fi
174
94bd779f
ER
175%post setup
176# RACE possible? chmod just in case
c70112b1
ER
177chmod 640 %{_sysconfdir}/{config.inc,setup.conf}.php
178chown http:root %{_sysconfdir}/{config.inc,setup.conf}.php
94bd779f
ER
179
180%postun setup
181if [ "$1" = "0" ]; then
182 # RACE condition possible?
c70112b1
ER
183 chmod 640 %{_sysconfdir}/{config.inc,setup.conf}.php
184 chown root:http %{_sysconfdir}/{config.inc,setup.conf}.php
94bd779f
ER
185fi
186
bb01d732
ER
187%files
188%defattr(644,root,root,755)
3e7a0b70 189%doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
82121306 190%dir %{_sysconfdir}
c70112b1 191%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
82121306 192
35f9d6a3
ER
193%dir %attr(731,root,http) /var/log/%{name}
194%attr(640,http,root) %ghost /var/log/%{name}/*
195
9748a8c3 196%dir %{_appdir}
c70112b1 197%{_appdir}/*.php
9748a8c3
ER
198%{_appdir}/css
199%{_appdir}/customer
9748a8c3
ER
200%{_appdir}/images
201%{_appdir}/js
35f9d6a3 202%{_appdir}/logs
9748a8c3
ER
203%{_appdir}/manage
204%{_appdir}/misc
205%{_appdir}/reports
206%{_appdir}/rpc
9748a8c3
ER
207%{_appdir}/templates
208
94bd779f 209%dir %attr(750,http,root) %{_appdir}/locks
9748a8c3
ER
210
211%dir %{_appdir}/include
212%{_appdir}/include/customer
213%{_appdir}/include/jpgraph
214%{_appdir}/include/pear
215%{_appdir}/include/Smarty
216%{_appdir}/include/workflow
217%{_appdir}/include/class.*
218%{_appdir}/include/db_access.php
219%{_appdir}/include/jsrsServer.inc.php
220%attr(640,http,root) %{_appdir}/include/private_key.php
221
9748a8c3 222%dir %attr(750,http,root) %{_appdir}/templates_c
ab983aaa
ER
223
224%files setup
225%defattr(644,root,root,755)
226%{_appdir}/setup
This page took 0.091424 seconds and 4 git commands to generate.