Debian Codegraph @

imagebuilder.spec

raw
1
2 #debuginfo not supported with Go
3 %global debug_package %{nil}
4
5 # modifying the Go binaries breaks the DWARF debugging
6 %global __os_install_post %{_rpmconfigdir}/brp-compress
7
8 %{!?commit: %global commit HEAD }
9
10 #
11 # Customize from here.
12 #
13
14 %global golang_version 1.19
15 %{!?version: %global version 1.2.22}
16 %{!?release: %global release 1}
17 %global package_name imagebuilder
18 %global product_name Container Image Builder
19 %global import_path github.com/openshift/imagebuilder
20
21 Name: %{package_name}
22 Version: %{version}
23 Release: %{release}%{?dist}
24 Summary: Builds Dockerfile using the Docker client
25 License: ASL 2.0
26 URL: https://%{import_path}
27
28 Source0: https://%{import_path}/archive/%{commit}/%{name}-%{version}.tar.gz
29 BuildRequires: golang >= %{golang_version}
30
31 ### AUTO-BUNDLED-GEN-ENTRY-POINT
32
33 %description
34 Builds Dockerfile using the Docker client
35
36 %prep
37 GOPATH=$RPM_BUILD_DIR/go
38 rm -rf $GOPATH
39 mkdir -p $GOPATH/{src/github.com/openshift,bin,pkg}
40 %setup -q -c -n imagebuilder
41 cd ..
42 mv imagebuilder $GOPATH/src/github.com/openshift/imagebuilder
43 ln -s $GOPATH/src/github.com/openshift/imagebuilder imagebuilder
44
45 %build
46 export GOPATH=$RPM_BUILD_DIR/go
47 cd $GOPATH/src/github.com/openshift/imagebuilder
48 go install ./cmd/imagebuilder
49
50 %install
51
52 install -d %{buildroot}%{_bindir}
53 install -p -m 755 $RPM_BUILD_DIR/go/bin/imagebuilder %{buildroot}%{_bindir}/imagebuilder
54
55 %files
56 %doc README.md
57 %license LICENSE
58 %{_bindir}/imagebuilder
59
60 %pre
61
62 %changelog
63