[packages/nodejs-strip-ansi] new, version 0.2.0

glen glen at pld-linux.org
Sun Jan 10 20:11:22 CET 2016


commit 778e75a57b80ec73c7267a7b59f937b5c96933d1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Jan 10 21:10:23 2016 +0200

    new, version 0.2.0
    
    based on fedora package (134734f)

 LICENSE                | 18 ++++++++++++++
 nodejs-strip-ansi.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)
---
diff --git a/nodejs-strip-ansi.spec b/nodejs-strip-ansi.spec
new file mode 100644
index 0000000..b7ca82c
--- /dev/null
+++ b/nodejs-strip-ansi.spec
@@ -0,0 +1,65 @@
+#
+# Conditional build:
+%bcond_with	tests		# build with tests
+
+%define		pkg	strip-ansi
+Summary:	Strip ANSI escape codes (used for colorizing strings in the terminal)
+Name:		nodejs-%{pkg}
+Version:	0.2.0
+Release:	1
+License:	MIT
+Group:		Development/Libraries
+Source0:	http://registry.npmjs.org/strip-ansi/-/strip-ansi-%{version}.tgz
+# Source0-md5:	77fe06c131c3aa499f7071effd0bcd13
+Source1:	https://raw.githubusercontent.com/sindresorhus/strip-ansi/3c9b37e5381603925ba16b27a05ccbfd338906b8/test.js
+# Source1-md5:	16c9da163ab34ea3ff8c373bae2542e5
+# https://github.com/sindresorhus/strip-ansi/pull/1
+Source2:	LICENSE
+URL:		https://github.com/sindresorhus/strip-ansi
+BuildRequires:	rpmbuild(macros) >= 1.634
+BuildRequires:	sed >= 4.0
+%if %{with tests}
+BuildRequires:	nodejs-mocha
+%endif
+Requires:	nodejs
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Strip ANSI escape codes (used for colorizing strings in the terminal).
+
+%prep
+%setup -qc
+mv package/* .
+cp -p %{SOURCE1} .
+cp -p %{SOURCE2} .
+
+%{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' cli.js
+
+%build
+%if %{with tests}
+mocha
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{nodejs_libdir}/%{pkg}}
+cp -pr package.json cli.js index.js \
+    $RPM_BUILD_ROOT%{nodejs_libdir}/strip-ansi
+
+# `strip-ansi` is used as the command.
+ln -sf %{nodejs_libdir}/strip-ansi/cli.js \
+    $RPM_BUILD_ROOT%{_bindir}/strip-ansi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc readme.md LICENSE
+%attr(755,root,root) %{_bindir}/strip-ansi
+
+%dir %{nodejs_libdir}/%{pkg}
+%{nodejs_libdir}/%{pkg}/package.json
+%{nodejs_libdir}/%{pkg}/index.js
+%attr(755,root,root) %{nodejs_libdir}/%{pkg}/cli.js
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c9b44cb
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,18 @@
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nodejs-strip-ansi.git/commitdiff/778e75a57b80ec73c7267a7b59f937b5c96933d1



More information about the pld-cvs-commit mailing list