Files
assemblyscript/assemblyscript.spec

68 lines
1.9 KiB
RPMSpec

#
# spec file for package assemblyscript
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: assemblyscript
Version: 0.18.12
Release: 0
Summary: Definitely not a TypeScript to WebAssembly compiler
License: Apache-2.0
Group: Development
URL: https://assemblyscript.org
Source: %{name}-%{version}.tar.gz
Source1: node_modules.tar.gz
Source2: %{name}-rpmlintrc
BuildRequires: fdupes
BuildRequires: nodejs
BuildRequires: npm
BuildRequires: yarn
Requires: npm
ExclusiveArch: x86_64
%description
AssemblyScript compiles a strict variant of TypeScript (basically
JavaScript with types) to WebAssembly using Binaryen. It generates lean
and mean WebAssembly modules while being just an npm install away.
%prep
%setup -q
tar xf %{S:1}
%build
npm install
%install
mkdir -p %{buildroot}%{_libdir}/node_modules
cp -a . %{buildroot}%{_libdir}/node_modules/%{name}
%fdupes %{buildroot}%{_libdir}/node_modules/%{name}
mkdir -p %{buildroot}%{_bindir}
(cd %{buildroot}%{_bindir}; ln -sf ../%{_lib}/node_modules/%{name}/bin/asc .)
(cd %{buildroot}%{_bindir}; ln -sf ../%{_lib}/node_modules/%{name}/bin/asinit .)
%files
%doc README.md
%doc NOTICE
%license LICENSE
%dir %{_libdir}/node_modules/assemblyscript
%{_libdir}/node_modules/assemblyscript
%{_bindir}/*
%changelog