[nodejs-ctype] Initial import

Jamie Nguyen jamielinux at fedoraproject.org
Sat Jun 22 08:39:13 UTC 2013


commit 88d963d885abec5c6460aaa136d02db2f6c978bd
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Sat Jun 22 09:38:54 2013 +0100

    Initial import

 .gitignore                |    2 +
 nodejs-ctype-README.patch |   26 ++++++++++++++
 nodejs-ctype.spec         |   81 +++++++++++++++++++++++++++++++++++++++++++++
 sources                   |    2 +
 4 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..548f49b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/ctype-0.5.3.tgz
+/nodejs-ctype-0.5.3-3aae5f7.tar.gz
diff --git a/nodejs-ctype-README.patch b/nodejs-ctype-README.patch
new file mode 100644
index 0000000..e9160e1
--- /dev/null
+++ b/nodejs-ctype-README.patch
@@ -0,0 +1,26 @@
+From 511d3e102a4c65b0cef33d0782446690c0d35081 Mon Sep 17 00:00:00 2001
+From: "T.C. Hollingsworth" <tchollingsworth at gmail.com>
+Date: Thu, 13 Jun 2013 19:55:18 -0700
+Subject: [PATCH] fix README to include instructions to read the man page from
+ the system paths
+
+---
+ README | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/README b/README
+index 4efd7ee..bd1e945 100644
+--- a/README
++++ b/README
+@@ -77,6 +77,6 @@ For more documentation, see the file README.old. Full documentation is in the
+ process of being rewritten as a series of manual pages which will be available
+ in the repository and online for viewing.
+ 
+-To read the ctio manual page simple run, from the root of the workspace:
++To read the ctio manual page simply run:
+ 
+-man -Mman -s 3ctype ctio
++man 3 ctio
+-- 
+1.8.2.1
+
diff --git a/nodejs-ctype.spec b/nodejs-ctype.spec
new file mode 100644
index 0000000..2432ad6
--- /dev/null
+++ b/nodejs-ctype.spec
@@ -0,0 +1,81 @@
+%{?nodejs_find_provides_and_requires}
+
+%global commit 3aae5f7aa45906cfcb283817cfb6fcb15360391d
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name:           nodejs-ctype
+Version:        0.5.3
+Release:        2%{?dist}
+Summary:        Read and write binary structures and data types with Node.js
+BuildArch:      noarch
+
+Group:          System Environment/Libraries
+License:        MIT
+URL:            https://github.com/rmustacc/node-ctype
+Source0:        http://registry.npmjs.org/ctype/-/ctype-%{version}.tgz
+#grab the tests from github
+Source1:        https://github.com/rmustacc/node-ctype/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# fedora-specific patch to have README indicate proper directions for reading
+# the man page from the system path
+Patch1:         nodejs-ctype-README.patch
+
+BuildRequires:  nodejs-devel
+
+%description
+Node-CType is a way to read and write binary data in a structured and easy to 
+use format. Its name comes from the C header file.
+
+There are two APIs that you can use, depending on what abstraction you'd like.
+The low level API lets you read and write individual integers and floats from
+buffers. The higher level API lets you read and write structures of these.
+
+%prep
+%setup -q -n package -a1
+%patch1 -p1
+
+#move tests into regular directory
+mv node-ctype-%{commit}/tst .
+rm -rf node-ctype-%{commit}
+
+%build
+#nothing to do
+
+%install
+rm -rf %buildroot
+
+mkdir -p %{buildroot}%{nodejs_sitelib}/ctype
+cp -pr package.json ctf.js ctio.js ctype.js %{buildroot}%{nodejs_sitelib}/ctype
+
+mkdir -p %{buildroot}%{_mandir}/man3
+cp -pr man/man3ctype/ctio.3ctype %{buildroot}%{_mandir}/man3/ctio.3
+
+%nodejs_symlink_deps
+
+%check
+pushd tst
+for dir in ctf ctio/* ctype; do
+    pushd $dir
+    for f in *.js; do
+        %{__nodejs} $f
+    done
+    popd
+done
+popd
+
+%clean
+rm -rf %buildroot
+
+%files
+%defattr(-,root,root,-)
+%{nodejs_sitelib}/ctype
+%{_mandir}/man3/ctio.3.*
+%doc CHANGELOG LICENSE README README.old
+
+%changelog
+* Fri Jun 21 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.5.3-2
+- fix spelling in description
+
+* Thu Jun 13 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.5.3-1
+- initial package
diff --git a/sources b/sources
index e69de29..6dd3c9d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+219990993f21e6d8c2b2cb07b90e060f  ctype-0.5.3.tgz
+a6a8a62b59555980ac0255a71c82ecfc  nodejs-ctype-0.5.3-3aae5f7.tar.gz


More information about the scm-commits mailing list