Files
jslint/jslint.spec

96 lines
3.5 KiB
RPMSpec

#
# spec file for package jslint
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: jslint
Version: 0.9.6
Release: 0
Summary: The JavaScript Code Quality Tool
License: MIT and ISC and WTFPL
Group: Development/Languages/NodeJS
Url: https://github.com/reid/node-jslint
Source0: %{name}.json
# DO NOT CHANGE MANUALLY START
Source1: http://registry.npmjs.org/exit/-/exit-0.1.2.tgz
Source2: http://registry.npmjs.org/wrappy/-/wrappy-1.0.0.tgz
Source3: http://registry.npmjs.org/once/-/once-1.3.3.tgz
Source4: http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz
Source5: http://registry.npmjs.org/inherits/-/inherits-2.0.0.tgz
Source6: http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz
Source7: http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz
Source8: http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz
Source9: http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz
Source10: http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz
Source11: http://registry.npmjs.org/glob/-/glob-4.5.3.tgz
Source12: http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz
Source13: http://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz
Source14: http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz
Source15: http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
Source16: http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz
Source17: http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz
Source18: http://registry.npmjs.org/jslint/-/jslint-0.9.6.tgz
# DO NOT CHANGE MANUALLY END
BuildRequires: fdupes
BuildRequires: nodejs-packaging
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{nodejs_find_provides_and_requires}
%description
The JavaScript Code Quality Tool.
JSLint defines a professional subset of JavaScript, a stricter language than
that defined by the ECMAScript Programming Language Standard (the strangely
named document that governs JavaScript). JSLint will reject most legal programs.
It is a higher standard.
%prep
%nodejs_prep
%build
#nothing to do
%install
%nodejs_mkdir
rm -rf %{_sourcedir}/jslint-%{version}/lib/jslint-201*
%nodejs_copy
%nodejs_build
rm %{buildroot}%{nodejs_sitelib}/jslint/node_modules/nopt/bin/nopt.js \
%{buildroot}/%{_bindir}/nopt.js
rmdir %{buildroot}%{nodejs_sitelib}/jslint/node_modules/nopt/bin
%nodejs_filelist
# abbrev version starts from 1.0.3
%nodejs_fixdep abbrev "^1.0.3"
chmod a+x %{buildroot}%{nodejs_sitelib}/jslint/bin/jslint.js
chmod -x %{buildroot}%{nodejs_sitelib}/jslint/lib/jslint-es6.js
sed -i -e "s|#!%{_bindir}/env node|#!%{_bindir}/node|" %{buildroot}%{nodejs_sitelib}/jslint/bin/jslint*
# fix files.lst so /usr/bin is not owned
sed -i.bak '\#dir\s/usr/bin#d' %{_sourcedir}/files.lst
%fdupes %{buildroot}
%files -f %{_sourcedir}/files.lst
%defattr(-,root,root,-)
%dir %{nodejs_sitelib}
%changelog