1 | # Copyright (c) 2007-2010 Herbert Graeber
|
---|
2 | # 2009-2010 Pascal Bleser
|
---|
3 | # This file and all modifications and additions to the pristine
|
---|
4 | # package are under the same license as the package itself.
|
---|
5 | #
|
---|
6 | # Please submit bugfixes or comments to herbert@links2linux.de
|
---|
7 | # or pascal.bleser@opensuse.org
|
---|
8 |
|
---|
9 | # vim: set ts=4 sw=4 et:
|
---|
10 | # norootforbuild
|
---|
11 |
|
---|
12 | Name: trac
|
---|
13 | Version: 1.0
|
---|
14 | Release: 1
|
---|
15 | License: BSD 3-clause
|
---|
16 | Group: Development/Tools/Other
|
---|
17 | URL: http://trac.edgewall.com
|
---|
18 | # http://ftp.edgewall.com/pub/trac/Trac-%{version}.tar.gz
|
---|
19 | Source0: Trac-%{version}.tar.bz2
|
---|
20 | Source1: tracd.init
|
---|
21 | Source2: tracd.sysconfig
|
---|
22 | Source3: trac.conf
|
---|
23 | Source4: README.SUSE.html
|
---|
24 | #disabled: see also http://trac.edgewall.org/ticket/2417
|
---|
25 | #Patch1: trac-auth.patch
|
---|
26 | Source99: trac-rpmlintrc
|
---|
27 | Patch: allow-anonymous-form-posts-with-secure-auth-cookie.diff
|
---|
28 | Patch1: configure-preview-limit-by-mimetype.diff
|
---|
29 | Patch2: correct-wrapping-in-diff-stylesheet.diff
|
---|
30 | %if 0%{?suse_version} > 1110
|
---|
31 | BuildArch: noarch
|
---|
32 | %endif
|
---|
33 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
---|
34 | %if 0%{?suse_version} > 1020
|
---|
35 | BuildRequires: fdupes
|
---|
36 | %endif
|
---|
37 | BuildRequires: python-babel >= 0.9.5
|
---|
38 | BuildRequires: python-devel >= 2.3
|
---|
39 | BuildRequires: python-genshi >= 0.6
|
---|
40 | BuildRequires: python-setuptools >= 0.6
|
---|
41 | %py_requires
|
---|
42 | Requires: python-babel >= 0.9.5
|
---|
43 | Requires: python-genshi >= 0.6
|
---|
44 | Requires: python-pygments
|
---|
45 | Requires: python-setuptools >= 0.6
|
---|
46 | Requires: python-tz
|
---|
47 | Provides: trac-webadmin = 0.1.2-7
|
---|
48 | Obsoletes: trac-webadmin < 0.1.2-7
|
---|
49 | Summary: Integrated SCM, Wiki, Issue Tracker and Project Environment
|
---|
50 |
|
---|
51 | %description
|
---|
52 | Trac is a minimalistic web-based software project management and bug/issue
|
---|
53 | tracking system. It provides an interface to the Subversion revision control
|
---|
54 | systems, an integrated wiki, flexible issue tracking and convenient report
|
---|
55 | facilities.
|
---|
56 |
|
---|
57 | %package server
|
---|
58 | Group: Development/Tools/Other
|
---|
59 | PreReq: %insserv_prereq %fillup_prereq
|
---|
60 | Requires: %{name} = %{version}
|
---|
61 | Summary: Trac standalone Server
|
---|
62 |
|
---|
63 | %description server
|
---|
64 | The Trac standalone server. Do not use this for production.
|
---|
65 |
|
---|
66 | %prep
|
---|
67 | %setup -q -n "Trac-%{version}"
|
---|
68 | %patch
|
---|
69 | %patch1
|
---|
70 | #%patch1
|
---|
71 | %patch2
|
---|
72 | %__cp %{S:4} .
|
---|
73 | %__sed -i 's/\r//' contrib/trac-svn-post-commit-hook.cmd
|
---|
74 |
|
---|
75 | %build
|
---|
76 | CFLAGS="%{optflags}" %{__python} setup.py build
|
---|
77 | CFLAGS="%{optflags}" %{__python} setup.py compile_catalog
|
---|
78 |
|
---|
79 | %install
|
---|
80 | %__python setup.py install --root=%{buildroot} --prefix=%{_prefix} --record-rpm=INSTALLED_FILES
|
---|
81 | %__install -Dm 0755 contrib/cgi-bin/trac.cgi %{buildroot}%{_datadir}/%{name}/cgi-bin/trac.cgi
|
---|
82 | %__install -Dm 0755 contrib/cgi-bin/trac.fcgi %{buildroot}%{_datadir}/%{name}/cgi-bin/trac.fcgi
|
---|
83 | %__install -Dm 0644 %{S:3} %{buildroot}%{_sysconfdir}/apache2/conf.d/trac.conf
|
---|
84 | %__install -dm 0750 %{buildroot}/srv/trac
|
---|
85 | %__install -Dm 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/tracd
|
---|
86 | %__install -dm 0755 %{buildroot}%{_sbindir}
|
---|
87 | %__ln_s %{_sysconfdir}/init.d/tracd %{buildroot}%{_sbindir}/rctracd
|
---|
88 | %__install -Dm 0600 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.tracd
|
---|
89 |
|
---|
90 | %if 0%{?suse_version} > 1020
|
---|
91 | %fdupes %{buildroot}
|
---|
92 | %endif
|
---|
93 |
|
---|
94 | %pre
|
---|
95 | # save the trac.ini from /usr/share/trac/conf if it exists...
|
---|
96 | if [ "$1" -ge 2 ]; then
|
---|
97 | if [ \! -e %{_sysconfdir}/trac/trac.ini -a -r %{_datadir}/trac/conf/trac.ini ]; then
|
---|
98 | if [ \! -e %{_sysconfdir}/trac ]; then mkdir %{_sysconfdir}/trac; fi
|
---|
99 | mv %{_datadir}/trac/conf/trac.ini %{_sysconfdir}/trac/trac.ini.backup
|
---|
100 | fi
|
---|
101 | fi
|
---|
102 |
|
---|
103 | %preun server
|
---|
104 | %stop_on_removal tracd
|
---|
105 |
|
---|
106 | %postun server
|
---|
107 | %restart_on_update tracd
|
---|
108 | %insserv_cleanup
|
---|
109 |
|
---|
110 | %post
|
---|
111 | # ... and save it as new try.ini in /etc/trac.ini if this doesn't exist
|
---|
112 | if [ "$1" -ge 2 ]; then
|
---|
113 | if [ -r %{_sysconfdir}/trac/trac.ini.backup ]; then
|
---|
114 | mv %{_sysconfdir}/trac/trac.ini %{_sysconfdir}/trac/trac.ini.rpmnew
|
---|
115 | mv %{_sysconfdir}/trac/trac.ini.backup %{_sysconfdir}/trac/trac.ini
|
---|
116 | fi
|
---|
117 | fi
|
---|
118 |
|
---|
119 | %post server
|
---|
120 | %fillup_and_insserv -n tracd tracd
|
---|
121 |
|
---|
122 | %files -f INSTALLED_FILES
|
---|
123 | %defattr(-,root,root,-)
|
---|
124 | %doc AUTHORS ChangeLog COPYING README README.SUSE.html RELEASE THANKS UPGRADE contrib
|
---|
125 | %exclude %{_bindir}/tracd
|
---|
126 | %dir %{_sysconfdir}/apache2
|
---|
127 | %dir %{_sysconfdir}/apache2/conf.d
|
---|
128 | %config(noreplace) %{_sysconfdir}/apache2/conf.d/trac.conf
|
---|
129 | %{_datadir}/%{name}
|
---|
130 | %attr(0750,root,www) /srv/trac
|
---|
131 |
|
---|
132 | %files server
|
---|
133 | %defattr(-,root,root)
|
---|
134 | %{_sysconfdir}/init.d/tracd
|
---|
135 | %{_bindir}/tracd
|
---|
136 | %{_sbindir}/rctracd
|
---|
137 | %{_var}/adm/fillup-templates/sysconfig.tracd
|
---|
138 |
|
---|