1 |
joequant |
860068 |
%global debug_package %{nil} |
2 |
|
|
%global provider github |
3 |
|
|
%global provider_tld com |
4 |
|
|
%global project howeyc |
5 |
|
|
%global repo gopass |
6 |
|
|
# https://github.com/howeyc/gopass |
7 |
|
|
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} |
8 |
|
|
%global commit 2c70fa70727c953c51695f800f25d6b44abb368e |
9 |
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7}) |
10 |
|
|
|
11 |
daviddavid |
1950708 |
%define rel 0.2 |
12 |
|
|
|
13 |
joequant |
860068 |
Name: golang-%{provider}-%{project}-%{repo} |
14 |
|
|
Version: 0 |
15 |
daviddavid |
1950708 |
Release: %mkrel %{rel}.git%{shortcommit} |
16 |
|
|
Summary: Getpasswd for Go |
17 |
joequant |
860068 |
License: ISC |
18 |
|
|
URL: https://%{import_path} |
19 |
|
|
Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz |
20 |
|
|
BuildArch: noarch |
21 |
|
|
Group: Development/Other |
22 |
|
|
|
23 |
|
|
%description |
24 |
|
|
%{summary} |
25 |
|
|
|
26 |
|
|
%package devel |
27 |
|
|
Summary: %{summary} |
28 |
|
|
|
29 |
|
|
BuildRequires: golang >= 1.2.1-3 |
30 |
|
|
BuildRequires: golang(golang.org/x/crypto/ssh/terminal) |
31 |
|
|
|
32 |
|
|
Requires: golang(golang.org/x/crypto/ssh/terminal) |
33 |
|
|
|
34 |
|
|
Provides: golang(%{import_path}) = %{version}-%{release} |
35 |
|
|
|
36 |
|
|
%description devel |
37 |
|
|
%{summary} |
38 |
|
|
|
39 |
|
|
This package contains library source intended for |
40 |
|
|
building other packages which use %{project}/%{repo}. |
41 |
|
|
|
42 |
|
|
%prep |
43 |
|
|
|
44 |
|
|
%setup -q -n %{repo}-%{commit} |
45 |
|
|
|
46 |
|
|
%build |
47 |
|
|
|
48 |
|
|
%install |
49 |
|
|
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ |
50 |
|
|
cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}/ |
51 |
|
|
|
52 |
|
|
# copy directories |
53 |
|
|
for file in ./* ; do |
54 |
|
|
if [ -d $file ]; then |
55 |
|
|
cp -rpav $file %{buildroot}%{gopath}/src/%{import_path}/ |
56 |
|
|
fi |
57 |
|
|
done |
58 |
|
|
|
59 |
|
|
%check |
60 |
|
|
|
61 |
|
|
|
62 |
|
|
%files devel |
63 |
|
|
%if 0%{?fedora} |
64 |
|
|
%license LICENSE.txt |
65 |
|
|
%doc README.md |
66 |
|
|
%else |
67 |
|
|
%doc README.md LICENSE.txt |
68 |
|
|
%endif |
69 |
|
|
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} |
70 |
|
|
%{gopath}/src/%{import_path} |
71 |
|
|
|