]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - golang-package.spec
- adjusted noarch subpackage rules and some descriptions, more pl
[projects/template-specs.git] / golang-package.spec
index a57337b32f87d3f5df2e5b77d3dbc0309e3fd324..bafb1b929fbff3fde365c54816fb84d76283d9cb 100644 (file)
@@ -15,6 +15,8 @@ Source0:      %{name}-%{version}.tar.gz
 # Source0-md5: -
 URL:           -
 BuildRequires: golang >= 1.3.1
+# if using noarchpackage
+#BuildRequires:        rpmbuild(macros) >= 1.752
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _enable_debug_packages 0
@@ -30,10 +32,7 @@ Summary:     %{summary}
 Group:         Development/Languages
 #Requires:     golang(github.com/../...)
 Provides:      golang(%{import_path}) = %{version}-%{release}
-# noarch subpackages only when building with rpm5
-%if "%{_rpmversion}" >= "5"
-BuildArch:     noarch
-%endif
+%{?noarchpackage}
 
 %description devel
 %{summary}
@@ -47,6 +46,10 @@ packages which use import path with %{import_path} prefix.
 install -d src/$(dirname %{import_path})
 ln -s ../../.. src/%{import_path}
 
+# alternative
+install -d src/$(dirname %{import_path})
+%{__mv} %{name}-%{version} src/%{import_path}
+
 %build
 export GOPATH=$(pwd)
 
This page took 0.104083 seconds and 4 git commands to generate.