The package rpms/mozilla-iot-gateway-addon-node.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/mozilla-iot-gateway-addon-node.gi....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 55d6e19203bb88e0d9a959173f12147f6edb8a8d
Author: Troy Dawson <tdawson(a)redhat.com>
Date: Fri Mar 1 13:22:25 2019 -0800
Initial import (#1680145)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3b20d82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/gateway-addon-node-v0.4.0.tar.gz
diff --git a/gateway-addon-node-tarball.sh b/gateway-addon-node-tarball.sh
new file mode 100644
index 0000000..c6f3d0e
--- /dev/null
+++ b/gateway-addon-node-tarball.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Setup for this script:
+# dnf install nodejs-yarn
+#
+
+#version=$(rpm -q --specfile --qf='%{version}\n' gateway.spec | head -n1)
+version=0.4.0
+
+## Download and setup code
+wget
https://github.com/mozilla-iot/gateway-addon-node/archive/v$version.tar.gz
+tar xfz v$version.tar.gz
+cd gateway-addon-node-$version
+
+## Download npm libraries, except for sqlite3
+sed -i "/sqlite3/d" package.json
+sed -i "s|\(.*ajv.*\),|\1|" package.json
+yarnpkg --ignore-optional
+sed -i "s|.*ajv.*|&,\n \"sqlite3\": \"^4.0.0\"|"
package.json
+
+## Create tarball
+cd ..
+tar cfz gateway-addon-node-v$version.tar.gz gateway-addon-node-$version
+
+## Cleanup
+rm -rf v$version.tar.gz gateway-addon-node-$version
diff --git a/mozilla-iot-gateway-addon-node.spec b/mozilla-iot-gateway-addon-node.spec
new file mode 100644
index 0000000..45a113f
--- /dev/null
+++ b/mozilla-iot-gateway-addon-node.spec
@@ -0,0 +1,73 @@
+%global npm_name gateway-addon-node
+%global debug_package %{nil}
+%{?nodejs_find_provides_and_requires}
+
+# don't require bundled modules
+%global __requires_exclude_from ^%{_prefix}/lib/node_modules/gateway-addon-node/.*$
+
+Name: mozilla-iot-gateway-addon-node
+Version: 0.4.0
+Release: 1%{?dist}
+Summary: Node bindings for Mozilla IoT Gateway
+## Licenses
+# MPLv2.0 : mozilla-iot-gateway-addon-node
+# BSD : uri-js (bundled)
+# MIT : ajv fast-deep-equal punycode (all bundled)
+# MIT : fast-json-stable-stringify json-schema-traverse (all bundled)
+License: MPLv2.0 and BSD and MIT
+URL:
https://github.com/mozilla-iot/gateway-addon-node
+# Source0 was created by running gateway-addon-node-tarball.sh
+Source0: gateway-addon-node-v%{version}.tar.gz
+Source1: gateway-addon-node-tarball.sh
+
+ExclusiveArch: %{nodejs_arches} noarch
+BuildArch: noarch
+
+BuildRequires: nodejs-packaging
+## All the unbundled node modules - Required
+Requires: npm(sqlite3)
+## All the bundled node modules - Provides: bundled
+Provides: bundled(ajv) = 6.8.1
+Provides: bundled(fast-deep-equal) = 2.0.1
+Provides: bundled(fast-json-stable-stringify) = 2.0.0
+Provides: bundled(json-schema-traverse) = 0.4.1
+Provides: bundled(punycode) = 2.1.1
+Provides: bundled(uri-js) = 4.2.2
+
+
+%description
+Node bindings for Node add-ons for Mozilla IoT Gateway.
+
+
+%prep
+%autosetup -n %{npm_name}-%{version}
+
+# Clean up hidden files
+find node_modules -name .travis.yml -delete
+find node_modules -name .eslintrc.yml -delete
+find node_modules -name .npmignore -delete
+find node_modules -name .yarn-integrity -delete
+find node_modules -name .tonic_example.js -delete
+find node_modules -name .DS_Store -delete
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
+cp -pr index.js lib node_modules package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
+
+
+%files
+%doc README.md
+%license LICENSE
+%{nodejs_sitelib}/%{npm_name}
+
+
+%changelog
+* Fri Feb 08 2019 Troy Dawson <tdawson(a)redhat.com> - 0.4.0-1
+- Initial build with 0.4.0
+- Bundle nodejs dependencies
+- Unbundle binary (arch dependant) modules, add Requires for these.
+- Include licenses and Provides for bundled modules
diff --git a/sources b/sources
new file mode 100644
index 0000000..ae9016a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (gateway-addon-node-v0.4.0.tar.gz) =
519a79e56694985e68342c412e0c8c9a06fc04c7b46cc6c1336594b2b0ecee971f00c6e13aafa27eb0e1dd3e0bb9d1cf787e639f497ea3a92e3d29dc5fc67740