From 3ccfef5a9006935c354cab3b276091d0d3248bba Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Apr 19 2014 21:41:15 +0000 Subject: Revert "Update to 0.4.2 upstream release" This reverts commit c63b0f0502d8e56f46ef5d55cded7a94ec50551b. --- diff --git a/.gitignore b/.gitignore index f50f0bd..47ea671 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ /xml2js-tests-0.4.0.tar.bz2 /xml2js-0.4.1.tgz /xml2js-tests-0.4.1.tar.bz2 -/node-xml2js-9b6459903f3e3aa5a821729b8b79836d1d2b84cc.tar.gz diff --git a/nodejs-xml2js.spec b/nodejs-xml2js.spec index df303ff..61cd5a4 100644 --- a/nodejs-xml2js.spec +++ b/nodejs-xml2js.spec @@ -1,13 +1,16 @@ -%global commit 9b6459903f3e3aa5a821729b8b79836d1d2b84cc - Name: nodejs-xml2js -Version: 0.4.2 +Version: 0.4.1 Release: 1%{?dist} Summary: Simple XML to JavaScript object converter License: MIT URL: https://github.com/Leonidas-from-XIV/node-xml2js -Source0: https://github.com/Leonidas-from-XIV/node-xml2js/archive/%{commit}/node-xml2js-%{commit}.tar.gz +Source0: http://registry.npmjs.org/xml2js/-/xml2js-%{version}.tgz +# The test files are not included in the npm tarball. +# Source1 is generated using Source10, which pulls from the upstream +# version control repository. +Source1: xml2js-tests-%{version}.tar.bz2 +Source10: xml2js-dl-tests.sh BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch @@ -27,7 +30,8 @@ reason? Then xml2js is what you're looking for! %prep -%setup -q -n node-xml2js-%{commit} +%setup -q -n package +%setup -T -D -a 1 -q -n package %nodejs_fixdep sax "~0.5.2" rm -rf node_modules @@ -52,10 +56,6 @@ cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/xml2js %changelog -* Sun Mar 30 2014 Tom Hughes - 0.4.2-1 -- Update to 0.4.2 upstream release -- Switch to using github as source so we get tests - * Fri Jan 3 2014 Tom Hughes - 0.4.1-1 - Update to 0.4.1 upstream release diff --git a/sources b/sources index 1730421..3716c29 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -1fa56555396040019c58ab7432578ee2 node-xml2js-9b6459903f3e3aa5a821729b8b79836d1d2b84cc.tar.gz +4cdc0c21cceee96e6940bfe221359ad3 xml2js-0.4.1.tgz +a0e23f6009372a0e31a6f6ed81f6e8aa xml2js-tests-0.4.1.tar.bz2 diff --git a/xml2js-dl-tests.sh b/xml2js-dl-tests.sh new file mode 100755 index 0000000..b645918 --- /dev/null +++ b/xml2js-dl-tests.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +tag=0.4.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/Leonidas-from-XIV/node-xml2js.git +cd node-xml2js +git archive --prefix="test/" --format=tar tags/${tag}:test/ \ + | bzip2 > "$pwd"/xml2js-tests-${tag}.tar.bz2 +popd