Sophie

Sophie

distrib > Mageia > 8 > armv7hl > by-pkgid > 662415b8fe195cd4b797c51286ef5793 > files > 2

dtc-1.5.1-3.mga8.src.rpm

%define major   1
%define libname %mklibname fdt %{major}
%define devname %mklibname fdt -d

Name:          dtc
Version:       1.5.1
Release:       %mkrel 3
Summary:       Device Tree Compiler
Group:         Development/Tools
License:       GPLv2+
URL:           https://devicetree.org/

Source0:       https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
#Patch1:        use-tx-as-the-type-specifier-instead-of-zx.patch

BuildRequires: gcc make
BuildRequires: flex bison swig
BuildRequires: python3-devel python3-setuptools

%description
Devicetree is a data structure for describing hardware. Rather than hard coding
every detail of a device into an operating system, many aspects of the hardware
can be described in a data structure that is passed to the operating system at
boot time. The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer
(OPAL), Power Architecture Platform Requirements (PAPR) and in the standalone
Flattened Device Tree (FDT) form.

%package -n %{libname}
Summary: Device tree library
Group: System/Libraries

%description -n %{libname}
libfdt is a library to process Open Firmware style device trees on various
architectures.

%package -n %{devname}
Summary: Development headers for device tree library
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: libfdt-devel = %{version}-%{release}

%description -n %{devname}
This package provides development files for libfdt

%package -n python3-libfdt
Summary: Python 3 bindings for device tree library
%{?python_provide:%python_provide python3-libfdt}
Requires: %{name} = %{version}-%{release}

%description -n python3-libfdt
This package provides python3 bindings for libfdt

%prep
%autosetup -p1
sed -i 's/python2/python3/' pylibfdt/setup.py

%build
%define _legacy_common_support 1
%make_build CC="gcc %{optflags} %{ldflags}" CC="gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS"

%install
#make_install SETUP_PREFIX=%{buildroot}%{_prefix} PREFIX=%{_prefix} LIBDIR=%{_libdir}
PYTHON=python3 make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
                            LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} V=1
find %{buildroot} -type f -name "*.a" -delete

# we don't want or need ftdump and it conflicts with freetype-demos, so drop
# it (rhbz 797805)
rm -f %{buildroot}%{_bindir}/ftdump

%files
%license GPL
%doc Documentation/manual.txt
%{_bindir}/*

%files -n %{libname}
%license GPL
%{_libdir}/libfdt-1.5.0.so
%{_libdir}/libfdt.so.%{major}

%files -n %{devname}
%{_libdir}/libfdt.so
%{_includedir}/*

%files -n python3-libfdt
%{python3_sitearch}/*


%changelog
* Sun Jul 05 2020 joequant <joequant> 1.5.1-3.mga8
+ Revision: 1602131
- bump
- build gcc10

* Sun Feb 16 2020 umeabot <umeabot> 1.5.1-2.mga8
+ Revision: 1532213
- Mageia 8 Mass Rebuild

* Mon Sep 16 2019 tv <tv> 1.5.1-1.mga8
+ Revision: 1442248
- new release
- use our build flags during build
- switch for python3 for building

* Sun Sep 23 2018 umeabot <umeabot> 1.4.6-2.mga7
+ Revision: 1297520
- Mageia 7 Mass Rebuild

* Fri Jun 01 2018 wally <wally> 1.4.6-1.mga7
+ Revision: 1233500
- new version 1.4.6
- sync patches with fedora

* Fri Apr 15 2016 tv <tv> 1.4.1-1.mga6
+ Revision: 1001701
- imported package dtc