File tme.spec of Package tme

#
# spec file for package tme
#
# Copyright (c) 2024 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:           tme
Version:        0.12rc10
Release:        0
License:        BSD-4-Clause
URL:            https://github.com/phabrics/tme
Group:          Applications/Emulator

Summary:        The Machine Emulator
Source0:        tme-%{version}.tar.gz
Patch1:         0001-Ignore-generated-files.patch
Patch2:         0002-memory-auto.m4-Replace-as_echo-with-AS_ECHO.patch
Patch3:         0003-float-auto.m4-Replace-as_echo-with-AS_ECHO.patch
Patch4:         0004-bus-device-auto.m4-Replace-as_echo-with-AS_ECHO.patch
Patch5:         0005-fb-xlat-auto.m4-Replace-as_echo-with-AS_ECHO.patch
Patch6:         0006-ieee754-misc-auto.m4-ieee754-ops-auto.m4-ieee754-pre.patch
Patch7:         0007-m6888x-auto.m4-m68k-bus-auto.m4-m68k-insns-auto.m4-m.patch
Patch8:         0008-sparc-bus-auto.m4-sparc-fpu-auto.m4-sparc-insns-auto.patch
Patch9:         0009-cast-TME_ALIGN.patch
Patch10:        0010-add-return-at-end-of-function.patch
Patch11:        0011-Adapt-to-newer-libnftnl.patch
Patch12:        0012-strdup-string-constant-since-tmesh-input.y-does-a-fr.patch

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  gtk3-devel
BuildRequires:  iproute2
BuildRequires:  libnftnl-devel
BuildRequires:  libtool
BuildRequires:  LibVNCServer-devel
BuildRequires:  make
BuildRequires:  makeinfo
BuildRequires:  SDL2-devel

Requires(post): /sbin/ldconfig
PreReq:         permissions

%description

This is TME: The Machine Emulator, an extensible platform for creating
& implementing dynamic machine specifications and running / testing /
debugging them. Mostly targeting at emulation of SUN3 (68k) and SUN4
(Sparc) platforms.

%package devel
Summary:        Development environment for the machine emulator
Requires:       %{name}

%description devel
This package brings C include files and libraries for development
with the machine emulator.

%prep
%autosetup -p1 -n tme-%{version}

%build
autoreconf -fi -I.
INCLUDES=`pkg-config --cflags libnftnl` 
CFLAGS="$RPM_OPT_FLAGS $INCLUDES" ./configure \
        --prefix=%{_prefix} \
        --libdir=%{_libdir} \
        --disable-static \
        --enable-nat \
        --enable-debug
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/%{_libdir}/*.la

%check
make %{?_smp_mflags} check

%post
/sbin/ldconfig
%set_permissions %{_bindir}/tmesh
%verifyscript
%verify_permissions -e %{_bindir}/tmesh

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)

%doc README
%license COPYING
%{_bindir}/*
%{_libdir}/lib*0
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/tme*0
%{_libdir}/%{name}/*txt
%{_libdir}/%{name}/tme*.so
%{_libdir}/%{name}/tme*.la
%{_datadir}/info/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/examples

%files devel
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/lib*.so
%{_datadir}/%{name}/*.h

%changelog
openSUSE Build Service is sponsored by