[nodejs-serve-index] Initial import

Jamie Nguyen jamielinux at fedoraproject.org
Wed Mar 12 12:31:07 UTC 2014


commit 84d6e9da6fe444a00459416bbfada7f767e7fac7
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Wed Mar 12 12:30:54 2014 +0000

    Initial import

 .gitignore              |    2 +
 dl-tests.sh             |   23 +++++++++++++
 nodejs-serve-index.spec |   82 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                 |    2 +
 4 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..05e81b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/serve-index-1.0.1.tgz
+/tests-v1.0.1.tar.bz2
diff --git a/dl-tests.sh b/dl-tests.sh
new file mode 100644
index 0000000..9211888
--- /dev/null
+++ b/dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=v1.0.1
+
+set -e
+
+tmp=$(mktemp -d)
+
+trap cleanup EXIT
+cleanup() {
+    set +e
+    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
+}
+
+unset CDPATH
+pwd=$(pwd)
+
+pushd "$tmp"
+git clone git://github.com/expressjs/serve-index.git
+cd serve-index
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-serve-index.spec b/nodejs-serve-index.spec
new file mode 100644
index 0000000..50835ff
--- /dev/null
+++ b/nodejs-serve-index.spec
@@ -0,0 +1,82 @@
+%{?nodejs_find_provides_and_requires}
+
+%global enable_tests 0
+
+Name:       nodejs-serve-index
+Version:    1.0.1
+Release:    2%{?dist}
+Summary:    Middleware for serving directory listings for Node.js and Connect
+License:    MIT
+Group:      System Environment/Libraries
+URL:        https://github.com/expressjs/serve-index
+Source0:    http://registry.npmjs.org/serve-index/-/serve-index-%{version}.tgz
+# The test files are not included in the npm tarball.
+# Source1 is generated by running Source10, which pulls from the upstream
+# version control repository.
+Source1:    tests-v%{version}.tar.bz2
+Source10:   dl-tests.sh
+
+BuildArch:  noarch
+%if 0%{?fedora} >= 19
+ExclusiveArch: %{nodejs_arches} noarch
+%else
+ExclusiveArch: %{ix86} x86_64 %{arm} noarch
+%endif
+
+BuildRequires:  nodejs-packaging
+
+%if 0%{?enable_tests}
+BuildRequires:  mocha
+BuildRequires:  npm(batch)
+BuildRequires:  npm(connect)
+BuildRequires:  npm(negotiator)
+BuildRequires:  npm(should)
+BuildRequires:  npm(supertest)
+%endif
+
+%description
+%{summary}.
+
+
+%prep
+%setup -q -n package
+%setup -q -T -D -a 1 -n package
+
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/serve-index
+cp -pr package.json index.js \
+    %{buildroot}%{nodejs_sitelib}/serve-index
+
+mkdir -p %{buildroot}%{_datadir}/%{name}
+cp -pr public/ %{buildroot}%{_datadir}/%{name}
+ln -sf %{_datadir}/%{name}/public \
+    %{buildroot}%{nodejs_sitelib}/serve-index/public
+
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+/usr/bin/mocha --require should --reporter spec
+%endif
+
+
+%files
+%doc LICENSE Readme.md
+%{nodejs_sitelib}/serve-index
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/public
+
+
+%changelog
+* Tue Mar 11 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.0.1-2
+- own {_datadir}/{name} directory
+
+* Mon Mar 10 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.0.1-1
+- initial package
diff --git a/sources b/sources
index e69de29..af76c14 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+538060244660ca1cf4c795be772eb9e5  serve-index-1.0.1.tgz
+2e99724a5520fd1918d94ebb0be3d69f  tests-v1.0.1.tar.bz2


More information about the scm-commits mailing list