spec: use nodejs-devel on Fedora

According to the Fedora guidelines, nodejs-devel is needed for using
nodejs modules:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_buildrequires

Since this applies only on Fedora, and that nodejs-devel may not even
exist on other distros (e.g. CentOS 9 Stream), then limit the
nodejs-devel requirement only to Fedora, keep using nodejs
unconditionally everywhere.
This commit is contained in:
Pino Toscano 2021-09-17 06:40:51 +02:00 committed by Martin Pitt
parent 0763174e15
commit b47bb4714a

View file

@ -7,6 +7,9 @@ License: LGPLv2+
Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz
BuildArch: noarch BuildArch: noarch
%if 0%{?fedora}
BuildRequires: nodejs-devel
%endif
BuildRequires: nodejs BuildRequires: nodejs
BuildRequires: make BuildRequires: make
BuildRequires: libappstream-glib BuildRequires: libappstream-glib