Name:           duktape
Version:        2.7.0
Release:        1%{?_dist_release}
Summary:        Embeddable Javascript engine
Group:          system
Vendor:         Project Vine
Distribution:   Vine Linux

License:        MIT
URL:            http://duktape.org/
Source0:        http://duktape.org/%{name}-%{version}.tar.xz
Source1000:     ChangeLog.fedora
Patch0:         duktape-2.7.0-link-against-libm.patch

BuildRequires:  gcc
BuildRequires:  pkgconfig
BuildRequires:  make

%description
Duktape is an embeddable Javascript engine, with a focus on portability and
compact footprint.


%package        devel
Summary:        Development files for %{name}
Group:          programming
Requires:       %{name} = %{version}

%description    devel
Embeddable Javascript engine.

This package contains header files and libraries needed to develop
application that use %{name}.


%debug_package


%prep
%autosetup -p1

cp -f %{SOURCE1000} ./


%build
%make_build -f Makefile.sharedlibrary INSTALL_PREFIX=%{_prefix} LIBDIR=/%{_lib}


%install
%make_install -f Makefile.sharedlibrary INSTALL_PREFIX=%{_prefix} LIBDIR=/%{_lib}


%files
%license LICENSE.txt
%doc AUTHORS.rst ChangeLog.fedora
%{_libdir}/libduktape.so.*
%{_libdir}/libduktaped.so.*

%files devel
%doc examples/ README.rst
%{_includedir}/duk_config.h
%{_includedir}/duktape.h
%{_libdir}/libduktape.so
%{_libdir}/libduktaped.so
%{_libdir}/pkgconfig/duktape.pc


%changelog
* Thu Jul 18 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.7.0-1
- initial build for Vine Linux.
