File echo-sample.spec of Package echo-sample
#
# spec file for package echo-sample
#
# Copyright (c) 2025 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: echo-sample
Version: 4.2.4+git.20240109T235022.8da415e
Release: 0
Summary: Sample for the Haxe echo library
License: MIT
URL: https://github.com/AustinEast/echo/tree/master/sample
Source: echo-%{version}.tar.xz
Source1: vendor.tar.gz
Patch: compile_to_c.patch
BuildRequires: hashlink-devel
BuildRequires: haxe
%description
Sample for the Haxe echo library. echo is a Simple Physics Library written in
Haxe.
%prep
%autosetup -p1 -a1 -n echo-%{version}
%build
pushd sample
haxe build.hxml
pushd bin
cc -o %{name} \
echo-sample.c \
-I. \
-lhl %{_libdir}/*.hdll \
-lm
%install
install -m0755 -D sample/bin/%{name} %{buildroot}%{_bindir}/%{name}
%files
%doc README.md
%{_bindir}/%{name}