d3b4f9
Name:          dtc
d3b4f9
Version:       1.6.0
d3b4f9
Release:       1%{?dist}
d3b4f9
Summary:       Device Tree Compiler
d3b4f9
Group:          Development/Tools
d3b4f9
License:       GPLv2+
d3b4f9
URL:           https://devicetree.org/
d3b4f9
Source:        https://github.com/dgibson/dtc/archive/v%{version}.tar.gz
d3b4f9
d3b4f9
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d3b4f9
d3b4f9
d3b4f9
BuildRequires: gcc make
d3b4f9
BuildRequires: flex bison
d3b4f9
d3b4f9
%description
d3b4f9
Devicetree is a data structure for describing hardware. Rather than hard coding
d3b4f9
every detail of a device into an operating system, many aspects of the hardware
d3b4f9
can be described in a data structure that is passed to the operating system at
d3b4f9
boot time. The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer
d3b4f9
(OPAL), Power Architecture Platform Requirements (PAPR) and in the standalone
d3b4f9
Flattened Device Tree (FDT) form.
d3b4f9
d3b4f9
%package -n libfdt
d3b4f9
Summary: Device tree library
d3b4f9
Group: Development/Libraries
d3b4f9
d3b4f9
%description -n libfdt
d3b4f9
libfdt is a library to process Open Firmware style device trees on various
d3b4f9
architectures.
d3b4f9
d3b4f9
%package -n libfdt-devel
d3b4f9
Summary: Development headers for device tree library
d3b4f9
Group: Development/Libraries
d3b4f9
Requires: libfdt = %{version}-%{release}
d3b4f9
d3b4f9
%description -n libfdt-devel
d3b4f9
This package provides development files for libfdt
d3b4f9
d3b4f9
%prep
d3b4f9
%setup -q -n dtc-%{version}
d3b4f9
d3b4f9
d3b4f9
%build
d3b4f9
make %{?_smp_mflags} V=1 CC="gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS" NO_PYTHON=1
d3b4f9
d3b4f9
%install
d3b4f9
make install DESTDIR=$RPM_BUILD_ROOT SETUP_PREFIX=$RPM_BUILD_ROOT/usr PREFIX=/usr LIBDIR=%{_libdir} NO_PYTHON=1
d3b4f9
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.a
d3b4f9
d3b4f9
# we don't want or need ftdump and it conflicts with freetype-demos, so drop
d3b4f9
# it (rhbz 797805)
d3b4f9
rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
d3b4f9
d3b4f9
%post -n libfdt -p /sbin/ldconfig
d3b4f9
d3b4f9
%postun -n libfdt -p /sbin/ldconfig
d3b4f9
d3b4f9
%clean
d3b4f9
rm -rf $RPM_BUILD_ROOT
d3b4f9
d3b4f9
%files
d3b4f9
%defattr(-,root,root,-)
d3b4f9
%license GPL
d3b4f9
%doc Documentation/manual.txt
d3b4f9
%{_bindir}/*
d3b4f9
d3b4f9
%files -n libfdt
d3b4f9
%defattr(-,root,root,-)
d3b4f9
%license GPL
d3b4f9
%{_libdir}/libfdt-%{version}.so
d3b4f9
%{_libdir}/libfdt.so.*
d3b4f9
d3b4f9
%files -n libfdt-devel
d3b4f9
%defattr(-,root,root,-)
d3b4f9
%{_libdir}/libfdt.so
d3b4f9
%{_includedir}/*
d3b4f9
d3b4f9
%changelog
d3b4f9
* Fri Apr 17 2020 Miroslav Rezanina <mrezanin@redhat.com> - 1.6.0-1
d3b4f9
- Use 1.6.0 version [bz#1679676]
d3b4f9
- Resolves: bz#1679676
d3b4f9
  (dtc changes blocked until gating tests are added)
d3b4f9
d3b4f9
* Thu Aug 09 2018 Miroslav Rezanina <mrezanin@redhat.com> - 1.4.6-1
d3b4f9
- Updated for RHEL 8 [bz#1518440]
d3b4f9
- Resolves: bz#1518440
d3b4f9
  (Prepare dtc for RHEL-8.0 )
d3b4f9
d3b4f9
* Mon Mar 06 2017 Miroslav Rezanina <mrezanin@redhat.com> - 1.4.3-1
d3b4f9
- Rebase to 1.4.3 [bz#1427157]
d3b4f9
- Resolves: bz#1427157
d3b4f9
  (package libfdt 1.4.3, when available)
d3b4f9
d3b4f9
* Tue Aug 19 2014 Miroslav Rezanina <mrezanin@redhat.com> - 1.4.0-2
d3b4f9
- Update power macro for ppc64le
d3b4f9
d3b4f9
* Fri Jul 25 2014 Miroslav Rezanina <mrezanin@redhat.com> - 1.4.0-1
d3b4f9
- Initial version
d3b4f9