%global debug_package %{nil} %global import_path github.com/jmhodges/levigo %global gopath %{_datadir}/gocode %global commit 4f0dc981fe8b958acbeb40ae1befefff1651fabe %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: golang-github-levigo Version: 0 Release: 0.1.0.git%{shortcommit}%{?dist} Summary: Go wrapper for LevelDB License: MIT URL: http://%{import_path} Source0: https://%{import_path}/archive/%{commit}/levigo-%{shortcommit}.tar.gz %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 BuildArch: noarch %else ExclusiveArch: %{go_arches} %endif %description levigo is a Go wrapper for LevelDB. %package devel Requires: golang Requires: leveldb >= 1.7 Summary: Go wrapper for LevelDB Provides: golang(%{import_path}) = %{version}-%{release} %description devel %{summary} This package contains library source intended for building other packages which use this library. %prep %setup -q -n levigo-%{commit} %build %install install -d %{buildroot}/%{gopath}/src/%{import_path} cp -va *.go %{buildroot}/%{gopath}/src/%{import_path}/ %files devel %doc LICENSE examples/ %dir %attr(755,root,root) %{gopath}/src/%{import_path} %{gopath}/src/%{import_path}/*.go %changelog * Sat Jul 26 2014 Eduardo Mayorga Téllez - 0-0.3.git4f0dc98 - Initial packaging