3 # - localization fix in files
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
6 Summary(pl.UTF-8): Zintegrowane scm, wiki, system śledzenia problemów i środowisko projektowe
9 # release notes: https://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.0#MaintenanceRelease
13 Group: Applications/WWW
14 Source0: https://download.edgewall.org/trac/Trac-%{version}.tar.gz
15 # Source0-md5: f0f498064fe295e1bd1993749f86d0ee
16 Source1: %{name}-apache.conf
17 Source2: %{name}-lighttpd.conf
19 Source5: %{name}-enableplugin.py
20 Source6: %{name}-upgrade.py
21 Patch0: %{name}-root2http.patch
22 Patch1: %{name}-defaults.patch
23 Patch2: inherit-global-%{name}.ini.patch
24 Patch3: silvercity-javascript-mimetypes.patch
26 URL: https://trac.edgewall.org/
27 BuildRequires: python >= 1:2.5
28 BuildRequires: python-babel >= 0.9.6
29 BuildRequires: python-devel >= 1:2.1
30 BuildRequires: python-genshi >= 0.6
31 BuildRequires: python-setuptools
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.713
34 BuildRequires: sed >= 4.0
35 #Requires: apache(mod_env) || lighttpd-mod_fastcgi
37 Requires: jquery >= 1.4
38 Requires: python-clearsilver >= 0.9.3
39 Requires: python-trac = %{version}-%{release}
41 Requires: webserver(access)
42 Requires: webserver(alias)
43 Requires: webserver(cgi)
44 Requires: webserver(mime)
45 Requires: webserver(rewrite)
46 Suggests: webserver(auth)
48 # If apache is the webserver, apache-mod_python is required! What can do?
49 #Suggests: apache-mod_python >= 3.1.3
51 #Suggests: lighttpd-mod_fastcgi
52 #Suggests: python-textile >= 2.0
53 Obsoletes: trac-plugin-git
54 Obsoletes: trac-plugin-webadmin
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _appdir %{_datadir}/%{name}
59 %define _webapps /etc/webapps
60 %define _webapp %{name}
61 %define _sysconfdir %{_webapps}/%{_webapp}
64 Trac is an enhanced wiki and issue tracking system for software
65 development projects. Trac uses a minimalistic approach to web-based
66 software project management.
68 It provides an interface to Subversion (or other version control
69 systems), an integrated Wiki and convenient reporting facilities.
71 %description -l pl.UTF-8
72 Trac to minimalistyczny, oparty na WWW zarządca projektów i system
73 śledzenia błędów/problemów. Dostarcza interfejs do systemu kontroli
74 wersji Subversion, zintegrowane wiki, elastyczne śledzenie problemów i
75 wygodne ułatwienia do raportowania.
77 %package -n python-trac
78 Summary: Trac Python modules
79 Group: Development/Languages/Python
80 Requires: python >= 1:2.4
81 Requires: python-genshi >= 0.6
82 # python-setuptools for pkg_resources module
83 Requires: python-setuptools
84 Requires: python-sqlite >= 2.5.5
85 Requires: python-subversion >= 1.2.0
86 Suggests: python-babel >= 0.9.5
87 Suggests: python-docutils >= 0.6
88 Suggests: python-pygments >= 0.6
90 Conflicts: trac < 0.11.7-3
92 %description -n python-trac
96 %setup -q -n Trac-%{version}
103 # using system jquery package
104 %{__rm} trac/htdocs/js/jquery.js
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/var/lib/%{name},%{_datadir}/%{name}/{plugins,templates}}
114 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
115 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
116 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
118 # utility script to enable extra plugins
119 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/%{name}-enableplugin
121 install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/%{name}-upgrade
123 # keep paths from 0.10 install, we want fixed paths so we do not have to update
124 # webserver config each time with the upgrade.
125 install -d $RPM_BUILD_ROOT%{_appdir}/cgi-bin
126 mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/trac,%{_appdir}}/htdocs
128 rm $RPM_BUILD_ROOT%{_appdir}/htdocs/README
130 install -p contrib/cgi-bin/trac.* $RPM_BUILD_ROOT%{_appdir}/cgi-bin
132 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/trac.ini
133 > $RPM_BUILD_ROOT%{_sysconfdir}/htpasswd
135 # remove .py files, leave just compiled ones.
138 # we don't need these runtime
139 rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/tests
142 echo "%dir %{_appdir}/htdocs/js/messages" > %{name}.lang
143 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/js/messages/*.js; do
146 echo "%lang($l) ${a#$RPM_BUILD_ROOT}"
149 # TODO: move to %{_localedir} as trac.mo catalog
150 echo "%dir %{py_sitescriptdir}/trac/locale" >> %{name}.lang
151 for a in $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/locale/*/LC_MESSAGES; do
152 d=${a%%/LC_MESSAGES*}
154 echo "%lang($l) ${d#$RPM_BUILD_ROOT}"
158 rm -rf $RPM_BUILD_ROOT
160 %triggerin -- apache1 < 1.3.37-3, apache1-base
161 %webapp_register apache %{_webapp}
163 %triggerun -- apache1 < 1.3.37-3, apache1-base
164 %webapp_unregister apache %{_webapp}
166 %triggerin -- apache < 2.2.0, apache-base
167 %webapp_register httpd %{_webapp}
169 %triggerun -- apache < 2.2.0, apache-base
170 %webapp_unregister httpd %{_webapp}
172 %triggerin -- lighttpd
173 %webapp_register lighttpd %{_webapp}
175 %triggerun -- lighttpd
176 %webapp_unregister lighttpd %{_webapp}
179 if [ "$1" = 1 ]; then
180 %banner %{name} -e <<EOF
182 To create new trac environment run as root:
183 # trac-admin /var/lib/trac/project initenv
184 and chown -R it to webserver user (http).
190 #- we made the parent directory (/var/lib/trac) g+s, but db/* files
191 # needed to be really writable for web user, so better suggest
192 # chown -R than chmod single file(s)?
196 %files -f %{name}.lang
197 %defattr(644,root,root,755)
198 %doc AUTHORS ChangeLog INSTALL README THANKS UPGRADE
200 %dir %attr(750,root,http) %{_sysconfdir}
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
203 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
204 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/htpasswd
205 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/trac.ini
207 %attr(755,root,root) %{_sbindir}/trac-enableplugin
208 %attr(755,root,root) %{_sbindir}/trac-upgrade
209 %attr(755,root,root) %{_bindir}/tracd
211 #%{_mandir}/man1/trac*.1*
214 %dir %{_appdir}/cgi-bin
215 %attr(755,root,root) %{_appdir}/cgi-bin/trac.cgi
216 %attr(755,root,root) %{_appdir}/cgi-bin/trac.fcgi
217 %dir %{_appdir}/htdocs
218 %dir %{_appdir}/plugins
219 %dir %{_appdir}/templates
220 %{_appdir}/htdocs/*.gif
221 %{_appdir}/htdocs/*.ico
222 %{_appdir}/htdocs/*.png
223 %{_appdir}/htdocs/css
224 %{_appdir}/htdocs/guide
226 %dir %{_appdir}/htdocs/js
227 %{_appdir}/htdocs/js/*.js
229 # keep upgrade data in main pkg only
230 %{py_sitescriptdir}/trac/upgrades
232 # project data is stored there
233 %attr(2770,root,http) %dir /var/lib/trac
235 %files -n python-trac
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_bindir}/trac-admin
239 %dir %{py_sitescriptdir}/%{name}
240 %{py_sitescriptdir}/trac/*.py[co]
241 %dir %{py_sitescriptdir}/trac/locale
242 %{py_sitescriptdir}/trac/admin
243 %{py_sitescriptdir}/trac/db
244 %{py_sitescriptdir}/trac/mimeview
245 %{py_sitescriptdir}/trac/prefs
246 %{py_sitescriptdir}/trac/search
247 %{py_sitescriptdir}/trac/templates
248 %{py_sitescriptdir}/trac/ticket
249 %{py_sitescriptdir}/trac/timeline
250 %{py_sitescriptdir}/trac/util
251 %{py_sitescriptdir}/trac/versioncontrol
252 %{py_sitescriptdir}/trac/web
253 %{py_sitescriptdir}/trac/wiki
255 %{py_sitescriptdir}/%{name}opt
256 %{py_sitescriptdir}/Trac-*.egg-info