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