]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
update go template
authorElan Ruusamäe <glen@delfi.ee>
Mon, 2 May 2016 16:25:19 +0000 (19:25 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 2 May 2016 16:25:19 +0000 (19:25 +0300)
go-package.spec

index 5f912dede197f9e8ac512dc3e4828b19ca3356fd..a0a68d7ee4cc6be6f349c471a22db034e2abd1fe 100644 (file)
@@ -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
This page took 0.416644 seconds and 4 git commands to generate.