From 087c97887a6c320adf46c6cb329cc300c6d4ef0b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Aug 23 2019 07:56:08 +0000 Subject: Modernise spec and switch to packaging from github --- diff --git a/.gitignore b/.gitignore index 51639a8..ddcac34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /monocle-1.1.51.tgz /tests-00ccc2a0454058f0cd1964d0703d8322f78af049.tar.bz2 +/nodejs-monocle-1.1.51.tar.gz diff --git a/dl-tests.sh b/dl-tests.sh deleted file mode 100644 index 20a2963..0000000 --- a/dl-tests.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -commit=00ccc2a0454058f0cd1964d0703d8322f78af049 - -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/samccone/monocle.git -cd monocle -git archive --format=tar ${commit} test/ \ - | bzip2 > "$pwd"/tests-${commit}.tar.bz2 -popd diff --git a/nodejs-monocle.spec b/nodejs-monocle.spec index cdf4928..71f4dd7 100644 --- a/nodejs-monocle.spec +++ b/nodejs-monocle.spec @@ -3,25 +3,15 @@ # tests have circular dependency (mocha -> jade -> monocle) %global enable_tests 1 -Name: nodejs-monocle -Version: 1.1.51 -Release: 15%{?dist} -Summary: A tool for watching directories for file changes -License: BSD -URL: https://github.com/samccone/monocle -Source0: https://registry.npmjs.org/monocle/-/monocle-%{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-00ccc2a0454058f0cd1964d0703d8322f78af049.tar.bz2 -Source10: dl-tests.sh - -BuildArch: noarch -%if 0%{?fedora} >= 19 -ExclusiveArch: %{nodejs_arches} noarch -%else -ExclusiveArch: %{ix86} x86_64 %{arm} noarch -%endif +Name: nodejs-monocle +Version: 1.1.51 +Release: 15%{?dist} +Summary: A tool for watching directories for file changes +License: BSD +URL: https://www.npmjs.com/package/monocle +Source0: https://github.com/samccone/monocle/archive/v%{version}/%{name}-%{version}.tar.gz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging @@ -35,11 +25,8 @@ BuildRequires: npm(readdirp) %prep -%setup -q -n package -find . -type f -exec chmod -x '{}' \; -%setup -q -T -D -a 1 -n package - -%nodejs_fixdep readdirp '2.x' +%autosetup -p 1 -n monocle-%{version} +%nodejs_fixdep readdirp "^2.1.0" %build @@ -48,9 +35,7 @@ find . -type f -exec chmod -x '{}' \; %install mkdir -p %{buildroot}%{nodejs_sitelib}/monocle -cp -pr package.json monocle.js \ - %{buildroot}%{nodejs_sitelib}/monocle - +cp -pr package.json monocle.js %{buildroot}%{nodejs_sitelib}/monocle %nodejs_symlink_deps diff --git a/sources b/sources index 79ed77b..d864560 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -73b6372cd7d5e05daa51ea5da3bd61e3 monocle-1.1.51.tgz -36aa2e3b4838027b44140fca74dfad93 tests-00ccc2a0454058f0cd1964d0703d8322f78af049.tar.bz2 +SHA512 (nodejs-monocle-1.1.51.tar.gz) = f762503f5d4027bdc9722acfea93f4807937f1d780fa697bc566aa680276367c6385d708787f056835d62ec348ced3941d4568877bfe695847ecb27fe5897a08