commit 35d1590ebd131ccb33a22e37c64fc72bba9125f7d9ee2e4f475e83fbca190f69 Author: Avindra Goolcharan Date: Tue Jan 26 16:33:46 2021 +0000 Accepting request 866962 from home:avindra:devel:languages:javascript +espruino OBS-URL: https://build.opensuse.org/request/show/866962 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/espruino?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Espruino-2.08.tar.xz b/Espruino-2.08.tar.xz new file mode 100644 index 0000000..f54a0ba --- /dev/null +++ b/Espruino-2.08.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ec6ed5575cf2daaff9ab49173e9ba163bc9e66261aadb0ad526f936eb47e9b9 +size 20098180 diff --git a/_service b/_service new file mode 100644 index 0000000..e646bc2 --- /dev/null +++ b/_service @@ -0,0 +1,22 @@ + + + + + git + https://github.com/espruino/Espruino + + 2.08 + 8af54959a34b11d90f6eafdb99d9c932f09c0c13 + + + docs + + + + *.tar + xz + + + diff --git a/espruino.changes b/espruino.changes new file mode 100644 index 0000000..cbfd2a2 --- /dev/null +++ b/espruino.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Sun Jan 3 21:09:04 UTC 2021 - Avindra Goolcharan + +- update package to v2.08 + +------------------------------------------------------------------- +Wed Feb 21 08:29:02 UTC 2018 - Huaren Zhong + +- create initial package for version 1.95 +- added fix for 64-bit build diff --git a/espruino.spec b/espruino.spec new file mode 100644 index 0000000..c7802f1 --- /dev/null +++ b/espruino.spec @@ -0,0 +1,51 @@ +# +# spec file for package espruino +# +# Copyright (c) 2021 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: espruino +Version: 2.08 +Release: 0 +Summary: JavaScript interpreter optimized for microcontrollers +License: MPL-2.0 +URL: https://www.espruino.com +Source: Espruino-%{version}.tar.xz +BuildRequires: python2-base +BuildRequires: gcc-c++ +# replaces "shell git" in Makefile with noops +Patch0: fix-no-git.patch + +%description + +%prep +%autosetup -n Espruino-%{version} -p1 +# apply same fix from: +# https://build.opensuse.org/package/view_file/home:zhonghuaren/espruino/espruino.spec?expand=1 +sed -i 's|if USE_64BIT|ifdef USE_64BIT|' src/jsnative.c +./scripts/provision.sh LINUX + +%build +%make_build + +%install +install -Dm755 %{name} %{buildroot}%{_bindir}/%{name} + +%files +%license LICENSE +%doc ChangeLog README.md +%{_bindir}/%{name} + +%changelog diff --git a/fix-no-git.patch b/fix-no-git.patch new file mode 100644 index 0000000..5acdde3 --- /dev/null +++ b/fix-no-git.patch @@ -0,0 +1,34 @@ +diff --git a/Makefile.orig b/Makefile +index 2cf73f4..de6e080 100644 +--- a/Makefile.orig ++++ b/Makefile +@@ -78,7 +78,7 @@ CCFLAGS?= # specific flags when compiling cc files + LDFLAGS?=-Winline -g + OPTIMIZEFLAGS?= + #-fdiagnostics-show-option - shows which flags can be used with -Werror +-DEFINES+=-DGIT_COMMIT=$(shell git log -1 --format="%h") ++DEFINES+=-DGIT_COMMIT=DEADBEEF + + ifeq ($(shell uname),Darwin) + MACOSX=1 +@@ -100,9 +100,9 @@ endif + ifndef ALT_RELEASE + # Default release labeling. (This may fail and give inconsistent results due to the fact that + # travis does a shallow clone.) +-LATEST_RELEASE=$(shell git tag | grep RELEASE_ | sort | tail -1) ++LATEST_RELEASE=2.08 + # use egrep to count lines instead of wc to avoid whitespace error on Mac +-COMMITS_SINCE_RELEASE=$(shell git log --oneline $(LATEST_RELEASE)..HEAD | egrep -c .) ++COMMITS_SINCE_RELEASE=0 + ifneq ($(COMMITS_SINCE_RELEASE),0) + DEFINES += -DBUILDNUMBER=\"$(COMMITS_SINCE_RELEASE)\" + endif +@@ -116,7 +116,7 @@ else + # v1.81.peter_experiment_83bd432, where the last letters are the short of the current commit SHA. + # Warning: this same release label derivation is also in scripts/common.py in get_version() + LATEST_RELEASE=$(shell egrep "define JS_VERSION .*\"$$" src/jsutils.h | egrep -o '[0-9]v[0-9]+') +-COMMITS_SINCE_RELEASE=$(ALT_RELEASE)_$(subst -,_,$(shell git name-rev --name-only HEAD))_$(shell git rev-parse --short HEAD) ++COMMITS_SINCE_RELEASE=$(ALT_RELEASE)_$(subst -,_,main)_src + # Figure out whether we're building a tagged commit (true release) or not + TAGGED:=$(shell if git describe --tags --exact-match >/dev/null 2>&1; then echo yes; fi) + ifeq ($(TAGGED),yes)