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