]> git.pld-linux.org Git - packages/golang-github-russross-blackfriday.git/blame - golang-github-russross-blackfriday.spec
- it's not noarch, gopath is in libdir
[packages/golang-github-russross-blackfriday.git] / golang-github-russross-blackfriday.spec
CommitLineData
44eacf93
ER
1#
2# Conditional build:
3%bcond_without src # build devel package with sources
4%bcond_without tests # build without tests
5
6%define pkgname blackfriday
7Summary: Markdown processor implemented in Go
8Name: golang-github-russross-%{pkgname}
964088ec 9Version: 1.4
a69d8e0f 10Release: 2
44eacf93
ER
11License: BSD
12Group: Libraries
13Source0: https://github.com/russross/blackfriday/archive/v%{version}/blackfriday-%{version}.tar.gz
964088ec 14# Source0-md5: e66233912216753cc1b39875b81b74e2
44eacf93
ER
15URL: https://github.com/russross/blackfriday
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%define _enable_debug_packages 0
19%define gopath %{_libdir}/golang
20%define import_path github.com/russross/%{pkgname}
21
22%description
23%{summary}.
24
25%package devel
26Summary: %{summary}
27Group: Development/Languages
28Requires: golang(github.com/shurcooL/sanitized_anchor_name)
29Provides: golang(%{import_path}) = %{version}-%{release}
44eacf93
ER
30
31%description devel
32%{summary}
33
34This package contains library source intended for building other
35packages which use import path with %{import_path} prefix.
36
37%prep
38%setup -q -n %{pkgname}-%{version}
39
40%build
41export GOPATH=$(pwd):%{gopath}
42
43%if %{with test}
44go test %{import_path}
45%endif
46
47%install
48rm -rf $RPM_BUILD_ROOT
49
50%if %{with src}
51# find all *.go but no *_test.go files and generate devel.file-list
52for file in $(find -iname "*.go" '!' -iname "*_test.go") ; do
53 install -d -p $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$(dirname $file)
54 cp -pav $file $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$file
55 echo "%{gopath}/src/%{import_path}/$file" >> devel.file-list
56done
57%endif
58
59%clean
60rm -rf $RPM_BUILD_ROOT
61
62%if %{with src}
63%files devel -f devel.file-list
64%defattr(644,root,root,755)
65%doc README.md
66%dir %{gopath}/src/github.com
67%dir %{gopath}/src/github.com/russross
68%dir %{gopath}/src/%{import_path}
69%endif
This page took 0.029714 seconds and 4 git commands to generate.