fix provides, %pre, %post, %preun, %postun
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=127
This commit is contained in:
parent
5cd6240dc7
commit
0f6a8e0592
20
go.spec
20
go.spec
@ -46,10 +46,16 @@ BuildRequires: systemd
|
||||
BuildRequires: fdupes
|
||||
Recommends: go-doc
|
||||
%endif
|
||||
Provides: go = %{version}
|
||||
Provides: go-devel = %{version}
|
||||
Provides: go-devel-static = %{version}
|
||||
Obsoletes: go-devel < %{version}
|
||||
# We need to manually specify the release version string here. All code compiled
|
||||
# with this package will have the release string specified by the VERSION file
|
||||
# in this source tarball baked into it, libs compiled with a different version
|
||||
# cannot be linked anyway so all library packages will depend on this version string.
|
||||
# the version string is pulled into the %godepends macro using the "go version" command.
|
||||
%define goversion go1
|
||||
Provides: go = %{goversion}
|
||||
Provides: go-devel = %{goversion}
|
||||
Provides: go-devel-static = %{goversion}
|
||||
Obsoletes: go-devel < %{goversion}
|
||||
ExclusiveArch: %ix86 x86_64 %arm
|
||||
# For godoc service
|
||||
%if 0%{?suse_version} >= 1210
|
||||
@ -196,17 +202,17 @@ ln -s %{_datadir}/go/src/pkg/runtime/{cgocall,runtime}.h %{buildroot}%{_libdir}/
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_add_pre godoc.service
|
||||
%service_add_post godoc.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_add_pre godoc.service
|
||||
%service_add_preun godoc.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_add_pre godoc.service
|
||||
%service_add_postun godoc.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
|
Loading…
Reference in New Issue
Block a user