]>
Commit | Line | Data |
---|---|---|
0f20e17a | 1 | # TODO |
9e24368f | 2 | # - sync pl |
dbb1fd84 | 3 | # - localization fix in files |
0f20e17a ER |
4 | # - 21:07:41 jtiai> set htdocs_location in trac ini to for example /trac-htdocs/ |
5 | Summary: Integrated SCM, Wiki, Issue tracker and project environment | |
47a3b94a | 6 | Summary(pl.UTF-8): Zintegrowane scm, wiki, system śledzenia problemów i środowisko projektowe |
be2fe1cb | 7 | Name: trac |
3b1f09a1 | 8 | Version: 1.0.2 |
06a9df01 | 9 | Release: 2 |
912a70d9 | 10 | License: BSD-like |
be2fe1cb | 11 | Group: Applications/WWW |
9e24368f | 12 | Source0: http://download.edgewall.org/trac/Trac-%{version}.tar.gz |
3b1f09a1 | 13 | # Source0-md5: 392d07ea1d4351c6737b8c51de7dbe0b |
37007b41 | 14 | Source1: %{name}-apache.conf |
1c5d42d5 | 15 | Source2: %{name}-lighttpd.conf |
0f20e17a | 16 | Source4: %{name}.ini |
4130e9e1 | 17 | Source5: %{name}-enableplugin.py |
4f32014a | 18 | Source6: %{name}-upgrade.py |
85f76536 | 19 | Patch0: %{name}-root2http.patch |
0f20e17a | 20 | Patch1: %{name}-defaults.patch |
4f32014a | 21 | Patch2: inherit-global-%{name}.ini.patch |
4e0337ef | 22 | Patch3: silvercity-javascript-mimetypes.patch |
946c1fc2 | 23 | Patch4: pyc.patch |
17673b57 | 24 | URL: http://trac.edgewall.org/ |
6a22b1f6 ER |
25 | BuildRequires: python >= 1:2.5 |
26 | BuildRequires: python-babel >= 0.9.6 | |
abda2260 | 27 | BuildRequires: python-devel >= 1:2.1 |
6a22b1f6 | 28 | BuildRequires: python-genshi >= 0.6 |
06a9df01 | 29 | BuildRequires: python-setuptools |
1942426d | 30 | BuildRequires: rpm-pythonprov |
d08ef4ca | 31 | BuildRequires: rpmbuild(macros) >= 1.268 |
0f20e17a | 32 | BuildRequires: sed >= 4.0 |
402a82a9 | 33 | #Requires: apache(mod_env) || lighttpd-mod_fastcgi |
513bfdfe | 34 | Requires: group(http) |
6a22b1f6 | 35 | Requires: jquery >= 1.4 |
ad92d51e | 36 | Requires: python-clearsilver >= 0.9.3 |
0e6aff62 | 37 | Requires: python-trac = %{version}-%{release} |
ee41bc55 | 38 | Requires: webapps |
79192d6f | 39 | Requires: webserver(access) |
1c5d42d5 | 40 | Requires: webserver(alias) |
6fb233a5 | 41 | Requires: webserver(cgi) |
402a82a9 ER |
42 | Requires: webserver(mime) |
43 | Requires: webserver(rewrite) | |
06a9df01 | 44 | Suggests: webserver(auth) |
6fb233a5 ZU |
45 | # TODO |
46 | # If apache is the webserver, apache-mod_python is required! What can do? | |
2448b4bd | 47 | #Suggests: apache-mod_python >= 3.1.3 |
9e24368f | 48 | Suggests: git-core |
ca39209f | 49 | #Suggests: lighttpd-mod_fastcgi |
0f20e17a | 50 | #Suggests: python-textile >= 2.0 |
9e24368f | 51 | Obsoletes: trac-plugin-git |
0f20e17a | 52 | Obsoletes: trac-plugin-webadmin |
be2fe1cb ER |
53 | BuildArch: noarch |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
0f20e17a | 56 | %define _appdir %{_datadir}/%{name} |
ee41bc55 ER |
57 | %define _webapps /etc/webapps |
58 | %define _webapp %{name} | |
59 | %define _sysconfdir %{_webapps}/%{_webapp} | |
be2fe1cb ER |
60 | |
61 | %description | |
9e24368f ER |
62 | Trac is an enhanced wiki and issue tracking system for software |
63 | development projects. Trac uses a minimalistic approach to web-based | |
64 | software project management. | |
65 | ||
66 | It provides an interface to Subversion (or other version control | |
67 | systems), an integrated Wiki and convenient reporting facilities. | |
be2fe1cb | 68 | |
f440bb42 JR |
69 | %description -l pl.UTF-8 |
70 | Trac to minimalistyczny, oparty na WWW zarządca projektów i system | |
71 | śledzenia błędów/problemów. Dostarcza interfejs do systemu kontroli | |
72 | wersji Subversion, zintegrowane wiki, elastyczne śledzenie problemów i | |
73 | wygodne ułatwienia do raportowania. | |
ad92d51e | 74 | |
0e6aff62 ER |
75 | %package -n python-trac |
76 | Summary: Trac Python modules | |
77 | Group: Development/Languages/Python | |
ffe7050a CM |
78 | Requires: python >= 1:2.4 |
79 | Requires: python-genshi >= 0.6 | |
06a9df01 ER |
80 | # python-setuptools for pkg_resources module |
81 | Requires: python-setuptools | |
00923156 | 82 | Requires: python-sqlite >= 2.5.5 |
3e2c8d46 | 83 | Requires: python-subversion >= 1.2.0 |
8b1266ff | 84 | Suggests: python-babel >= 0.9.5 |
ffe7050a CM |
85 | Suggests: python-docutils >= 0.6 |
86 | Suggests: python-pygments >= 0.6 | |
8b1266ff CM |
87 | Suggests: python-pytz |
88 | Conflicts: trac < 0.11.7-3 | |
0e6aff62 ER |
89 | |
90 | %description -n python-trac | |
91 | Trac Python modules. | |
92 | ||
be2fe1cb | 93 | %prep |
0f20e17a | 94 | %setup -q -n Trac-%{version} |
85f76536 | 95 | %patch0 -p1 |
0f20e17a | 96 | %patch1 -p1 |
c64f2e3f | 97 | %patch2 -p1 |
4e0337ef | 98 | %patch3 -p1 |
946c1fc2 | 99 | %patch4 -p1 |
be2fe1cb | 100 | |
317f2b10 | 101 | # using system jquery package |
6a22b1f6 | 102 | %{__rm} trac/htdocs/js/jquery.js |
317f2b10 | 103 | |
3e2c8d46 | 104 | %build |
3e2c8d46 ER |
105 | %{__python} setup.py build |
106 | ||
be2fe1cb ER |
107 | %install |
108 | rm -rf $RPM_BUILD_ROOT | |
4f32014a | 109 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/var/lib/%{name},%{_datadir}/%{name}/{plugins,templates}} |
0f20e17a | 110 | %{__python} setup.py install \ |
d2ba9334 | 111 | --skip-build \ |
6c45077b | 112 | --optimize=2 \ |
be2fe1cb ER |
113 | --root=$RPM_BUILD_ROOT |
114 | ||
6a22b1f6 ER |
115 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
116 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
117 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
4130e9e1 ER |
118 | |
119 | # utility script to enable extra plugins | |
4f32014a ER |
120 | install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/%{name}-enableplugin |
121 | # handle upgrades | |
122 | install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/%{name}-upgrade | |
0f20e17a ER |
123 | |
124 | # keep paths from 0.10 install, we want fixed paths so we do not have to update | |
125 | # webserver config each time with the upgrade. | |
126 | install -d $RPM_BUILD_ROOT%{_appdir}/cgi-bin | |
127 | mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/trac,%{_appdir}}/htdocs | |
a3457cf4 | 128 | |
17673b57 ER |
129 | rm $RPM_BUILD_ROOT%{_appdir}/htdocs/README |
130 | ||
6a22b1f6 | 131 | install -p contrib/cgi-bin/trac.* $RPM_BUILD_ROOT%{_appdir}/cgi-bin |
0f20e17a | 132 | |
6a22b1f6 | 133 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/trac.ini |
37007b41 | 134 | > $RPM_BUILD_ROOT%{_sysconfdir}/htpasswd |
be2fe1cb | 135 | |
049e4193 | 136 | # remove .py files, leave just compiled ones. |
0f20e17a | 137 | %py_postclean |
049e4193 | 138 | |
dbb1fd84 | 139 | # we don't need these runtime |
dbb1fd84 ER |
140 | rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/tests |
141 | ||
88b09893 ER |
142 | # collect lang files |
143 | echo "%dir %{_appdir}/htdocs/js/messages" > %{name}.lang | |
144 | for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/js/messages/*.js; do | |
145 | f=${a##*/} | |
146 | l=${f%.js} | |
147 | echo "%lang($l) ${a#$RPM_BUILD_ROOT}" | |
148 | done >> %{name}.lang | |
149 | ||
6a22b1f6 | 150 | # TODO: move to %{_localedir} as trac.mo catalog |
88b09893 | 151 | echo "%dir %{py_sitescriptdir}/trac/locale" >> %{name}.lang |
6a22b1f6 | 152 | for a in $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/locale/*/LC_MESSAGES; do |
88b09893 ER |
153 | d=${a%%/LC_MESSAGES*} |
154 | l=${d##*/} | |
155 | echo "%lang($l) ${d#$RPM_BUILD_ROOT}" | |
156 | done >> %{name}.lang | |
157 | ||
be2fe1cb ER |
158 | %clean |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
0d28f3b0 | 161 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
ee41bc55 | 162 | %webapp_register apache %{_webapp} |
da452a1b | 163 | |
0d28f3b0 | 164 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
ee41bc55 | 165 | %webapp_unregister apache %{_webapp} |
da452a1b | 166 | |
b34b3cd2 | 167 | %triggerin -- apache < 2.2.0, apache-base |
ee41bc55 | 168 | %webapp_register httpd %{_webapp} |
37007b41 | 169 | |
b34b3cd2 | 170 | %triggerun -- apache < 2.2.0, apache-base |
ee41bc55 | 171 | %webapp_unregister httpd %{_webapp} |
da452a1b | 172 | |
1c5d42d5 ER |
173 | %triggerin -- lighttpd |
174 | %webapp_register lighttpd %{_webapp} | |
175 | ||
176 | %triggerun -- lighttpd | |
177 | %webapp_unregister lighttpd %{_webapp} | |
178 | ||
da452a1b | 179 | %post |
37007b41 | 180 | if [ "$1" = 1 ]; then |
940b9b89 | 181 | %banner %{name} -e <<EOF |
37007b41 ER |
182 | |
183 | To create new trac environment run as root: | |
184 | # trac-admin /var/lib/trac/project initenv | |
185 | and chown -R it to webserver user (http). | |
be2fe1cb | 186 | |
37007b41 ER |
187 | EOF |
188 | #' | |
be2fe1cb | 189 | |
37007b41 ER |
190 | # NOTE(s) |
191 | #- we made the parent directory (/var/lib/trac) g+s, but db/* files | |
192 | # needed to be really writable for web user, so better suggest | |
193 | # chown -R than chmod single file(s)? | |
194 | ||
195 | fi | |
196 | ||
88b09893 | 197 | %files -f %{name}.lang |
be2fe1cb | 198 | %defattr(644,root,root,755) |
c29d4731 | 199 | %doc AUTHORS ChangeLog INSTALL README THANKS UPGRADE |
0e6aff62 | 200 | %doc contrib |
ee41bc55 | 201 | %dir %attr(750,root,http) %{_sysconfdir} |
37007b41 | 202 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
ee41bc55 | 203 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf |
1c5d42d5 | 204 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
37007b41 | 205 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/htpasswd |
0f20e17a | 206 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/trac.ini |
ee41bc55 | 207 | |
4f32014a ER |
208 | %attr(755,root,root) %{_sbindir}/trac-enableplugin |
209 | %attr(755,root,root) %{_sbindir}/trac-upgrade | |
0f20e17a | 210 | %attr(755,root,root) %{_bindir}/tracd |
be2fe1cb | 211 | |
0f20e17a | 212 | #%{_mandir}/man1/trac*.1* |
37007b41 | 213 | |
0f20e17a ER |
214 | %dir %{_appdir} |
215 | %dir %{_appdir}/cgi-bin | |
a3457cf4 ER |
216 | %attr(755,root,root) %{_appdir}/cgi-bin/trac.cgi |
217 | %attr(755,root,root) %{_appdir}/cgi-bin/trac.fcgi | |
88b09893 | 218 | %dir %{_appdir}/htdocs |
17673b57 ER |
219 | %dir %{_appdir}/plugins |
220 | %dir %{_appdir}/templates | |
88b09893 ER |
221 | %{_appdir}/htdocs/*.gif |
222 | %{_appdir}/htdocs/*.ico | |
223 | %{_appdir}/htdocs/*.png | |
224 | %{_appdir}/htdocs/css | |
225 | %{_appdir}/htdocs/guide | |
226 | ||
227 | %dir %{_appdir}/htdocs/js | |
228 | %{_appdir}/htdocs/js/*.js | |
37007b41 | 229 | |
c64f2e3f ER |
230 | # keep upgrade data in main pkg only |
231 | %{py_sitescriptdir}/trac/upgrades | |
232 | ||
0f20e17a ER |
233 | # project data is stored there |
234 | %attr(2770,root,http) %dir /var/lib/trac | |
0e6aff62 ER |
235 | |
236 | %files -n python-trac | |
237 | %defattr(644,root,root,755) | |
ac34825c | 238 | %attr(755,root,root) %{_bindir}/trac-admin |
dbb1fd84 | 239 | |
ac34825c | 240 | %dir %{py_sitescriptdir}/%{name} |
dbb1fd84 ER |
241 | %{py_sitescriptdir}/trac/*.py[co] |
242 | %dir %{py_sitescriptdir}/trac/locale | |
243 | %{py_sitescriptdir}/trac/admin | |
244 | %{py_sitescriptdir}/trac/db | |
245 | %{py_sitescriptdir}/trac/mimeview | |
246 | %{py_sitescriptdir}/trac/prefs | |
247 | %{py_sitescriptdir}/trac/search | |
248 | %{py_sitescriptdir}/trac/templates | |
249 | %{py_sitescriptdir}/trac/ticket | |
250 | %{py_sitescriptdir}/trac/timeline | |
251 | %{py_sitescriptdir}/trac/util | |
252 | %{py_sitescriptdir}/trac/versioncontrol | |
253 | %{py_sitescriptdir}/trac/web | |
254 | %{py_sitescriptdir}/trac/wiki | |
255 | ||
e7a45985 | 256 | %{py_sitescriptdir}/%{name}opt |
0e6aff62 | 257 | %{py_sitescriptdir}/Trac-*.egg-info |