Blame nodejs-require-yaml.spec

Jared K. Smith ab9de91
%{?nodejs_find_provides_and_requires}
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%global packagename require-yaml
Jared K. Smith ab9de91
%global enable_tests 1
Jared K. Smith ab9de91
Jared K. Smith ab9de91
Name:		nodejs-require-yaml
Jared K. Smith ab9de91
Version:	0.0.1
Jared K. Smith ab9de91
Release:	1%{?dist}
Jared K. Smith ab9de91
Summary:	Lets you load YAML/YML files using require syntax
Jared K. Smith ab9de91
Jared K. Smith ab9de91
License:	BSD
Jared K. Smith ab9de91
URL:		https://github.com/olalonde/require-yaml
Jared K. Smith ab9de91
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith ab9de91
# License file
Jared K. Smith ab9de91
Source1:	https://raw.githubusercontent.com/olalonde/require-yaml/master/LICENSE
Jared K. Smith ab9de91
Jared K. Smith ab9de91
Jared K. Smith ab9de91
BuildArch:	noarch
Jared K. Smith ab9de91
%if 0%{?fedora} >= 19
Jared K. Smith ab9de91
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith ab9de91
%else
Jared K. Smith ab9de91
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith ab9de91
%endif
Jared K. Smith ab9de91
Jared K. Smith ab9de91
BuildRequires:	nodejs-packaging
Jared K. Smith ab9de91
BuildRequires:	npm(js-yaml)
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%if 0%{?enable_tests}
Jared K. Smith ab9de91
#BuildRequires:
Jared K. Smith ab9de91
%endif
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%description
Jared K. Smith ab9de91
require('require-yaml') lets you load YAML/YML files using require syntax. For
Jared K. Smith ab9de91
example: var config = require('./config.yaml');
Jared K. Smith ab9de91
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%prep
Jared K. Smith ab9de91
%autosetup -n package
Jared K. Smith ab9de91
# copy license file
Jared K. Smith ab9de91
cp -p %{SOURCE1} .
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%build
Jared K. Smith ab9de91
# nothing to do
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%install
Jared K. Smith ab9de91
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith ab9de91
cp -pr package.json *.js \
Jared K. Smith ab9de91
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%nodejs_symlink_deps
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%check
Jared K. Smith ab9de91
%nodejs_symlink_deps --check
Jared K. Smith ab9de91
%{__nodejs} -e 'require("./")'
Jared K. Smith ab9de91
%if 0%{?enable_tests}
Jared K. Smith ab9de91
%{_bindir}/echo -e "\e[103m -=#=- This package has no tests -=#=- \e[0m"
Jared K. Smith ab9de91
%else
Jared K. Smith ab9de91
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith ab9de91
%endif
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%files
Jared K. Smith ab9de91
%{!?_licensedir:%global license %doc}
Jared K. Smith ab9de91
%doc *.md examples/
Jared K. Smith ab9de91
%license LICENSE
Jared K. Smith ab9de91
%{nodejs_sitelib}/%{packagename}
Jared K. Smith ab9de91
Jared K. Smith ab9de91
%changelog
Jared K. Smith ab9de91
* Sat Jul 23 2016 Jared Smith <jsmith@fedoraproject.org> - 0.0.1-1
Jared K. Smith ab9de91
- Initial packaging