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