File sunxi-tools.spec of Package sunxi-tools
#
# spec file for package sunxi-tools
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: sunxi-tools
Version: 1.3
Release: 0
Summary: Tools for Allwinner A10 devices
License: GPL-2.0+
Group: Development/Tools/Other
Url: https://github.com/linux-sunxi/sunxi-tools
Source: https://github.com/linux-sunxi/sunxi-tools/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libusb-1_0-devel
BuildRequires: pkg-config
%description
Tools to help hacking Allwinner A10 (aka sun4i) based devices
and its successors.
%define sunxi_arch armv7hl aarch64
%prep
%setup -q
%build
make %{?_smp_mflags} CFLAGS="-std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ %{optflags}"
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} PREFIX=%{_prefix} BINDIR=%{_bindir} \
%ifarch %sunxi_arch
install-tools install-target-tools
%else
install-tools
%endif
%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/bin2fex
%{_bindir}/fex2bin
%{_bindir}/sunxi-bootinfo
%{_bindir}/sunxi-fel
%{_bindir}/sunxi-fexc
%{_bindir}/sunxi-nand-part
%ifarch %sunxi_arch
%{_bindir}/sunxi-pio
%endif
%changelog