2021-07-01 11:57:55 +02:00
|
|
|
#
|
|
|
|
# spec file for package suseconnect-ng
|
|
|
|
#
|
|
|
|
# Copyright (c) 2021 SUSE LLC
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2021-07-19 12:03:53 +02:00
|
|
|
|
2021-07-01 11:57:55 +02:00
|
|
|
%global provider_prefix github.com/SUSE/connect-ng
|
2021-07-02 14:33:42 +02:00
|
|
|
%global import_path %{provider_prefix}
|
2021-07-01 11:57:55 +02:00
|
|
|
|
|
|
|
Name: suseconnect-ng
|
2021-08-28 00:54:32 +02:00
|
|
|
Version: 0.0.3~git9.19e761b
|
2021-07-01 11:57:55 +02:00
|
|
|
Release: 0
|
|
|
|
URL: https://github.com/SUSE/connect-ng
|
|
|
|
License: LGPL-2.1-or-later
|
|
|
|
Summary: Utility to register a system with the SUSE Customer Center
|
|
|
|
Group: System/Management
|
|
|
|
Source: connect-ng-%{version}.tar.xz
|
|
|
|
Source1: %name-rpmlintrc
|
2021-07-09 16:07:56 +02:00
|
|
|
BuildRequires: go >= 1.16
|
2021-07-19 12:03:53 +02:00
|
|
|
BuildRequires: golang-packaging
|
2021-08-28 00:54:32 +02:00
|
|
|
BuildRequires: zypper
|
2021-07-22 10:24:10 +02:00
|
|
|
Obsoletes: SUSEConnect
|
|
|
|
Provides: SUSEConnect
|
2021-08-28 00:54:32 +02:00
|
|
|
Obsoletes: zypper-migration-plugin
|
|
|
|
Provides: zypper-migration-plugin
|
2021-07-27 11:03:08 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?centos_version}
|
|
|
|
Requires: ca-certificates
|
|
|
|
%else
|
|
|
|
Requires: ca-certificates-mozilla
|
|
|
|
%endif
|
|
|
|
Requires: coreutils
|
|
|
|
# ExclusiveArch from this package
|
|
|
|
%ifarch %ix86 ia64 x86_64 %arm aarch64
|
|
|
|
Requires: dmidecode
|
|
|
|
%endif
|
|
|
|
# ExclusiveArch from this package
|
|
|
|
%ifarch s390x
|
|
|
|
Requires: s390-tools
|
|
|
|
%endif
|
|
|
|
Requires: systemd
|
|
|
|
Requires: zypper
|
|
|
|
# lscpu is only used on those
|
|
|
|
%ifarch x86_64 aarch64
|
|
|
|
Requires: util-linux
|
|
|
|
%endif
|
2021-07-01 11:57:55 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides a command line tool for connecting a
|
|
|
|
client system to the SUSE Customer Center. It will connect the system to your
|
|
|
|
product subscriptions and enable the product repositories/services locally.
|
2021-07-09 16:07:56 +02:00
|
|
|
suseconnect-ng reduces the size of its runtime dependencies compared to the
|
|
|
|
replaced SUSEConnect.
|
2021-07-01 11:57:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
%{go_nostrip}
|
|
|
|
%{go_provides}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n connect-ng-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
find %_builddir/..
|
2021-07-23 12:55:42 +02:00
|
|
|
echo %{version} > internal/connect/version.txt
|
2021-07-01 11:57:55 +02:00
|
|
|
%goprep %{import_path}
|
|
|
|
find %_builddir/..
|
2021-07-09 16:07:56 +02:00
|
|
|
go list all
|
|
|
|
%gobuild suseconnect
|
|
|
|
# only to test that it compiles, nothing from it is installed for now
|
|
|
|
make -C %_builddir/go/src/github.com/SUSE/connect-ng build-so-example
|
2021-07-01 11:57:55 +02:00
|
|
|
find %_builddir/..
|
|
|
|
|
|
|
|
%install
|
|
|
|
%goinstall
|
2021-07-09 16:07:56 +02:00
|
|
|
ln -s suseconnect %buildroot/%_bindir/SUSEConnect
|
2021-08-28 00:54:32 +02:00
|
|
|
mkdir -p %buildroot/%_sbindir %buildroot/usr/lib/zypper/commands
|
2021-07-09 16:07:56 +02:00
|
|
|
ln -s ../bin/suseconnect %buildroot/%_sbindir/SUSEConnect
|
2021-08-28 00:54:32 +02:00
|
|
|
ln -s %_bindir/suseconnect %buildroot/usr/lib/zypper/commands/zypper-migration
|
2021-07-01 11:57:55 +02:00
|
|
|
#TODO package ruby module
|
|
|
|
#cp /home/abuild/rpmbuild/BUILD/go/src/github.com/SUSE/connect-ng/ext/libsuseconnect.so %_libdir/libsuseconnect.so
|
|
|
|
#TODO man pages not yet available in source, these are the names frome the ruby version
|
|
|
|
#/usr/share/man/man5/SUSEConnect.5.gz
|
|
|
|
#/usr/share/man/man8/SUSEConnect.8.gz
|
2021-08-28 00:54:32 +02:00
|
|
|
#/usr/share/man/man8/zypper-migration.8.gz
|
2021-07-01 11:57:55 +02:00
|
|
|
|
|
|
|
find %_builddir/..
|
2021-07-09 16:07:56 +02:00
|
|
|
# we currently do not ship the source for any go module
|
|
|
|
rm -rf %buildroot/usr/share/go
|
2021-07-01 11:57:55 +02:00
|
|
|
|
|
|
|
%check
|
2021-07-19 12:03:53 +02:00
|
|
|
%gotest github.com/SUSE/connect-ng/internal/connect
|
2021-08-28 00:54:32 +02:00
|
|
|
make -C %_builddir/go/src/github.com/SUSE/connect-ng gofmt
|
2021-07-01 11:57:55 +02:00
|
|
|
|
2021-07-09 16:07:56 +02:00
|
|
|
%files
|
2021-07-01 11:57:55 +02:00
|
|
|
%license LICENSE LICENSE.LGPL
|
|
|
|
%doc README.md
|
2021-07-09 16:07:56 +02:00
|
|
|
%_bindir/suseconnect
|
2021-07-01 11:57:55 +02:00
|
|
|
%_bindir/SUSEConnect
|
|
|
|
%_sbindir/SUSEConnect
|
2021-08-28 00:54:32 +02:00
|
|
|
/usr/lib/zypper/commands
|
2021-07-01 11:57:55 +02:00
|
|
|
|
2021-07-19 12:03:53 +02:00
|
|
|
%changelog
|