[projects/template-specs] update go template

glen glen at pld-linux.org
Mon May 2 18:26:16 CEST 2016


commit 9e1ccb8fb26f8f45d844b9716623890fba570801
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon May 2 19:25:19 2016 +0300

    update go template

 go-package.spec | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)
---
diff --git a/go-package.spec b/go-package.spec
index 5f912de..a0a68d7 100644
--- a/go-package.spec
+++ b/go-package.spec
@@ -1,10 +1,16 @@
+#
+# Conditional build:
+%bcond_without	src		# build devel package with sources
+%bcond_without	tests	# build without tests
+
+%define		pkgname		template
 Summary:	-
 Summary(pl.UTF-8):	-
-Name:		go-package
+Name:		golang-github-template-%{pkgname}
 Version:	_
 Release:	0.1
 License:	- (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
-Group:		Applications
+Group:		Libraries
 Source0:	%{name}-%{version}.tar.gz
 # Source0-md5:	-
 URL:		-
@@ -12,11 +18,28 @@ BuildRequires:	golang >= 1.3.1
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_enable_debug_packages 0
+%define		gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
+%define		gopath		%{_libdir}/golang
+%define		import_path	github.com/russross/%{pkgname}
 
 %description
 A package written in go language
 
-%description -l pl.UTF-8
+%package devel
+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
+
+%description devel
+%{summary}
+
+This package contains library source intended for building other
+packages which use import path with %{import_path} prefix.
 
 %prep
 %setup -q
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/8c087412eaa4d5500a1699e18dc29fe9b9a84894



More information about the pld-cvs-commit mailing list