|
|
84fbf9b |
%global forgeurl https://pagure.io/go-rpm-macros
|
|
|
031bb4b |
Version: 3.0.9
|
|
|
84fbf9b |
%forgemeta
|
|
|
84fbf9b |
|
|
|
84fbf9b |
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
|
|
|
84fbf9b |
%global _spectemplatedir %{_datadir}/rpmdevtools/fedora
|
|
|
84fbf9b |
%global _docdir_fmt %{name}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
# Master definition that will be written to macro files
|
|
|
84fbf9b |
%global golang_arches %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
|
|
|
84fbf9b |
%global gccgo_arches %{mips}
|
|
|
84fbf9b |
# Go sources can contain arch-specific files and our macros will package the
|
|
|
84fbf9b |
# correct files for each architecture. Therefore, move gopath to _libdir and
|
|
|
84fbf9b |
# make Go devel packages archful
|
|
|
84fbf9b |
%global gopath %{_datadir}/gocode
|
|
|
84fbf9b |
|
|
|
84fbf9b |
ExclusiveArch: %{golang_arches} %{gccgo_arches}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
Name: go-rpm-macros
|
|
|
031bb4b |
Release: 1%{?dist}
|
|
|
84fbf9b |
Summary: Build-stage rpm automation for Go packages
|
|
|
84fbf9b |
|
|
|
84fbf9b |
License: GPLv3+
|
|
|
84fbf9b |
URL: %{forgeurl}
|
|
|
84fbf9b |
Source: %{forgesource}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
Requires: go-srpm-macros = %{version}-%{release}
|
|
|
84fbf9b |
Requires: go-filesystem = %{version}-%{release}
|
|
|
84fbf9b |
Requires: golist
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%ifarch %{golang_arches}
|
|
|
84fbf9b |
Requires: golang
|
|
|
84fbf9b |
Provides: compiler(golang)
|
|
|
84fbf9b |
Provides: compiler(go-compiler) = 2
|
|
|
84fbf9b |
Obsoletes: go-compilers-golang-compiler < %{version}-%{release}
|
|
|
84fbf9b |
%endif
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%ifarch %{gccgo_arches}
|
|
|
84fbf9b |
Requires: gcc-go
|
|
|
84fbf9b |
Provides: compiler(gcc-go)
|
|
|
84fbf9b |
Provides: compiler(go-compiler) = 1
|
|
|
84fbf9b |
Obsoletes: go-compilers-gcc-go-compiler < %{version}-%{release}
|
|
|
84fbf9b |
%endif
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%description
|
|
|
84fbf9b |
This package provides build-stage rpm automation to simplify the creation of Go
|
|
|
84fbf9b |
language (golang) packages.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
It does not need to be included in the default build root: go-srpm-macros will
|
|
|
84fbf9b |
pull it in for Go packages only.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%package -n go-srpm-macros
|
|
|
84fbf9b |
Summary: Source-stage rpm automation for Go packages
|
|
|
84fbf9b |
BuildArch: noarch
|
|
|
84fbf9b |
Requires: redhat-rpm-config
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%description -n go-srpm-macros
|
|
|
84fbf9b |
This package provides SRPM-stage rpm automation to simplify the creation of Go
|
|
|
84fbf9b |
language (golang) packages.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
It limits itself to the automation subset required to create Go SRPM packages
|
|
|
84fbf9b |
and needs to be included in the default build root.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
The rest of the automation is provided by the go-rpm-macros package, that
|
|
|
84fbf9b |
go-srpm-macros will pull in for Go packages only.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%package -n go-filesystem
|
|
|
84fbf9b |
Summary: Directories used by Go packages
|
|
|
84fbf9b |
License: Public Domain
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%description -n go-filesystem
|
|
|
84fbf9b |
This package contains the basic directory layout used by Go packages.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%package -n go-rpm-templates
|
|
|
84fbf9b |
Summary: RPM spec templates for Go packages
|
|
|
84fbf9b |
License: MIT
|
|
|
84fbf9b |
BuildArch: noarch
|
|
|
84fbf9b |
Requires: go-rpm-macros = %{version}-%{release}
|
|
|
84fbf9b |
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
|
|
|
84fbf9b |
#Requires: redhat-rpm-templates
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%description -n go-rpm-templates
|
|
|
84fbf9b |
This package contains documented rpm spec templates showcasing how to use the
|
|
|
84fbf9b |
macros provided by go-rpm-macros to create Go packages.
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%prep
|
|
|
84fbf9b |
%forgesetup
|
|
|
84fbf9b |
%writevars -f rpm/macros.d/macros.go-srpm golang_arches gccgo_arches gopath
|
|
|
84fbf9b |
for template in templates/rpm/*\.spec ; do
|
|
|
84fbf9b |
target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g")
|
|
|
84fbf9b |
grep -v '^#' "${template}" > "${target}"
|
|
|
84fbf9b |
touch -r "${template}" "${target}"
|
|
|
84fbf9b |
done
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%install
|
|
|
84fbf9b |
# Some of those probably do not work with gcc-go right now
|
|
|
84fbf9b |
# This is not intentional, but mips is not a primary Fedora architecture
|
|
|
84fbf9b |
# Patches and PRs are welcome
|
|
|
84fbf9b |
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{gopath}/src
|
|
|
84fbf9b |
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{_spectemplatedir}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
install -m 0644 -vp templates/rpm/*spec \
|
|
|
84fbf9b |
%{buildroot}%{_spectemplatedir}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
|
84fbf9b |
install -m 0755 bin/* %{buildroot}%{_bindir}
|
|
|
84fbf9b |
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{rpmmacrodir}
|
|
|
84fbf9b |
install -m 0644 -vp rpm/macros.d/macros.go-* \
|
|
|
84fbf9b |
%{buildroot}%{rpmmacrodir}
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/srpm
|
|
|
84fbf9b |
install -m 0644 -vp rpm/lua/srpm/*lua \
|
|
|
84fbf9b |
%{buildroot}%{_rpmluadir}/fedora/srpm
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/rpm
|
|
|
84fbf9b |
install -m 0644 -vp rpm/lua/rpm/*lua \
|
|
|
84fbf9b |
%{buildroot}%{_rpmluadir}/fedora/rpm
|
|
|
84fbf9b |
install -m 0755 -vd %{buildroot}%{_rpmconfigdir}/fileattrs
|
|
|
84fbf9b |
install -m 0644 -vp rpm/fileattrs/*.attr \
|
|
|
84fbf9b |
%{buildroot}%{_rpmconfigdir}/fileattrs/
|
|
|
84fbf9b |
install -m 0755 -vp rpm/*\.{prov,deps} \
|
|
|
84fbf9b |
%{buildroot}%{_rpmconfigdir}/
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%ifarch %{golang_arches}
|
|
|
84fbf9b |
install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang \
|
|
|
84fbf9b |
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-golang
|
|
|
84fbf9b |
%endif
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%ifarch %{gccgo_arches}
|
|
|
84fbf9b |
install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
|
|
|
84fbf9b |
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-gcc
|
|
|
84fbf9b |
%endif
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%files
|
|
|
84fbf9b |
%license LICENSE.txt
|
|
|
84fbf9b |
%doc README.md
|
|
|
84fbf9b |
%{_bindir}/*
|
|
|
84fbf9b |
%{_rpmconfigdir}/fileattrs/*.attr
|
|
|
84fbf9b |
%{_rpmconfigdir}/*.prov
|
|
|
84fbf9b |
%{_rpmconfigdir}/*.deps
|
|
|
84fbf9b |
%{_rpmconfigdir}/macros.d/macros.go-rpm*
|
|
|
84fbf9b |
%{_rpmconfigdir}/macros.d/macros.go-compiler*
|
|
|
84fbf9b |
%{_rpmluadir}/fedora/rpm/*.lua
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%files -n go-srpm-macros
|
|
|
84fbf9b |
%license LICENSE.txt
|
|
|
84fbf9b |
%doc README.md
|
|
|
84fbf9b |
%{_rpmconfigdir}/macros.d/macros.go-srpm
|
|
|
84fbf9b |
%{_rpmluadir}/fedora/srpm/*.lua
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%files -n go-filesystem
|
|
|
84fbf9b |
%dir %{gopath}
|
|
|
84fbf9b |
%dir %{gopath}/src
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%files -n go-rpm-templates
|
|
|
84fbf9b |
%license LICENSE-templates.txt
|
|
|
84fbf9b |
%doc README.md
|
|
|
84fbf9b |
# https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
|
|
|
84fbf9b |
%dir %{dirname:%{_spectemplatedir}}
|
|
|
84fbf9b |
%dir %{_spectemplatedir}
|
|
|
84fbf9b |
%{_spectemplatedir}/*.spec
|
|
|
84fbf9b |
|
|
|
84fbf9b |
%changelog
|
|
|
031bb4b |
* Thu Aug 13 2020 Neal Gompa <ngompa13@gmail.com> - 3.0.9-1
|
|
|
031bb4b |
- Update to 3.0.9
|
|
|
031bb4b |
|
|
|
4645a16 |
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-6
|
|
|
4645a16 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
4645a16 |
|
|
|
65c8799 |
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-5
|
|
|
65c8799 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
65c8799 |
|
|
|
e832455 |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-4
|
|
|
e832455 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
e832455 |
|
|
|
84fbf9b |
* Wed Jun 05 2019 Nicolas Mailhot <nim@fedoraproject.org>
|
|
|
84fbf9b |
- 3.0.8-3
|
|
|
84fbf9b |
- initial Fedora import, for golist 0.10.0 and redhat-rpm-config 130
|