]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - trac-plugin.spec
- drop alt_kernel<>build_kernels conflict error, build_kernels will always take prece...
[projects/template-specs.git] / trac-plugin.spec
index 7e9d47a337e4e2cc96d43ba746865c5b39574bc0..7d66a308042891d99a47a98688619276e2aa3d5c 100644 (file)
@@ -1,17 +1,18 @@
-%define                trac_ver        0.11
+%define                trac_ver        0.12
 %define                plugin          PLUGIN_NAME
 Summary:       PLUGIN_NAME Plugin for Trac
 Name:          trac-plugin-%{plugin}
 Version:       0.1
 Release:       0.1
-License:       BSD-like
+License:       BSD-like / GPL / ...
 Group:         Applications/WWW
-# Source0Download:     http://trac-hacks.org/changeset/latest/wikirenameplugin?old_path=/&filename=wikirenameplugin&format=zip
-Source0:       %{plugin}plugin.zip
+Source0:       http://trac-hacks.org/changeset/latest/tracsqlhelperscript?old_path=/&format=zip#/%{plugin}-%{version}.zip
 # Source0-md5: 9f706e733d205d4467ce6534772cb505
 URL:           http://trac-hacks.org/wiki/PLUGIN_NAME
 BuildRequires: python-devel
 Requires:      trac >= %{trac_ver}
+# for trac 0.11:
+#Requires:     trac >= %{trac_ver}.7-3
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -19,17 +20,20 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %prep
 %setup -q -n %{plugin}plugin
+%setup -q -n trac%{plugin}plugin
+%setup -qc
+mv %{plugin}plugin/%{trac_ver}/* .
+mv %{trac_ver}/* .
 
 %build
-cd %{plugin}/%{version}
-cd %{trac_ver}
 %{__python} setup.py build
 %{__python} setup.py egg_info
 
+ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
+test "$ver" = %{version}
+
 %install
 rm -rf $RPM_BUILD_ROOT
-cd %{trac_ver}
-cd %{plugin}/%{version}
 %{__python} setup.py install \
        --single-version-externally-managed \
        --optimize 2 \
@@ -41,14 +45,8 @@ cd %{plugin}/%{version}
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ "$1" = "1" ]; then
-       %banner -e %{name} <<-'EOF'
-       To enable the %{plugin} plugin, add to conf/trac.ini:
-
-       [components]
-       %{plugin}.* = enabled
-EOF
-fi
+# XXX: try to figure out from .egg-info / __init__py at build time
+#trac-enableplugin "%{plugin}.Trac%{plugin}Module"
 
 %files
 %defattr(644,root,root,755)
This page took 0.027019 seconds and 4 git commands to generate.