]> git.pld-linux.org Git - packages/minio.git/blame - minio.spec
minio: update to 2016-12-13T17-19-42Z release. (#3)
[packages/minio.git] / minio.spec
CommitLineData
0d188968 1%define tag RELEASE.2016-12-13T17-19-42Z
38464fd3 2%define subver %(echo %{tag} | sed -e 's/[^0-9]//g')
9748ba0c 3# git fetch https://github.com/minio/minio.git refs/tags/RELEASE.2016-11-26T02-23-47Z
c308e728 4# git rev-list -n 1 FETCH_HEAD
0d188968 5%define commitid 29d72b84c07f9555f83a6485fe8291e18d23811b
e51a1b91 6Summary: Object Storage Server
38464fd3 7Name: minio
e846e373 8Version: 0.0.%{subver}
c308e728 9Release: 1
38464fd3
ER
10License: Apache v2.0
11Group: Development/Building
bbc80942 12Source0: https://github.com/minio/minio/archive/%{tag}.tar.gz
0d188968 13# Source0-md5: 7126649e03cc41901e502ab944f4d253
38464fd3 14URL: https://www.minio.io/
0d188968 15BuildRequires: golang >= 1.7
38464fd3
ER
16ExclusiveArch: %{ix86} %{x8664} %{arm}
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19# go stuff
c308e728
ER
20%define _enable_debug_packages 0
21%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
bbc80942
ER
22%define gopath %{_libdir}/golang
23%define import_path github.com/minio/minio
38464fd3
ER
24
25%description
e51a1b91
H
26Minio is an object storage server released under Apache License v2.0.
27It API compatible with Amazon S3 cloud storage service.
38464fd3
ER
28
29%prep
30%setup -qc
bbc80942
ER
31mv %{name}-*/* .
32
33install -d src/$(dirname %{import_path})
34ln -s ../../.. src/%{import_path}
38464fd3
ER
35
36%build
bbc80942 37export GOPATH=$(pwd)
38464fd3 38export GOROOT=%{_libdir}/golang
c308e728
ER
39
40# setup flags like 'go run buildscripts/gen-ldflags.go' would do
41tag=%{tag}
42version=${tag#RELEASE.}
43commitid=%{commitid}
44scommitid=$(echo $commitid | cut -c1-12)
45prefix=%{import_path}/cmd
46
47LDFLAGS="
48-X $prefix.Version=$version
49-X $prefix.ReleaseTag=$tag
50-X $prefix.CommitID=$commitid
51-X $prefix.ShortCommitID=$scommitid
52"
53
bbc80942 54%gobuild -o %{name}
38464fd3 55
c308e728
ER
56# check that version set properly
57./%{name} version | tee v
58
59#Version: 2016-09-11T17-42-18Z
60#Release-Tag: RELEASE.2016-09-11T17-42-18Z
61#Commit-ID: 85e2d886bcb005d49f3876d6849a2b5a55e03cd3
62v=$(awk '/Version:/{print $2}' v)
63test "$v" = $version
64v=$(awk '/Release-Tag:/{print $2}' v)
65test "$v" = $tag
66v=$(awk '/Commit-ID:/{print $2}' v)
67test "$v" = $commitid
68
38464fd3
ER
69%install
70rm -rf $RPM_BUILD_ROOT
bbc80942
ER
71install -d $RPM_BUILD_ROOT%{_sbindir}
72install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
38464fd3
ER
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%files
78%defattr(644,root,root,755)
79%doc *.md
bbc80942 80%attr(755,root,root) %{_sbindir}/minio
This page took 0.038863 seconds and 4 git commands to generate.