|
Jared K. Smith |
8e6fff7 |
%{?nodejs_find_provides_and_requires}
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%global packagename mdurl
|
|
Jared K. Smith |
8e6fff7 |
%global enable_tests 1
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
Name: nodejs-mdurl
|
|
Jared K. Smith |
8e6fff7 |
Version: 1.0.1
|
|
Jared K. Smith |
8e6fff7 |
Release: 2%{?dist}
|
|
Jared K. Smith |
8e6fff7 |
Summary: URL utilities for markdown-it
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
License: MIT
|
|
Jared K. Smith |
8e6fff7 |
URL: https://github.com/markdown-it/mdurl.git
|
|
Jared K. Smith |
8e6fff7 |
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
Jared K. Smith |
8e6fff7 |
# The test files are not included in the npm tarball.
|
|
Jared K. Smith |
8e6fff7 |
# Source1 is generated by running Source10, which pulls from the upstream
|
|
Jared K. Smith |
8e6fff7 |
# version control repository.
|
|
Jared K. Smith |
8e6fff7 |
Source1: tests-%{version}.tar.bz2
|
|
Jared K. Smith |
8e6fff7 |
Source10: dl-tests.sh
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
BuildArch: noarch
|
|
Jared K. Smith |
8e6fff7 |
%if 0%{?fedora} >= 19
|
|
Jared K. Smith |
8e6fff7 |
ExclusiveArch: %{nodejs_arches} noarch
|
|
Jared K. Smith |
8e6fff7 |
%else
|
|
Jared K. Smith |
8e6fff7 |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
Jared K. Smith |
8e6fff7 |
%endif
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
BuildRequires: nodejs-packaging
|
|
Jared K. Smith |
8e6fff7 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
8e6fff7 |
BuildRequires: mocha
|
|
Jared K. Smith |
8e6fff7 |
%endif
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
Requires: nodejs
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
Provides: bundled(nodejs)
|
|
Jared K. Smith |
8e6fff7 |
# While it's probably overkill, this package contains a highly forked version
|
|
Jared K. Smith |
8e6fff7 |
# of a small portion of nodejs, which is (as far as we can tell) based on
|
|
Jared K. Smith |
8e6fff7 |
# https://github.com/nodejs/node/blob/913addbff5481567262c387cef9594f809e4ef83/lib/url.js
|
|
Jared K. Smith |
8e6fff7 |
#
|
|
Jared K. Smith |
8e6fff7 |
# The version in this package was specifically changed, with a long list of
|
|
Jared K. Smith |
8e6fff7 |
# changes at the top of both README.md and the parse.js file.
|
|
Jared K. Smith |
8e6fff7 |
#
|
|
Jared K. Smith |
8e6fff7 |
# Out of an overabundance of caution, however, I'm adding this Provides line
|
|
Jared K. Smith |
8e6fff7 |
# (even though I'd argue that this is a fork and not a bundled library)
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%description
|
|
Jared K. Smith |
8e6fff7 |
URL utilities for markdown-it
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%prep
|
|
Jared K. Smith |
8e6fff7 |
%setup -q -n package
|
|
Jared K. Smith |
8e6fff7 |
# setup the tests
|
|
Jared K. Smith |
8e6fff7 |
%setup -q -T -D -a 1 -n package
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%build
|
|
Jared K. Smith |
8e6fff7 |
# nothing to do!
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%install
|
|
Jared K. Smith |
8e6fff7 |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
8e6fff7 |
cp -pr package.json *.js \
|
|
Jared K. Smith |
8e6fff7 |
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%nodejs_symlink_deps
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%check
|
|
Jared K. Smith |
8e6fff7 |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
8e6fff7 |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
8e6fff7 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
8e6fff7 |
/usr/bin/mocha -R spec
|
|
Jared K. Smith |
8e6fff7 |
%endif
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%files
|
|
Jared K. Smith |
8e6fff7 |
%{!?_licensedir:%global license %doc}
|
|
Jared K. Smith |
8e6fff7 |
%doc *.md
|
|
Jared K. Smith |
8e6fff7 |
%license LICENSE
|
|
Jared K. Smith |
8e6fff7 |
%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
%changelog
|
|
Jared K. Smith |
8e6fff7 |
* Tue Dec 22 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.1-2
|
|
Jared K. Smith |
8e6fff7 |
- Add Provides: line and explanation
|
|
Jared K. Smith |
8e6fff7 |
|
|
Jared K. Smith |
8e6fff7 |
* Tue Dec 15 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.1-1
|
|
Jared K. Smith |
8e6fff7 |
- Initial packaging
|