]> git.pld-linux.org Git - packages/trac.git/blame - trac.spec
use python-setuptools over distribute
[packages/trac.git] / trac.spec
CommitLineData
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/
5Summary: Integrated SCM, Wiki, Issue tracker and project environment
47a3b94a 6Summary(pl.UTF-8): Zintegrowane scm, wiki, system śledzenia problemów i środowisko projektowe
be2fe1cb 7Name: trac
3b1f09a1 8Version: 1.0.2
06a9df01 9Release: 2
912a70d9 10License: BSD-like
be2fe1cb 11Group: Applications/WWW
9e24368f 12Source0: http://download.edgewall.org/trac/Trac-%{version}.tar.gz
3b1f09a1 13# Source0-md5: 392d07ea1d4351c6737b8c51de7dbe0b
37007b41 14Source1: %{name}-apache.conf
1c5d42d5 15Source2: %{name}-lighttpd.conf
0f20e17a 16Source4: %{name}.ini
4130e9e1 17Source5: %{name}-enableplugin.py
4f32014a 18Source6: %{name}-upgrade.py
85f76536 19Patch0: %{name}-root2http.patch
0f20e17a 20Patch1: %{name}-defaults.patch
4f32014a 21Patch2: inherit-global-%{name}.ini.patch
4e0337ef 22Patch3: silvercity-javascript-mimetypes.patch
946c1fc2 23Patch4: pyc.patch
17673b57 24URL: http://trac.edgewall.org/
6a22b1f6
ER
25BuildRequires: python >= 1:2.5
26BuildRequires: python-babel >= 0.9.6
abda2260 27BuildRequires: python-devel >= 1:2.1
6a22b1f6 28BuildRequires: python-genshi >= 0.6
06a9df01 29BuildRequires: python-setuptools
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)
6a22b1f6 35Requires: jquery >= 1.4
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 41Requires: webserver(cgi)
402a82a9
ER
42Requires: webserver(mime)
43Requires: webserver(rewrite)
06a9df01 44Suggests: 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 48Suggests: git-core
ca39209f 49#Suggests: lighttpd-mod_fastcgi
0f20e17a 50#Suggests: python-textile >= 2.0
9e24368f 51Obsoletes: trac-plugin-git
0f20e17a 52Obsoletes: trac-plugin-webadmin
be2fe1cb
ER
53BuildArch: noarch
54BuildRoot: %{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
62Trac is an enhanced wiki and issue tracking system for software
63development projects. Trac uses a minimalistic approach to web-based
64software project management.
65
66It provides an interface to Subversion (or other version control
67systems), an integrated Wiki and convenient reporting facilities.
be2fe1cb 68
f440bb42
JR
69%description -l pl.UTF-8
70Trac to minimalistyczny, oparty na WWW zarządca projektów i system
71śledzenia błędów/problemów. Dostarcza interfejs do systemu kontroli
72wersji Subversion, zintegrowane wiki, elastyczne śledzenie problemów i
73wygodne ułatwienia do raportowania.
ad92d51e 74
0e6aff62
ER
75%package -n python-trac
76Summary: Trac Python modules
77Group: Development/Languages/Python
ffe7050a
CM
78Requires: python >= 1:2.4
79Requires: python-genshi >= 0.6
06a9df01
ER
80# python-setuptools for pkg_resources module
81Requires: python-setuptools
00923156 82Requires: python-sqlite >= 2.5.5
3e2c8d46 83Requires: python-subversion >= 1.2.0
8b1266ff 84Suggests: python-babel >= 0.9.5
ffe7050a
CM
85Suggests: python-docutils >= 0.6
86Suggests: python-pygments >= 0.6
8b1266ff
CM
87Suggests: python-pytz
88Conflicts: trac < 0.11.7-3
0e6aff62
ER
89
90%description -n python-trac
91Trac 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
108rm -rf $RPM_BUILD_ROOT
4f32014a 109install -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
115cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
116cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
117cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
4130e9e1
ER
118
119# utility script to enable extra plugins
4f32014a
ER
120install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/%{name}-enableplugin
121# handle upgrades
122install -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.
126install -d $RPM_BUILD_ROOT%{_appdir}/cgi-bin
127mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/trac,%{_appdir}}/htdocs
a3457cf4 128
17673b57
ER
129rm $RPM_BUILD_ROOT%{_appdir}/htdocs/README
130
6a22b1f6 131install -p contrib/cgi-bin/trac.* $RPM_BUILD_ROOT%{_appdir}/cgi-bin
0f20e17a 132
6a22b1f6 133cp -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
140rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/tests
141
88b09893
ER
142# collect lang files
143echo "%dir %{_appdir}/htdocs/js/messages" > %{name}.lang
144for 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}"
148done >> %{name}.lang
149
6a22b1f6 150# TODO: move to %{_localedir} as trac.mo catalog
88b09893 151echo "%dir %{py_sitescriptdir}/trac/locale" >> %{name}.lang
6a22b1f6 152for 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}"
156done >> %{name}.lang
157
be2fe1cb
ER
158%clean
159rm -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 180if [ "$1" = 1 ]; then
940b9b89 181%banner %{name} -e <<EOF
37007b41
ER
182
183To create new trac environment run as root:
184# trac-admin /var/lib/trac/project initenv
185and chown -R it to webserver user (http).
be2fe1cb 186
37007b41
ER
187EOF
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
195fi
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
This page took 0.260308 seconds and 4 git commands to generate.