The package rpms/nodejs-tempfile.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-tempfile.git/commit/?id=ed....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit edd814cdc6acad5c4a473afc07d83a2c819031c2
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Mon Apr 23 10:01:12 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4fca252
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/tempfile-2.0.0.tgz
diff --git a/README.md b/README.md
deleted file mode 100644
index 0ba1064..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-tempfile
-
-'Get a random temporary file path'
\ No newline at end of file
diff --git a/nodejs-tempfile.spec b/nodejs-tempfile.spec
new file mode 100644
index 0000000..bb3850d
--- /dev/null
+++ b/nodejs-tempfile.spec
@@ -0,0 +1,67 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename tempfile
+
+# ava test suite not yet in Fedora
+%global enable_tests 0
+
+Name: nodejs-tempfile
+Version: 2.0.0
+Release: 1%{?dist}
+Summary: Get a random temporary file path
+
+License: MIT
+URL:
https://github.com/sindresorhus/tempfile.git
+Source0:
https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+# The test files are not included in the npm tarball.
+Source1:
https://raw.githubusercontent.com/sindresorhus/tempfile/v%{version}/test.js
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(uuid)
+BuildRequires: npm(temp-dir)
+
+%if 0%{?enable_tests}
+BuildRequires: npm(ava)
+%endif
+
+%description
+Get a random temporary file path
+
+
+%prep
+%autosetup -n package
+# setup the tests
+cp -p %{SOURCE1} .
+
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json index.js \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+%{_bindir}/ava
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc readme.md
+%license license
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Wed Apr 4 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 2.0.0-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..5489a29
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (tempfile-2.0.0.tgz) =
64e9fa9c9520be00b4f7e768084177a01fabdda83b914be5b171065f4ebd4110fad29f8fdee3fb5c6f4ddbf6adf84c8844648dfff658dcbc84a2d0356299a3b8
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..7e1ec6c
--- /dev/null
+++ b/test.js
@@ -0,0 +1,8 @@
+import {tmpdir} from 'os';
+import test from 'ava';
+import m from '.';
+
+test(t => {
+ t.true(m().includes(tmpdir()));
+ t.true(m('.png').endsWith('.png'));
+});