[packages/golang-github-shurcooL-sanitized_anchor_name] new, git checkout at 10ef21a
glen
glen at pld-linux.org
Mon May 2 18:24:12 CEST 2016
commit d3b717b102f0d399fb791dfe2bd6b86be28568e8
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon May 2 19:23:22 2016 +0300
new, git checkout at 10ef21a
based on fedora package, a04d3c6
golang-github-shurcooL-sanitized_anchor_name.spec | 72 +++++++++++++++++++++++
1 file changed, 72 insertions(+)
---
diff --git a/golang-github-shurcooL-sanitized_anchor_name.spec b/golang-github-shurcooL-sanitized_anchor_name.spec
new file mode 100644
index 0000000..235230c
--- /dev/null
+++ b/golang-github-shurcooL-sanitized_anchor_name.spec
@@ -0,0 +1,72 @@
+#
+# Conditional build:
+%bcond_without src # build devel package with sources
+%bcond_without tests # build without tests
+
+%define rel 1
+%define commit 10ef21a
+%define pkgname sanitized_anchor_name
+Summary: Package sanitized_anchor_name provides a func to create sanitized anchor names
+Name: golang-github-shurcooL-%{pkgname}
+Version: 0
+Release: %{rel}.%{commit}
+License: MIT
+Group: Libraries
+Source0: https://github.com/shurcooL/sanitized_anchor_name/archive/%{commit}/sanitized_anchor_name-%{commit}.tar.gz
+# Source0-md5: 4c5e1f92888b9553363c2e94151aa1f0
+URL: https://github.com/shurcooL/sanitized_anchor_name
+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/shurcooL/%{pkgname}
+
+%description
+%{summary}
+
+%package devel
+Summary: %{summary}
+Provides: golang(%{import_path}) = %{version}-%{release}
+BuildArch: noarch
+
+%description devel
+%{summary}
+
+This package contains library source intended for building other
+packages which use import path with %{import_path} prefix.
+
+%prep
+%setup -qc -n %{pkgname}-%{commit}
+mv %{pkgname}-*/* .
+
+%build
+%if %{with test}
+export GOPATH=$(pwd):%{gopath}
+
+go test %{import_path}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with src}
+# find all *.go but no *_test.go files and generate devel.file-list
+for file in $(find . -iname "*.go" \! -iname "*_test.go"); do
+ echo "%dir %{gopath}/src/%{import_path}/$(dirname $file)" >> devel.file-list
+ install -d -p $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$(dirname $file)
+ cp -pav $file $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$file
+ echo "%{gopath}/src/%{import_path}/$file" >> devel.file-list
+done
+sort -u -o devel.file-list devel.file-list
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with src}
+%files devel -f devel.file-list
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%dir %{gopath}/src/github.com
+%dir %{gopath}/src/github.com/shurcooL
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/golang-github-shurcooL-sanitized_anchor_name.git/commitdiff/d3b717b102f0d399fb791dfe2bd6b86be28568e8
More information about the pld-cvs-commit
mailing list