[nodejs-sha/el6] initial import

T.C. Hollingsworth patches at fedoraproject.org
Mon Jun 3 02:02:55 UTC 2013


commit 7832c1bc92f1ebcc481d321e4ad7b28f52c19f17
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Sun Jun 2 19:01:55 2013 -0700

    initial import

 .gitignore      |    1 +
 nodejs-sha.spec |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 3 files changed, 69 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..1b34f44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nodejs-sha-1.0.1-c98f299.tar.gz
diff --git a/nodejs-sha.spec b/nodejs-sha.spec
new file mode 100644
index 0000000..db9e647
--- /dev/null
+++ b/nodejs-sha.spec
@@ -0,0 +1,67 @@
+%{?nodejs_find_provides_and_requires}
+
+%global commit c98f29965b86979c77975ac02c18fd8906ba5b48
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name:           nodejs-sha
+Version:        1.0.1
+Release:        2%{?dist}
+Summary:        Check and get file hashes
+BuildArch:      noarch
+
+Group:          Development/Libraries
+License:        BSD or MIT
+URL:            https://github.com/ForbesLindesay/sha
+# the npm tarball doesn't contain the tests or the LICENSE file, so we grab
+# it from github instead
+Source0:        https://github.com/ForbesLindesay/sha/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  nodejs-devel
+
+#for tests
+BuildRequires:  npm(mocha)
+BuildRequires:  npm(graceful-fs)
+
+%description
+Check and get file hashes using MD5, SHA1, or any other algorithm supported by
+OpenSSL.
+
+%prep
+%setup -q -n sha-%{commit}
+
+#fix EOL encodings
+sed -i 's/\r//g' README.md
+
+#we don't currently support optionalDependencies properly so make it mandatory
+%nodejs_fixdep graceful-fs 1.2
+
+%build
+#nothing to do
+
+%install
+rm -rf %buildroot
+
+mkdir -p %{buildroot}%{nodejs_sitelib}/sha
+cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/sha
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+mocha -R list
+
+%clean
+rm -rf %buildroot
+
+%files
+%defattr(-,root,root,-)
+%{nodejs_sitelib}/sha
+%doc README.md LICENSE
+
+%changelog
+* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.0.1-2
+- use github tarball instead so we get tests and LICENSE file
+
+* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.0.1-1
+- initial package
diff --git a/sources b/sources
index e69de29..2e88c0c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3b1b13f54acc8b2f323c340df6ff0324  nodejs-sha-1.0.1-c98f299.tar.gz


More information about the scm-commits mailing list