diff --git a/skopeo.spec b/skopeo.spec index 11f6b04..cf5ac11 100644 --- a/skopeo.spec +++ b/skopeo.spec @@ -1,3 +1,9 @@ +%if 0%{?rhel} >= 7 && ! 0%{?fedora} +%define gobuild(o:) \ +GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; +%endif + + %global with_devel 0 %global with_bundled 1 %global with_unit_test 0 @@ -53,8 +59,6 @@ Source10: containers-transports.5.md Source11: containers-certs.d.5.md Source12: containers-registries.d.5.md -BuildRequires: go-srpm-macros -BuildRequires: go-rpm-macros %if 0%{?fedora} BuildRequires: btrfs-progs-devel BuildRequires: pkgconfig(devmapper) @@ -62,7 +66,7 @@ BuildRequires: ostree-devel %endif BuildRequires: git # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} +BuildRequires: golang BuildRequires: go-md2man BuildRequires: gpgme-devel BuildRequires: libassuan-devel @@ -278,6 +282,10 @@ export GOPATH=$(pwd) export GOPATH=$(pwd):$(pwd)/vendor %endif +%if ! 0%{?fedora} +export BUILDTAGS="containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_btrfs" +%endif + %gobuild -o %{name} ./cmd/%{name} %{__make} docs