diff --git a/hawk-4.1.2.tgz b/hawk-4.1.2.tgz new file mode 100644 index 0000000..1e856a1 Binary files /dev/null and b/hawk-4.1.2.tgz differ diff --git a/nodejs-hawk.spec b/nodejs-hawk.spec new file mode 100644 index 0000000..4102d69 --- /dev/null +++ b/nodejs-hawk.spec @@ -0,0 +1,49 @@ +%global enable_tests 0 +Name: nodejs-hawk +Version: 4.1.2 +Release: 1 +Summary: HTTP Hawk authentication scheme +License: BSD +URL: https://github.com/hueniverse/hawk +Source0: https://registry.npmjs.org/hawk/-/hawk-%{version}.tgz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging npm(boom) npm(cryptiles) npm(hoek) npm(sntp) +%if 0%{?enable_tests} +BuildRequires: npm(lab) npm(code) +%endif +%description +Hawk is an HTTP authentication scheme using a message authentication code (MAC) +algorithm to provide partial HTTP request cryptographic verification. + +%prep +%autosetup -n package +%nodejs_fixdep cryptiles "^2.0.5" +%nodejs_fixdep boom "^2.10.1" +%nodejs_fixdep hoek "^0.9.1" +chmod a-x README.md LICENSE package.json client.js example/* images/* lib/* +sed -i 's/\r$//' README.md +sed -i 's/\r$//' example/usage.js + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/hawk +cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/hawk +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%__nodejs -e "require('./')" +%if 0%{?enable_tests} +%{nodejs_sitelib}/lab/bin/lab -a code -t 100 -L +%endif + +%files +%doc README.md example images +%license LICENSE +%{nodejs_sitelib}/hawk + +%changelog +* Thu Aug 20 2020 wangxiao - 4.1.2-1 +- Package init diff --git a/nodejs-hawk.yaml b/nodejs-hawk.yaml new file mode 100644 index 0000000..c6be7f1 --- /dev/null +++ b/nodejs-hawk.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/hueniverse/hawk +version_control: github +src_repo: hueniverse/hawk +tag_prefix: "^v" +seperator: "."