File nodejs-husky.spec of Package nodejs-husky
#
# spec file for package nodejs-husky
#
# 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/
#
%define mod_name husky
Name: nodejs-husky
Version: 9.1.6
Release: 0
Summary: Modern native Git hooks made easy
License: MIT
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/NodeJS
URL: https://github.com/typicode/husky
Source0: %{mod_name}-%{version}.tgz
Patch0: env-script-interpreter.patch
BuildRequires: fdupes
BuildRequires: nodejs
BuildRequires: xz
BuildRequires: nodejs-packaging
Requires: nodejs
Requires: nodejs-package-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{?nodejs_requires}
%description
Modern native Git hooks made easy. Husky improves your commits and more!
%prep
%setup -q -n package
%build
%install
%nodejs_install
rm %{buildroot}%{nodejs_modulesdir}/%{mod_name}/LICENSE
rm %{buildroot}%{nodejs_modulesdir}/%{mod_name}/README.md
chmod 755 %{buildroot}%{nodejs_modulesdir}/%{mod_name}/husky
pushd %{buildroot}%{nodejs_modulesdir}/%{mod_name}
patch -p1 < %{PATCH0}
popd
%fdupes %{buildroot}
%files
%defattr(-,root,root)
%doc LICENSE README.md
%{nodejs_modulesdir}/%{mod_name}
%dir %{nodejs_modulesdir}
%{_bindir}/husky
%changelog