nodejs-packaging/nodejs-packaging.spec
2022-11-17 16:55:50 +08:00

50 lines
1.8 KiB
RPMSpec

%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: nodejs-packaging
Version: 20
Release: 2
Summary: RPM Macros and Utilities for Node.js Packaging
BuildArch: noarch
License: MIT
URL: https://fedoraproject.org/wiki/Node.js/Packagers
Source0: https://releases.pagure.org/%{name}/%{name}-fedora-%{version}.tar.xz
#ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: python3
#nodejs-devel before 0.10.12 provided these macros and owned /usr/share/node
Requires: nodejs(engine) >= 0.10.12 %{_vendor}-rpm-config
%description
This package contains RPM macros and other utilities useful for packaging
Node.js modules and applications in RPM-based distributions.
%prep
%autosetup -p 1 -n %{name}-fedora-%{version}
%build
#nothing to do
%install
install -Dpm0644 macros.nodejs %{buildroot}%{macrosdir}/macros.nodejs
install -Dpm0644 nodejs.attr %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs.attr
install -pm0755 nodejs.prov %{buildroot}%{_rpmconfigdir}/nodejs.prov
install -pm0755 nodejs.req %{buildroot}%{_rpmconfigdir}/nodejs.req
install -pm0755 nodejs-symlink-deps %{buildroot}%{_rpmconfigdir}/nodejs-symlink-deps
install -pm0755 nodejs-fixdep %{buildroot}%{_rpmconfigdir}/nodejs-fixdep
install -pm0755 nodejs-setversion %{buildroot}%{_rpmconfigdir}/nodejs-setversion
install -Dpm0644 multiver_modules %{buildroot}%{_datadir}/node/multiver_modules
%check
./test/run
%files
%license LICENSE
%{macrosdir}/macros.nodejs
%{_rpmconfigdir}/fileattrs/nodejs*.attr
%{_rpmconfigdir}/nodejs*
%{_datadir}/node/multiver_modules
%changelog
* Thu Nov 17 2022 wulei <wulei80@h-partners.com> - 20-2
- Replace openEuler with %{_vendor}
* Thu Aug 20 2020 wutao <wutao61@huawei.com> - 20-1
- package init