]> git.pld-linux.org Git - projects/template-specs.git/blame - trac-plugin.spec
- modernized
[projects/template-specs.git] / trac-plugin.spec
CommitLineData
6a550c29 1%define trac_ver 0.12
7129cf30
ER
2%define plugin PLUGIN_NAME
3Summary: PLUGIN_NAME Plugin for Trac
4Name: trac-plugin-%{plugin}
5Version: 0.1
6Release: 0.1
ba0f112f 7License: BSD-like / GPL / ...
7129cf30 8Group: Applications/WWW
ba0f112f 9Source0: http://trac-hacks.org/changeset/latest/tracsqlhelperscript?old_path=/&filename=%{plugin}-%{version}&format=zip#/%{plugin}-%{version}.zip
7129cf30
ER
10# Source0-md5: 9f706e733d205d4467ce6534772cb505
11URL: http://trac-hacks.org/wiki/PLUGIN_NAME
12BuildRequires: python-devel
6a550c29 13Requires: trac >= %{trac_ver}
7129cf30
ER
14BuildArch: noarch
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%description
18
19%prep
20%setup -q -n %{plugin}plugin
e08d63d6 21%setup -q -n trac%{plugin}plugin
ba0f112f
ER
22%setup -qc
23mv %{plugin}plugin/%{trac_ver}/* .
7129cf30
ER
24
25%build
26cd %{plugin}/%{version}
27cd %{trac_ver}
28%{__python} setup.py build
29%{__python} setup.py egg_info
30
ba0f112f
ER
31ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
32test "$ver" = %{version}
33
7129cf30
ER
34%install
35rm -rf $RPM_BUILD_ROOT
7129cf30 36cd %{plugin}/%{version}
e08d63d6 37cd %{trac_ver}
7129cf30
ER
38%{__python} setup.py install \
39 --single-version-externally-managed \
40 --optimize 2 \
41 --root=$RPM_BUILD_ROOT
42
43%py_postclean
44
45%clean
46rm -rf $RPM_BUILD_ROOT
47
48%post
e08d63d6
ER
49# XXX: try to figure out from .egg-info / __init__py at build time
50trac-enableplugin %{plugin}.Trac%{plugin}Module
7129cf30
ER
51
52%files
53%defattr(644,root,root,755)
54%{py_sitescriptdir}/trac%{plugin}
55%{py_sitescriptdir}/*-*.egg-info
This page took 0.078232 seconds and 4 git commands to generate.