Blame SPECS/nodejs-sha.spec

025fe2
%{?scl:%scl_package nodejs-sha}
025fe2
%{!?scl:%global pkg_name %{name}}
025fe2
025fe2
%{?nodejs_find_provides_and_requires}
025fe2
025fe2
%global commit 253e2df0d783453c4892d4bc32b8aec5a5a708e6
025fe2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
025fe2
025fe2
Name:           %{?scl_prefix}nodejs-sha
025fe2
Version:        1.2.1
025fe2
Release:        1.1%{?dist}
025fe2
Summary:        Check and get file hashes
025fe2
BuildArch:      noarch
025fe2
ExclusiveArch: %{nodejs_arches} noarch
025fe2
025fe2
Group:          Development/Libraries
025fe2
License:        BSD or MIT
025fe2
URL:            https://github.com/ForbesLindesay/sha
025fe2
Source0:        http://registry.npmjs.org/sha/-/sha-%{version}.tgz
025fe2
# the npm tarball doesn't contain the tests, so we grab it from github instead
025fe2
# oh, and now it seems to be a version behind npm.  swell.
025fe2
Source1:        https://github.com/ForbesLindesay/sha/archive/%{commit}/%{pkg_name}-%{version}-%{shortcommit}.tar.gz
025fe2
BuildRoot:      %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
025fe2
025fe2
BuildRequires:  %{?scl_prefix}nodejs-devel
025fe2
025fe2
#for tests
025fe2
#BuildRequires:  %{?scl_prefix}npm(mocha)
025fe2
#BuildRequires:  %{?scl_prefix}npm(graceful-fs)
025fe2
025fe2
%description
025fe2
Check and get file hashes using MD5, SHA1, or any other algorithm supported by
025fe2
OpenSSL.
025fe2
025fe2
%prep
025fe2
%setup -q -n package -a1
025fe2
025fe2
#move tests into regular directory
025fe2
mv sha-%{commit}/test .
025fe2
rm -rf sha-%{commit}
025fe2
025fe2
#fix EOL encodings
025fe2
sed -i 's/\r//g' README.md
025fe2
025fe2
#we don't currently support optionalDependencies properly so make it mandatory
025fe2
#we don't need this in scl since user install whole collection at once
025fe2
#%nodejs_fixdep graceful-fs '2' 
025fe2
025fe2
%build
025fe2
#nothing to do
025fe2
025fe2
%install
025fe2
rm -rf %buildroot
025fe2
025fe2
mkdir -p %{buildroot}%{nodejs_sitelib}/sha
025fe2
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/sha
025fe2
025fe2
%nodejs_symlink_deps
025fe2
025fe2
%check
025fe2
#%nodejs_symlink_deps --check
025fe2
#mocha -R list
025fe2
025fe2
%clean
025fe2
rm -rf %buildroot
025fe2
025fe2
%files
025fe2
%defattr(-,root,root,-)
025fe2
%{nodejs_sitelib}/sha
025fe2
%doc README.md LICENSE
025fe2
025fe2
%changelog
025fe2
* Fri Nov 08 2013 Tomas Hrcka <thrcka@redhat.com> - 1.2.1-1.1
025fe2
- Software collections support
025fe2
025fe2
* Tue Jul 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.1-1
025fe2
- new upstream release 1.2.1
025fe2
025fe2
* Fri Jul 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.1-4
025fe2
- fix graceful-fs dep
025fe2
025fe2
* Sat Jun 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.1-3
025fe2
- restrict to compatible arches
025fe2
025fe2
* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.1-2
025fe2
- use github tarball instead so we get tests and LICENSE file
025fe2
025fe2
* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.1-1
025fe2
- initial package