Files
jerryscript/jerryscript.spec

92 lines
2.6 KiB
RPMSpec
Raw Permalink Normal View History

2026-02-24 21:20:33 -05:00
#
# spec file for package jerryscript
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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: jerryscript
Version: 3.0.0
Release: 0
Summary: JavaScript engine for the Internet of Things
License: Apache-2.0
Group: Development/Languages/Other
URL: https://jerryscript.net/
Source: https://github.com/jerryscript-project/jerryscript/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: jerryscript-3.0.0-no-werror.patch
BuildRequires: cmake
%description
JerryScript is a lightweight JavaScript engine for resource-constrained
devices such as microcontrollers. It can run on devices with less than
64 KB of RAM and less than 200 KB of flash memory.
%package devel
Summary: Development files for package %{name}
Requires: %{name} = %{version}
%description devel
Libraries and header files for %{name}.
%prep
%autosetup -p1
2026-02-24 21:23:05 -05:00
# fixes from: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/jerryscript/jerryscript-3.0.0.ebuild#n27
find . -name CMakeLists.txt -print0 | xargs -0 sed -i \
-e "s:lib/pkgconfig:%{_libdir}/pkgconfig:" \
-e "s:DESTINATION lib):DESTINATION %{_libdir}):"
find . -name '*.pc.in' -print0 | xargs -0 sed -i \
-e "s|/lib\$|/%{_libdir}|"
2026-02-24 21:20:33 -05:00
%build
mkdir build && cd build
cmake \
.. \
-DJERRY_CMDLINE=ON \
-DENABLE_STRIP=OFF \
-DJERRY_DEBUGGER=ON \
-DJERRY_ERROR_MESSAGES=ON \
-DJERRY_EXTERNAL_CONTEXT=ON \
-DJERRY_LINE_INFO=ON \
-DJERRY_LOGGING=ON \
-DJERRY_PARSER_DUMP_BYTE_CODE=ON \
-DJERRY_PARSER=ON \
-DJERRY_REGEXP_DUMP_BYTE_CODE=ON \
-DJERRY_SNAPSHOT_EXEC=ON \
-DJERRY_SNAPSHOT_SAVE=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
%cmake_build
%install
%cmake_install
%files
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_bindir}/jerry
%{_libdir}/libjerry-core.so
%{_libdir}/libjerry-ext.so
%{_libdir}/libjerry-port.so
%files devel
%{_includedir}/jerry*
%{_libdir}/pkgconfig/libjerry-core.pc
%{_libdir}/pkgconfig/libjerry-ext.pc
%{_libdir}/pkgconfig/libjerry-port.pc
%changelog