]> git.pld-linux.org Git - projects/template-specs.git/blame - golang-package.spec
php-pecl: use modname macro in provides by default
[projects/template-specs.git] / golang-package.spec
CommitLineData
9e1ccb8f
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 template
4e856b2a
ER
7Summary: -
8Summary(pl.UTF-8): -
9e1ccb8f 9Name: golang-github-template-%{pkgname}
4e856b2a
ER
10Version: _
11Release: 0.1
12License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
9e1ccb8f 13Group: Libraries
4e856b2a
ER
14Source0: %{name}-%{version}.tar.gz
15# Source0-md5: -
16URL: -
17BuildRequires: golang >= 1.3.1
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%define _enable_debug_packages 0
9e1ccb8f
ER
21%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
22%define gopath %{_libdir}/golang
23%define import_path github.com/russross/%{pkgname}
4e856b2a
ER
24
25%description
26A package written in go language
27
9e1ccb8f
ER
28%package devel
29Summary: %{summary}
30Group: Development/Languages
31#Requires: golang(github.com/../...)
32Provides: golang(%{import_path}) = %{version}-%{release}
33# noarch subpackages only when building with rpm5
34%if "%{_rpmversion}" >= "5"
35BuildArch: noarch
36%endif
37
38%description devel
39%{summary}
40
41This package contains library source intended for building other
42packages which use import path with %{import_path} prefix.
4e856b2a
ER
43
44%prep
45%setup -q
46
57e15cf3
ER
47install -d src/$(dirname %{import_path})
48ln -s ../../.. src/%{import_path}
49
4e856b2a 50%build
57e15cf3
ER
51export GOPATH=$(pwd)
52
3073cb6f 53%gobuild -o bin/%{name}
4e856b2a
ER
54
55%install
56rm -rf $RPM_BUILD_ROOT
3073cb6f
ER
57install -d $RPM_BUILD_ROOT%{_bindir}
58install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}
4e856b2a
ER
59
60%clean
61rm -rf $RPM_BUILD_ROOT
62
63%files
64%defattr(644,root,root,755)
65%doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
This page took 0.169459 seconds and 4 git commands to generate.