Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > b9fcd8782c5f9640fddf685cd1de7f11 > files > 3

nodejs-commonmark-0.24.0-4.mga7.src.rpm

%{?nodejs_find_provides_and_requires}

%global packagename commonmark
%global enable_tests 1

Name:		nodejs-commonmark
Version:	0.24.0
Release:	%mkrel 4
Group:          Development/Other
Summary:	A strongly specified, highly compatible variant of Markdown

License:	BSD and MIT and Creative Commons
# Most of the files in this packages are BSD licensed.  The exceptions are:
#
# lib/normalize-reference.js is a slightly modified version of
# https://github.com/dmoscrop/fold-case and licensed under the MIT license
#
# lib/from-code-point.js is derived from a polyfill
# Copyright Mathias Bynens <http://mathiasbynens.be/>, and is licensed under
# the MIT license
#
# With the exception of `bench/samples/README.md`, the samples in
# `bench/samples` are taken from https://github.com/markdown-it/markdown-it
# and licensed under the MIT license
#
# The CommonMark spec (spec.txt) in test/ is Copyright (C) 2014-15 John 
# MacFarlane and licensed under the Creative Commons CC-BY-SA 4.0 license
#
# More details, including the license text, is in the LICENSE file

URL:		https://github.com/jgm/commonmark.js.git
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
# The test files are not included in the npm tarball.
# Source{1,2} is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:	tests-%{version}.tar.bz2
Source2:	tools-%{version}.tar.bz2
Source10:	dl-tests.sh


BuildArch:	noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch

BuildRequires:	nodejs-packaging
%if 0%{?enable_tests}
BuildRequires:	npm(entities)
BuildRequires:	npm(mdurl)
BuildRequires:	npm(string.prototype.repeat)
%endif

Requires:	nodejs

%description
A strongly specified, highly compatible variant of Markdown


%prep
%setup -q -n package
# setup the tests
%setup -q -T -D -a 1 -n package
# setup the tools
%setup -q -T -D -a 2 -n package

# remove executable permission from lib/index.js
chmod -x ./lib/index.js



%build
# nothing to do!

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json lib/ tools/ \
	%{buildroot}%{nodejs_sitelib}/%{packagename}
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}/bin
install -p -D -m0755 bin/commonmark %{buildroot}%{nodejs_sitelib}/%{packagename}/bin/commonmark

mkdir -p %{buildroot}%{_bindir}
ln -sf %{nodejs_sitelib}/%{packagename}/bin/commonmark \
    %{buildroot}%{_bindir}/commonmark



%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%{__nodejs} ./test/test.js
%endif


%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license LICENSE
%{nodejs_sitelib}/%{packagename}
%{_bindir}/commonmark





%changelog
* Wed Sep 19 2018 umeabot <umeabot> 0.24.0-4.mga7
  (not released yet)
+ Revision: 1264827
- Mageia 7 Mass Rebuild

* Tue May 16 2017 neoclust <neoclust> 0.24.0-3.mga6
+ Revision: 1102176
- imported package nodejs-commonmark


* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jan 13 2016 Jared Smith <jsmith@fedoraproject.org> - 0.24.0-1
- Update to upstream 0.24.0 release

* Sat Jan 09 2016 Jared Smith <jsmith@fedoraproject.org> - 0.23.0-1
- Update to upstream 0.23.0 release

* Wed Dec 23 2015 Jared Smith <jsmith@fedoraproject.org> - 0.22.1-3
- Add more license detail
- fix permissions on a script

* Sat Dec 19 2015 Jared Smith <jsmith@fedoraproject.org> - 0.22.1-2
- Add missing build requirement

* Tue Dec 15 2015 Jared Smith <jsmith@fedoraproject.org> 0.22.1-1
- Initial packaging