File meson64-tools.spec of Package meson64-tools

#
# spec file for package meson64-tools
#
# 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:           meson64-tools
Version:        0
Release:        0
Summary:        Utilities for use with Amlogic 922X SoCs
License:        MIT
Group:          Hardware/Other
URL:            https://github.com/angerman/meson64-tools
Source:         %{name}-%{version}.tar.xz
Patch0:         makefile.patch
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  mbedtls-devel
BuildRequires:  pkgconfig(liblz4)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Opensource tools to replace aml_encrypt_g12b.

%prep
%setup -q
%patch -P 0 -p1

%build
export CFLAGS="${CFLAGS:-%optflags}"
export CXXFLAGS="${CXXFLAGS:-%optflags}"
export FFLAGS="${FFLAGS:-%optflags}"
export LDFLAGS="${LDFLAGS:--Wl,--as-needed -Wl,--no-undefined -Wl,-z,now}"

make %{?_smp_mflags} all pkg

%install
make install PREFIX=%{buildroot}%{_bindir}

%files
%defattr(-,root,root)
%doc README.md
%license LICENSE
%{_bindir}/bl2sig
%{_bindir}/bl30sig
%{_bindir}/bl3sig
%{_bindir}/bootmk
%{_bindir}/pkg

%changelog
openSUSE Build Service is sponsored by