# Generated by go2rpm 1.18.0 %bcond check 0 # https://github.com/distribution/distribution %global goipath github.com/distribution/distribution/v3 Version: 3.0.0 %gometa -L -f Name: docker-distribution Release: %autorelease Summary: The toolkit to pack, ship, store, and deliver container content # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: %{name}.service Source4: config.yml BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros %description The toolkit to pack, ship, store, and deliver container content. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # install systemd/init scripts install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0644 -vp %{SOURCE3} %{buildroot}%{_unitdir}/ # install config file install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name}/registry install -m 0644 -vp %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/registry/ # install root dir install -m 0755 -vd %{buildroot}%{_sharedstatedir}/registry %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs ADOPTERS.md AUTHORS BUILDING.md CODE-OF-CONDUCT.md CONTRIBUTING.md %doc GOVERNANCE.md README.md ROADMAP.md SECURITY.md %{_bindir}/digest %{_bindir}/registry %{_bindir}/registry-api-descriptor-template %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/registry %config(noreplace) %{_sysconfdir}/%{name}/registry/config.yml %{_unitdir}/%{name}.service %dir %{_sharedstatedir}/registry %changelog %autochangelog