2 %define plugin componentdependency
3 Summary: Allows a component to state dependencies on other plugins
4 Name: trac-plugin-%{plugin}
8 Group: Applications/WWW
9 Source0: http://trac-hacks.org/changeset/latest/componentdependencyplugin?old_path=/&filename=%{plugin}-%{version}&format=zip#/%{plugin}-%{version}.zip
10 # Source0-md5: 3330fdc7e1f7f48037089f0a81485fa1
11 URL: http://trac-hacks.org/wiki/ComponentDependencyPlugin
12 BuildRequires: python-devel
13 BuildRequires: python-modules
14 BuildRequires: python-setuptools
15 BuildRequires: rpm-pythonprov
17 Requires: trac >= %{trac_ver}
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 ComponentDependencyPlugin allows a Component to state a dependency on
23 another Component, via the IRequireComponents interface from
24 componentdependencies.interface.
28 mv %{plugin}plugin/%{trac_ver}/* .
30 # do not autoload this
31 mv componentdependencies/test.py .
32 sed -i -e '/from test import/d' componentdependencies/__init__.py
35 %{__python} setup.py build
36 %{__python} setup.py egg_info
38 ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
39 test "$ver" = %{version}
42 rm -rf $RPM_BUILD_ROOT
43 %{__python} setup.py install \
44 --single-version-externally-managed \
46 --root=$RPM_BUILD_ROOT
51 rm -rf $RPM_BUILD_ROOT
53 # NOTE: no post registration needed, plugin not used directly
56 %defattr(644,root,root,755)
57 %{py_sitescriptdir}/componentdependencies
58 %{py_sitescriptdir}/*-*.egg-info