peco-vl.spec 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. %global provider github
  2. %global provider_tld com
  3. %global project peco
  4. %global repo peco
  5. # https://github.com/peco/peco
  6. %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
  7. %global import_path %{provider_prefix}
  8. #%global commit none
  9. #%global shortcommit %(c=%{commit}; echo ${c:0:7})
  10. Name: peco
  11. Version: 0.3.5
  12. Release: 1%{?dist}
  13. Summary: Simplistic interactive filtering tool
  14. License: MIT
  15. URL: https://%{import_path}
  16. Source0: https://github.com/peco/peco/archive/v%{version}.tar.gz#/peco-%{version}.tar.gz
  17. Patch0: peco-0.3.5_make.patch
  18. BuildRequires: golang
  19. BuildRequires: golang(github.com/google/btree)
  20. BuildRequires: golang(github.com/mattn/go-runewidth)
  21. BuildRequires: golang(github.com/jessevdk/go-flags)
  22. BuildRequires: golang(github.com/nsf/termbox-go)
  23. Vendor: Project Vine
  24. Distribution: Vine Linux
  25. Packager: iwaim
  26. # If go_arches not defined fall through to implicit golang archs
  27. %if 0%{?go_arches:1}
  28. ExclusiveArch: %{go_arches}
  29. %else
  30. ExclusiveArch: %{ix86} x86_64 %{arm}
  31. %endif
  32. %description
  33. %{summary}.
  34. %prep
  35. %setup -q -n %{repo}-%{version}
  36. %patch0 -p1
  37. %build
  38. export GOPATH=$(pwd):%{gopath}
  39. %__mkdir_p src/github.com/peco/peco
  40. %__ln_s $(pwd)/internal src/github.com/peco/peco/
  41. go build -o make build/make.go
  42. ./make build-single
  43. %install
  44. rm -rf ${RPM_BUILD_ROOT}
  45. mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
  46. %__install -m 0755 ./peco/peco ${RPM_BUILD_ROOT}%{_bindir}
  47. %files
  48. %doc LICENSE
  49. %doc README.md Changes
  50. %{_bindir}/peco
  51. %changelog
  52. * Sun Jan 24 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.5-1
  53. - initial build for Vine Linux