]>
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 | ||
94bd779f | 29 | %define _rel 1.31 |
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 | |
9cdc5027 | 44 | Requires: php >= 4.1.0 |
bb01d732 ER |
45 | Requires: php-pcre |
46 | Requires: php-mysql | |
47 | Requires: php-gd | |
48 | Requires: php-imap | |
7a7a10b5 | 49 | #Requires: apache-mod_dir |
82121306 ER |
50 | # conflict with non-confdir apache |
51 | Conflicts: apache1 < 1.3.33-1.1 | |
bb01d732 ER |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
82121306 | 54 | %define _sysconfdir /etc/%{name} |
9748a8c3 | 55 | %define _appdir %{_datadir}/%{name} |
bb01d732 | 56 | |
82121306 ER |
57 | %define _apache1dir /etc/apache |
58 | %define _apache2dir /etc/httpd | |
59 | ||
bb01d732 ER |
60 | %description |
61 | Eventum is a user-friendly and flexible issue tracking system that can | |
62 | be used by a support department to track incoming technical support | |
63 | requests, or by a software development team to quickly organize tasks | |
64 | and bugs. Eventum is used by the MySQL AB Technical Support team, and | |
65 | has allowed us to dramatically improve our response times. | |
66 | ||
ab983aaa ER |
67 | %package setup |
68 | Summary: Eventum setup package. | |
69 | Group: Applications/WWW | |
94bd779f ER |
70 | PreReq: %{name} |
71 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
ab983aaa ER |
72 | |
73 | %description setup | |
74 | Install this package to configure initial Eventum installation. You | |
75 | should uninstall this package when you're done, as it considered | |
76 | insecure to keep the setup files in place. | |
77 | ||
bb01d732 | 78 | %prep |
87d15bba | 79 | %setup -q %{?_snap:-n %{name}-%{_snap}} |
d36b46b9 | 80 | %patch0 -p1 |
17a8bd0d | 81 | %patch1 -p1 |
bb01d732 ER |
82 | |
83 | %build | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
82121306 | 88 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{locks,templates_c}} |
bb01d732 | 89 | |
9748a8c3 | 90 | cp -a . $RPM_BUILD_ROOT%{_appdir} |
bb01d732 | 91 | |
9748a8c3 | 92 | > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php |
9cdc5027 | 93 | |
82121306 ER |
94 | sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum |
95 | ||
96 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
97 | ||
bb01d732 | 98 | # in doc |
9748a8c3 | 99 | rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE} |
21efb649 | 100 | rm -rf $RPM_BUILD_ROOT%{_appdir}/misc/upgrade |
bb01d732 ER |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
82121306 ER |
105 | %post |
106 | # apache1 | |
107 | if [ -f %{_apache1dir}/apache.conf ]; then | |
108 | ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf | |
109 | if [ -f /var/lock/subsys/apache ]; then | |
110 | /etc/rc.d/init.d/apache restart 1>&2 | |
111 | fi | |
112 | fi | |
113 | # apache2 | |
114 | if [ -d %{_apache2dir}/httpd.conf ]; then | |
115 | ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf | |
116 | if [ -f /var/lock/subsys/httpd ]; then | |
117 | /etc/rc.d/init.d/httpd restart 1>&2 | |
118 | fi | |
119 | fi | |
120 | ||
94bd779f ER |
121 | echo "If you're installing %{name} for the first time, Install %{name}-setup," |
122 | echo "and open up http://yourserver/eventum/, and when done," | |
123 | echo "uninstall the package, that will secure the config files." | |
124 | ||
82121306 ER |
125 | %preun |
126 | if [ "$1" = "0" ]; then | |
127 | # apache1 | |
128 | if [ -f %{_apache1dir}/apache.conf ]; then | |
129 | rm -f %{_apache1dir}/conf.d/99_%{name}.conf | |
130 | if [ -f /var/lock/subsys/apache ]; then | |
131 | /etc/rc.d/init.d/apache restart 1>&2 | |
132 | fi | |
133 | fi | |
134 | # apache2 | |
135 | if [ -d %{_apache2dir}/httpd.conf ]; then | |
136 | rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf | |
137 | if [ -f /var/lock/subsys/httpd ]; then | |
138 | /etc/rc.d/init.d/httpd restart 1>&2 | |
139 | fi | |
140 | fi | |
141 | fi | |
142 | ||
94bd779f ER |
143 | %post setup |
144 | # RACE possible? chmod just in case | |
145 | chmod 640 %{_appdir}/{config.inc,setup.conf}.php | |
146 | chown http:root %{_appdir}/{config.inc,setup.conf}.php | |
147 | ||
148 | %postun setup | |
149 | if [ "$1" = "0" ]; then | |
150 | # RACE condition possible? | |
151 | chmod 640 %{_appdir}/{config.inc,setup.conf}.php | |
152 | chown root:http %{_appdir}/{config.inc,setup.conf}.php | |
153 | fi | |
154 | ||
bb01d732 ER |
155 | %files |
156 | %defattr(644,root,root,755) | |
21efb649 | 157 | %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade |
82121306 | 158 | %dir %{_sysconfdir} |
94bd779f | 159 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
82121306 | 160 | |
9748a8c3 | 161 | %dir %{_appdir} |
94bd779f ER |
162 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/config.inc.php |
163 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/setup.conf.php | |
9748a8c3 ER |
164 | %{_appdir}/*[!cf].php |
165 | ||
166 | %{_appdir}/css | |
167 | %{_appdir}/customer | |
168 | %{_appdir}/docs | |
169 | %{_appdir}/images | |
170 | %{_appdir}/js | |
171 | %{_appdir}/manage | |
172 | %{_appdir}/misc | |
173 | %{_appdir}/reports | |
174 | %{_appdir}/rpc | |
9748a8c3 ER |
175 | %{_appdir}/templates |
176 | ||
94bd779f | 177 | %dir %attr(750,http,root) %{_appdir}/locks |
9748a8c3 ER |
178 | |
179 | %dir %{_appdir}/include | |
180 | %{_appdir}/include/customer | |
181 | %{_appdir}/include/jpgraph | |
182 | %{_appdir}/include/pear | |
183 | %{_appdir}/include/Smarty | |
184 | %{_appdir}/include/workflow | |
185 | %{_appdir}/include/class.* | |
186 | %{_appdir}/include/db_access.php | |
187 | %{_appdir}/include/jsrsServer.inc.php | |
188 | %attr(640,http,root) %{_appdir}/include/private_key.php | |
189 | ||
94bd779f ER |
190 | %dir %attr(731,root,http) %{_appdir}/logs |
191 | %attr(640,http,root) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/logs/* | |
9748a8c3 ER |
192 | |
193 | %dir %attr(750,http,root) %{_appdir}/templates_c | |
ab983aaa ER |
194 | |
195 | %files setup | |
196 | %defattr(644,root,root,755) | |
197 | %{_appdir}/setup |