]> git.pld-linux.org Git - packages/golang-github-russross-blackfriday.git/blob - golang-github-russross-blackfriday.spec
616fe749b90c7fc04141bfddac0ebbb06d095924
[packages/golang-github-russross-blackfriday.git] / golang-github-russross-blackfriday.spec
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
7 Summary:        Markdown processor implemented in Go
8 Name:           golang-github-russross-%{pkgname}
9 Version:        1.4
10 Release:        1
11 License:        BSD
12 Group:          Libraries
13 Source0:        https://github.com/russross/blackfriday/archive/v%{version}/blackfriday-%{version}.tar.gz
14 # Source0-md5:  e66233912216753cc1b39875b81b74e2
15 URL:            https://github.com/russross/blackfriday
16 BuildRoot:      %{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
26 Summary:        %{summary}
27 Group:          Development/Languages
28 Requires:       golang(github.com/shurcooL/sanitized_anchor_name)
29 Provides:       golang(%{import_path}) = %{version}-%{release}
30 %if "%{_rpmversion}" >= "5"
31 BuildArch:      noarch
32 %endif
33
34 %description devel
35 %{summary}
36
37 This package contains library source intended for building other
38 packages which use import path with %{import_path} prefix.
39
40 %prep
41 %setup -q -n %{pkgname}-%{version}
42
43 %build
44 export GOPATH=$(pwd):%{gopath}
45
46 %if %{with test}
47 go test %{import_path}
48 %endif
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 %if %{with src}
54 # find all *.go but no *_test.go files and generate devel.file-list
55 for file in $(find -iname "*.go" '!' -iname "*_test.go") ; do
56         install -d -p $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$(dirname $file)
57         cp -pav $file $RPM_BUILD_ROOT%{gopath}/src/%{import_path}/$file
58         echo "%{gopath}/src/%{import_path}/$file" >> devel.file-list
59 done
60 %endif
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %if %{with src}
66 %files devel -f devel.file-list
67 %defattr(644,root,root,755)
68 %doc README.md
69 %dir %{gopath}/src/github.com
70 %dir %{gopath}/src/github.com/russross
71 %dir %{gopath}/src/%{import_path}
72 %endif
This page took 0.061214 seconds and 2 git commands to generate.