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