120 lines
3.1 KiB
RPMSpec
120 lines
3.1 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
|
|
%global packagename buble
|
|
|
|
# We need to use bootstrap buble to be able to build acorn, but
|
|
# buble needs acorn to build from source and to run the tests.
|
|
# So we'll use the pre-compiled version for now, and then later
|
|
# rebuild from original sources once acorn is ready
|
|
%global bootstrap 1
|
|
|
|
%if 0%{?boostrap}
|
|
%global enable_tests 0
|
|
%endif
|
|
|
|
Name: nodejs-buble
|
|
Version: 0.16.0
|
|
Release: 5%{?dist}
|
|
Summary: The blazing fast, batteries-included ES2015 compiler
|
|
|
|
License: MIT
|
|
URL: https://gitlab.com/Rich-Harris/buble
|
|
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
# The test files are not included in the npm tarball.
|
|
# Source{1-9} are generated by running Source10, which pulls from the upstream
|
|
# version control repository.
|
|
Source1: tests-%{version}.tar.bz2
|
|
Source10: dl-tests.sh
|
|
# Config file for rollup
|
|
Source11: https://gitlab.com/Rich-Harris/buble/raw/master/rollup.config.js
|
|
Source12: https://gitlab.com/Rich-Harris/buble/raw/master/LICENSE.md
|
|
|
|
|
|
BuildArch: noarch
|
|
%if 0%{?fedora} >= 19
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
%else
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
%endif
|
|
|
|
BuildRequires: nodejs-packaging
|
|
BuildRequires: npm(magic-string)
|
|
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: mocha
|
|
%endif
|
|
|
|
%description
|
|
The blazing fast, batteries-included ES2015 compiler
|
|
|
|
|
|
%prep
|
|
%autosetup -n package
|
|
# setup the tests
|
|
%autosetup -T -D -a 1 -n package
|
|
cp -p %{SOURCE11} .
|
|
cp -p %{SOURCE12} .
|
|
|
|
#fix script interpreter
|
|
sed -i '1s/env //' bin/buble
|
|
|
|
%nodejs_fixdep acorn
|
|
%nodejs_fixdep acorn-jsx
|
|
%nodejs_fixdep magic-string
|
|
|
|
%build
|
|
%if 0%{?bootstrap}
|
|
# nothing to do
|
|
%else
|
|
# build from source
|
|
%endif
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr package.json *.js bin/ dist/ \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
mkdir %{buildroot}%{_bindir}
|
|
ln -sf %{nodejs_sitelib}/%{packagename}/bin/%{packagename} \
|
|
%{buildroot}%{_bindir}/%{packagename}
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%if 0%{?bootstrap}
|
|
# nothing
|
|
%else
|
|
%{__nodejs} -e 'require("./")'
|
|
%endif
|
|
%if 0%{?enable_tests}
|
|
NODE_ENV=test %{_bindir}/mocha -R spec
|
|
%else
|
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md
|
|
%license LICENSE.md
|
|
%{nodejs_sitelib}/%{packagename}
|
|
%{_bindir}/%{packagename}
|
|
|
|
%changelog
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
* Mon Sep 25 2017 Jared Smith <jsmith@fedoraproject.org> - 0.16.0-1
|
|
- Update to upstream 0.16.0 release
|
|
|
|
* Mon Aug 1 2016 Jared Smith <jsmith@fedoraproject.org> - 0.12.5-1
|
|
- Initial packaging
|