]> git.pld-linux.org Git - packages/trac.git/blob - trac.spec
c0ba9d1c6d1da92f21a679a2fbe8d1d51f8d5964
[packages/trac.git] / trac.spec
1 # TODO
2 # - sync pl
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
7 Name:           trac
8 # 1.1.x line is devel
9 Version:        1.0.11
10 Release:        1
11 License:        BSD-like
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
17 Source4:        %{name}.ini
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
24 Patch4:         pyc.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
35 Requires:       group(http)
36 Requires:       jquery >= 1.4
37 Requires:       python-clearsilver >= 0.9.3
38 Requires:       python-trac = %{version}-%{release}
39 Requires:       webapps
40 Requires:       webserver(access)
41 Requires:       webserver(alias)
42 Requires:       webserver(cgi)
43 Requires:       webserver(mime)
44 Requires:       webserver(rewrite)
45 Suggests:       webserver(auth)
46 # TODO
47 # If apache is the webserver, apache-mod_python is required! What can do?
48 #Suggests:      apache-mod_python >= 3.1.3
49 Suggests:       git-core
50 #Suggests:      lighttpd-mod_fastcgi
51 #Suggests:      python-textile >= 2.0
52 Obsoletes:      trac-plugin-git
53 Obsoletes:      trac-plugin-webadmin
54 BuildArch:      noarch
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %define         _appdir         %{_datadir}/%{name}
58 %define         _webapps        /etc/webapps
59 %define         _webapp         %{name}
60 %define         _sysconfdir     %{_webapps}/%{_webapp}
61
62 %description
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.
66
67 It provides an interface to Subversion (or other version control
68 systems), an integrated Wiki and convenient reporting facilities.
69
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.
75
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
88 Suggests:       python-pytz
89 Conflicts:      trac < 0.11.7-3
90
91 %description -n python-trac
92 Trac Python modules.
93
94 %prep
95 %setup -q -n Trac-%{version}
96 %patch0 -p1
97 %patch1 -p1
98 %patch2 -p1
99 %patch3 -p1
100 %patch4 -p1
101
102 # using system jquery package
103 %{__rm} trac/htdocs/js/jquery.js
104
105 %build
106 %py_build
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/var/lib/%{name},%{_datadir}/%{name}/{plugins,templates}}
111 %py_install
112
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
116
117 # utility script to enable extra plugins
118 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/%{name}-enableplugin
119 # handle upgrades
120 install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/%{name}-upgrade
121
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
126
127 rm $RPM_BUILD_ROOT%{_appdir}/htdocs/README
128
129 install -p contrib/cgi-bin/trac.*  $RPM_BUILD_ROOT%{_appdir}/cgi-bin
130
131 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/trac.ini
132 > $RPM_BUILD_ROOT%{_sysconfdir}/htpasswd
133
134 # remove .py files, leave just compiled ones.
135 %py_postclean
136
137 # we don't need these runtime
138 rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/trac/tests
139
140 # collect lang files
141 echo "%dir %{_appdir}/htdocs/js/messages" > %{name}.lang
142 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/js/messages/*.js; do
143         f=${a##*/}
144         l=${f%.js}
145         echo "%lang($l) ${a#$RPM_BUILD_ROOT}"
146 done >> %{name}.lang
147
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*}
152         l=${d##*/}
153         echo "%lang($l) ${d#$RPM_BUILD_ROOT}"
154 done >> %{name}.lang
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %triggerin -- apache1 < 1.3.37-3, apache1-base
160 %webapp_register apache %{_webapp}
161
162 %triggerun -- apache1 < 1.3.37-3, apache1-base
163 %webapp_unregister apache %{_webapp}
164
165 %triggerin -- apache < 2.2.0, apache-base
166 %webapp_register httpd %{_webapp}
167
168 %triggerun -- apache < 2.2.0, apache-base
169 %webapp_unregister httpd %{_webapp}
170
171 %triggerin -- lighttpd
172 %webapp_register lighttpd %{_webapp}
173
174 %triggerun -- lighttpd
175 %webapp_unregister lighttpd %{_webapp}
176
177 %post
178 if [ "$1" = 1 ]; then
179 %banner %{name} -e <<EOF
180
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).
184
185 EOF
186 #'
187
188 # NOTE(s)
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)?
192
193 fi
194
195 %files -f %{name}.lang
196 %defattr(644,root,root,755)
197 %doc AUTHORS ChangeLog INSTALL README THANKS UPGRADE
198 %doc contrib
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
205
206 %attr(755,root,root) %{_sbindir}/trac-enableplugin
207 %attr(755,root,root) %{_sbindir}/trac-upgrade
208 %attr(755,root,root) %{_bindir}/tracd
209
210 #%{_mandir}/man1/trac*.1*
211
212 %dir %{_appdir}
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
224
225 %dir %{_appdir}/htdocs/js
226 %{_appdir}/htdocs/js/*.js
227
228 # keep upgrade data in main pkg only
229 %{py_sitescriptdir}/trac/upgrades
230
231 # project data is stored there
232 %attr(2770,root,http) %dir /var/lib/trac
233
234 %files -n python-trac
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_bindir}/trac-admin
237
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
253
254 %{py_sitescriptdir}/%{name}opt
255 %{py_sitescriptdir}/Trac-*.egg-info
This page took 0.056808 seconds and 2 git commands to generate.