[packages/golang-github-russross-blackfriday] new, version 1.2
glen
glen at pld-linux.org
Mon May 2 18:25:10 CEST 2016
commit 44eacf934d240a958d88ce808b5285a99fbcd0c6
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon May 2 19:24:44 2016 +0300
new, version 1.2
based on fedora package, 7cffdbe
golang-github-russross-blackfriday.spec | 72 +++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
---
diff --git a/golang-github-russross-blackfriday.spec b/golang-github-russross-blackfriday.spec
new file mode 100644
index 0000000..8bdde81
--- /dev/null
+++ b/golang-github-russross-blackfriday.spec
@@ -0,0 +1,72 @@
+#
+# Conditional build:
+%bcond_without src # build devel package with sources
+%bcond_without tests # build without tests
+
+%define pkgname blackfriday
+Summary: Markdown processor implemented in Go
+Name: golang-github-russross-%{pkgname}
+Version: 1.2
+Release: 1
+License: BSD
+Group: Libraries
+Source0: https://github.com/russross/blackfriday/archive/v%{version}/blackfriday-%{version}.tar.gz
+# Source0-md5: e06be10cbdddbf5d8ddf68f5a9d98622
+URL: https://github.com/russross/blackfriday
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _enable_debug_packages 0
+%define gopath %{_libdir}/golang
+%define import_path github.com/russross/%{pkgname}
+
+%description
+%{summary}.
+
+%package devel
+Summary: %{summary}
+Group: Development/Languages
+Requires: golang(github.com/shurcooL/sanitized_anchor_name)
+Provides: golang(%{import_path}) = %{version}-%{release}
+%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 -n %{pkgname}-%{version}
+
+%build
+export GOPATH=$(pwd):%{gopath}
+
+%if %{with test}
+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
+ 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
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with src}
+%files devel -f devel.file-list
+%defattr(644,root,root,755)
+%doc README.md
+%dir %{gopath}/src/github.com
+%dir %{gopath}/src/github.com/russross
+%dir %{gopath}/src/%{import_path}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/golang-github-russross-blackfriday.git/commitdiff/44eacf934d240a958d88ce808b5285a99fbcd0c6
More information about the pld-cvs-commit
mailing list