File go-npm.spec of Package go-npm
#
# spec file for package go-npm
#
# Copyright (c) 2022 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/
#
# nodebuginfo
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: go-npm
Version: 0.5.0
Release: 0
Summary: Simple NPM registry client written in Go
License: Apache-2.0
Group: System/Management
URL: https://gitlab.com/bboehmke/go-npm
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang(API) >= 1.13
%description
go-npm can be used to download packages from NPM registry without a Node.js
installation. Call the app in the directory containing package.json and defined
packages will download to ./dist/.
%prep
%autosetup -a 1
%build
go build \
-mod=vendor \
-buildmode=pie \
-o %{name} \
./cmd/npm_loader
%install
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%changelog