Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > b522205c9a3d17dd87dd98a926a07636 > files > 2

nodejs-type-check-0.3.2-7.mga9.src.rpm

%{?nodejs_find_provides_and_requires}

%global packagename type-check

# Set to 0 to bootstrap optionator as a dependency for LiveScript itself
%global bootstrap 1

# Tests disabled until we can bootstrap npm(livescript)
%global enable_tests 0

Name:		nodejs-type-check
Version:	0.3.2
Release:	%mkrel 7
Group:          Development/Java 
Summary:	Allows you to check the types of JavaScript values at runtime

License:	MIT
URL:		https://github.com/gkz/type-check.git
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1,2 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:	tests-%{version}.tar.bz2
Source2:	src-%{version}.tar.bz2
Source10:	dl-tests.sh
# The package.json.ls file isn't in the tarball either
Source11:	https://raw.githubusercontent.com/gkz/%{packagename}/%{version}/package.json.ls


BuildArch:	noarch

BuildRequires:	nodejs-packaging
BuildRequires:	npm(prelude-ls)
%if 0%{?enable_tests}
BuildRequires:	mocha
%endif
%if !0%{?bootstrap}
BuildRequires:	npm(LiveScript)
%endif

%description
type-check allows you to check the types of JavaScript values at runtime with a
Haskell like type syntax.


%prep
%setup -q -n package
# setup the tests
%setup -q -T -D -a 1 -n package
# setup the source files
%setup -q -T -D -a 2 -n package
# package.json.ls
cp -p %{SOURCE11} .



%build
%if !0%{?bootstrap}
%{_bindir}/echo -e "\e[102m -=#=- Building from source -=#=- \e[0m"
# Build from source
#
# Clear the lib/ directory
rm -rf ./lib/
mkdir ./lib/
# Next, build package.json from package.json.ls
%{_bindir}/lsc --compile package.json.ls
# Next, compile the the lib/ directory from the src/ directory
%{_bindir}/lsc --output lib --bare --compile src/*.ls
# Last but not least, clean up behind ourselves and erase the node_modules/ directory
rm -rf ./node_modules/
%endif

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json lib/ \
	%{buildroot}%{nodejs_sitelib}/%{packagename}

%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/mocha -R dot --ui tdd --compilers ls:LiveScript
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif


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




%changelog
* Wed Mar 23 2022 umeabot <umeabot> 0.3.2-7.mga9
+ Revision: 1821364
- Mageia 9 Mass Rebuild

* Fri Jun 12 2020 joequant <joequant> 0.3.2-6.mga8
+ Revision: 1592903
- redo deps

* Wed Feb 12 2020 umeabot <umeabot> 0.3.2-5.mga8
+ Revision: 1492655
- Mageia 8 Mass Rebuild
+ pterjan <pterjan>
- Drop ExclusiveArch preventing building this noarch package on aarch64 machines

* Wed Sep 19 2018 umeabot <umeabot> 0.3.2-4.mga7
+ Revision: 1265355
- Mageia 7 Mass Rebuild

* Wed May 17 2017 neoclust <neoclust> 0.3.2-3.mga6
+ Revision: 1102328
- imported package nodejs-type-check


* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 17 2016 Jared Smith <jsmith@fedoraproject.org> - 0.3.2-2
- Fix BuildRequires

* Tue Feb 16 2016 Jared Smith <jsmith@fedoraproject.org> - 0.3.2-1
- Initial packaging