a30a018
%global with_mingw 0
a30a018
a30a018
%if 0%{?fedora}
a30a018
%global with_mingw 1
a30a018
%endif
a30a018
ae73cb7
%undefine _auto_set_build_flags
ae73cb7
c0cd836
Name:          dtc
7899631
Version:       1.7.0
af57dc7
Release:       7%{?dist}
c0cd836
Summary:       Device Tree Compiler
326c4de
License:       GPL-2.0-or-later
c0cd836
URL:           https://devicetree.org/
c0cd836
cbaa4c5
Source0:       https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
c0cd836
f20e532
BuildRequires: gcc make
c0cd836
BuildRequires: flex bison swig
796c762
BuildRequires: python3-devel
796c762
BuildRequires: python3-pip
796c762
BuildRequires: python3-setuptools
796c762
BuildRequires: python3-setuptools_scm
796c762
BuildRequires: python3-wheel
1338fb3
a30a018
%if %{with_mingw}
a30a018
BuildRequires: mingw32-filesystem >= 95
a30a018
BuildRequires: mingw32-gcc-c++
a30a018
3f75386
BuildRequires: meson
3f75386
a30a018
BuildRequires: mingw64-filesystem >= 95
a30a018
BuildRequires: mingw64-gcc-c++
a30a018
%endif
a30a018
1338fb3
%description
c0cd836
Devicetree is a data structure for describing hardware. Rather than hard coding
c0cd836
every detail of a device into an operating system, many aspects of the hardware
c0cd836
can be described in a data structure that is passed to the operating system at
c0cd836
boot time. The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer
c0cd836
(OPAL), Power Architecture Platform Requirements (PAPR) and in the standalone
c0cd836
Flattened Device Tree (FDT) form.
1338fb3
dd8478d
%package -n libfdt
dd8478d
Summary: Device tree library
dd8478d
dd8478d
%description -n libfdt
dd8478d
libfdt is a library to process Open Firmware style device trees on various
dd8478d
architectures.
dd8478d
dd8478d
%package -n libfdt-devel
dd8478d
Summary: Development headers for device tree library
dd8478d
Requires: libfdt = %{version}-%{release}
dd8478d
dd8478d
%description -n libfdt-devel
dd8478d
This package provides development files for libfdt
dd8478d
8b14c17
%package -n libfdt-static
8b14c17
Summary: Static version of device tree library
8b14c17
Requires: libfdt-devel = %{version}-%{release}
8b14c17
8b14c17
%description -n libfdt-static
8b14c17
This package provides the static library of libfdt
8b14c17
cbaa4c5
%package -n python3-libfdt
cbaa4c5
Summary: Python 3 bindings for device tree library
c0cd836
%{?python_provide:%python_provide python2-libfdt}
c0cd836
Requires: %{name}%{?_isa} = %{version}-%{release}
c0cd836
cbaa4c5
%description -n python3-libfdt
c0cd836
This package provides python2 bindings for libfdt
c0cd836
a30a018
%if %{with_mingw}
a30a018
%package -n mingw32-libfdt
a30a018
Summary: MinGW Device tree library
a30a018
BuildArch: noarch
a30a018
a30a018
%description -n mingw32-libfdt
a30a018
libfdt is a library to process Open Firmware style device trees on various
a30a018
architectures.
a30a018
796c762
%package -n mingw32-libfdt-static
796c762
Summary: Static version of MinGW Device tree library
796c762
Requires: mingw32-libfdt = %{version}-%{release}
796c762
BuildArch: noarch
796c762
796c762
%description -n mingw32-libfdt-static
796c762
This package provides the static library of mingw32-libfdt
796c762
a30a018
%package -n mingw64-libfdt
a30a018
Summary: MinGW Device tree library
a30a018
BuildArch: noarch
a30a018
a30a018
%description -n mingw64-libfdt
a30a018
libfdt is a library to process Open Firmware style device trees on various
a30a018
architectures.
a30a018
796c762
%package -n mingw64-libfdt-static
796c762
Summary: Static version of MinGW Device tree library
796c762
Requires: mingw64-libfdt = %{version}-%{release}
796c762
BuildArch: noarch
796c762
796c762
%description -n mingw64-libfdt-static
796c762
This package provides the static library of mingw64-libfdt
796c762
a30a018
%{?mingw_debug_package}
a30a018
%endif
a30a018
1338fb3
%prep
975efc6
%autosetup -p1
9471eab
# to prevent setuptools from installing an .egg, we need to pass --root to setup.py install
9471eab
# since $(PREFIX) already contains %%{buildroot}, we set root to /
9471eab
# .eggs are going to be deprecated, see https://github.com/pypa/pip/issues/11501
9471eab
sed -i 's@--prefix=$(PREFIX)@--prefix=$(PREFIX) --root=/@' pylibfdt/Makefile.pylibfdt
9471eab
1338fb3
1338fb3
%build
796c762
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
ae73cb7
%{make_build} EXTRA_CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}"
1338fb3
a30a018
%if %{with_mingw}
a30a018
%mingw_meson -Dtools=false
a30a018
%mingw_ninja
a30a018
%endif
a30a018
1338fb3
%install
796c762
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
ae73cb7
%{make_install} DESTDIR=%{buildroot} PREFIX=%{buildroot}/%{_prefix} \
d7d6d74
                LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir}
1338fb3
ea059f8
# we don't want ftdump and it conflicts with freetype-demos, so drop it (rhbz 797805)
308f957
rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
308f957
a30a018
%if %{with_mingw}
a30a018
%mingw_ninja_install
a30a018
%mingw_debug_install_post
a30a018
%endif
a30a018
228e837
%ldconfig_scriptlets -n libfdt
1338fb3
1338fb3
%files
da47f0d
%license GPL
da47f0d
%doc Documentation/manual.txt
1338fb3
%{_bindir}/*
1338fb3
dd8478d
%files -n libfdt
da47f0d
%license GPL
50447a6
%{_libdir}/libfdt-%{version}.so
dd8478d
%{_libdir}/libfdt.so.*
dd8478d
8b14c17
%files -n libfdt-static
8b14c17
%{_libdir}/libfdt.a
8b14c17
dd8478d
%files -n libfdt-devel
dd8478d
%{_libdir}/libfdt.so
dd8478d
%{_includedir}/*
dd8478d
cbaa4c5
%files -n python3-libfdt
9471eab
%{python3_sitearch}/libfdt-%{version}-py%{python3_version}.egg-info/
9471eab
%{python3_sitearch}/_libfdt%{python3_ext_suffix}
9471eab
%pycached %{python3_sitearch}/libfdt.py
dd8478d
a30a018
%if %{with_mingw}
a30a018
%files -n mingw32-libfdt
a30a018
%license GPL
a30a018
%{mingw32_bindir}/libfdt-1.dll
a30a018
%{mingw32_includedir}/*fdt*.h
a30a018
%{mingw32_libdir}/libfdt.dll.a
a30a018
%{mingw32_libdir}/pkgconfig/libfdt.pc
a30a018
796c762
%files -n mingw32-libfdt-static
796c762
%{mingw32_libdir}/libfdt.a
796c762
a30a018
%files -n mingw64-libfdt
a30a018
%license GPL
a30a018
%{mingw64_bindir}/libfdt-1.dll
a30a018
%{mingw64_includedir}/*fdt*.h
a30a018
%{mingw64_libdir}/libfdt.dll.a
a30a018
%{mingw64_libdir}/pkgconfig/libfdt.pc
796c762
796c762
%files -n mingw64-libfdt-static
796c762
%{mingw64_libdir}/libfdt.a
a30a018
%endif
a30a018
1338fb3
%changelog
af57dc7
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-7
af57dc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
af57dc7
e81dcdb
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-6
e81dcdb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
e81dcdb
9471eab
* Wed Sep 27 2023 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-5
9471eab
- Don't install a Python .egg
9471eab
fc4b887
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
fc4b887
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
fc4b887
98b72a9
* Wed Jul 05 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.7.0-3
98b72a9
- Rebuilt for Python 3.12
98b72a9
0a058ff
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1.7.0-2
0a058ff
- Rebuilt for Python 3.12
0a058ff
7899631
* Mon Mar 20 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1.7.0-1
7899631
- Update to 1.7.0
7899631
326c4de
* Mon Feb 13 2023 Josh Boyer <jwboyer@fedoraproject.org> - 1.6.1-8
326c4de
- migrated to SPDX license
326c4de
63e076a
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-7
63e076a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
63e076a
a30a018
* Wed Sep 14 2022 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.6.1-6
a30a018
- Add mingw sub-packages. Fixes rhbz#1997511
a30a018
a0028a7
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-5
a0028a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
a0028a7
e10403d
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.6.1-4
e10403d
- Rebuilt for Python 3.11
e10403d
3c10fb6
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-3
3c10fb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
3c10fb6
e08db57
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
e08db57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e08db57
68a7614
* Tue Jun 08 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.6.1-1
68a7614
- Update to 1.6.1
68a7614
6fa1364
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.0-5
6fa1364
- Rebuilt for Python 3.10
6fa1364
f3ab15b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
f3ab15b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f3ab15b
5bd0479
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
5bd0479
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5bd0479
7370af0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.6.0-2
7370af0
- Rebuilt for Python 3.9
7370af0
ea059f8
* Fri Mar 13 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.6.0-1
ea059f8
- Update to 1.6.0
ea059f8
a33eca1
* Thu Jan 30 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.1-4
a33eca1
- Upstream patch to fix gcc-10 build
a33eca1
faf204a
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
faf204a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
faf204a
d59639f
* Tue Jan 14 2020 Tom Stellard <tstellar@redhat.com> - 1.5.1-2
d59639f
- Use __cc macro instead of hard-coding gcc
d59639f
709e9ae
* Wed Sep 11 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.1-1
709e9ae
- New dtc 1.5.1 release
709e9ae
ecabd9c
* Tue Sep 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-3
ecabd9c
- Rebuilt for Python 3.8
ecabd9c
49eb648
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
49eb648
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
49eb648
cbaa4c5
* Tue Mar 12 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.0-1
cbaa4c5
- New dtc 1.5.0 release
cbaa4c5
5b49673
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.7-3
5b49673
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5b49673
975efc6
* Tue Jan 15 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.7-2
975efc6
- Upstream fix for crash (rhbz 1663054)
975efc6
8e9090d
* Sat Aug 18 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.7-1
8e9090d
- New dtc 1.4.7 release
8e9090d
616bd3d
* Tue Jul 17 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.6-7
616bd3d
- Update Python macros to new packaging standards
616bd3d
  (See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package)
616bd3d
232f8f0
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-6
232f8f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
232f8f0
8b14c17
* Wed Jun 06 2018 Bas Mevissen <abuse@basmevissen.nl> 1.4.6-5
8b14c17
- Add static library package, see BZ#1440975
8b14c17
f20e532
* Wed Mar  7 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.6-4
f20e532
- Add gcc BR
f20e532
63896d4
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-3
63896d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
63896d4
2837362
* Fri Jan 26 2018 Florian Weimer <fweimer@redhat.com> - 1.4.6-2
2837362
- Use Fedora build flags during build
2837362
a0e4d04
* Mon Jan 22 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.6-1
a0e4d04
- New dtc 1.4.6 release
a0e4d04
5b8f2ec
* Thu Sep 28 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.5-1
5b8f2ec
- New dtc 1.4.5 release
5b8f2ec
8bb0d20
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-4
8bb0d20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8bb0d20
8dd76d5
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-3
8dd76d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8dd76d5
c0cd836
* Mon Jun 12 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.4-2
c0cd836
- Add upstream patches for python bindings
c0cd836
05b2b56
* Fri Mar 17 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.4-1
05b2b56
- New dtc 1.4.4 release
05b2b56
f6254d6
* Tue Feb 28 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.2-3.0931cea
f6254d6
- Rebase to same git snapshot that kernel is using for DT Overlays
f6254d6
e489953
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-2
e489953
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e489953
d0a42ea
* Sun Sep 11 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.2-1
d0a42ea
- New dtc 1.4.2 release
d0a42ea
27b52be
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-5
27b52be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
27b52be
da47f0d
* Tue Jun 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-4
da47f0d
- Use %%license
da47f0d
45ba7ad
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.4.1-3
45ba7ad
- Rebuilt for Fedora 23 Change
45ba7ad
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
45ba7ad
be2af48
* Mon Jan  5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-2
be2af48
- Use tar file from kernel.org
be2af48
8aa347f
* Mon Jan  5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-1
8aa347f
- New dtc 1.4.1 release
8aa347f
- Update URL and Sources
8aa347f
- Cleanup spec
8aa347f
24d94fd
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-5
24d94fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
24d94fd
b415c07
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-4
b415c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b415c07
557f4a9
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.4.0-3
557f4a9
- Avoid shell invocation and fix deps of libfdt %%post* scripts.
557f4a9
ecabbe8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
ecabbe8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ecabbe8
498afd0
* Mon Jun 24 2013 Josh Boyer <jwboyer@redhat.com> - 1.4.0-1
498afd0
- New dtc 1.4.0 release (rhbz 977480)
498afd0
f3da2d1
* Thu Jun 06 2013 Josh Boyer <jwboyer@redhat.com> - 1.3.0-8
f3da2d1
- Fix type specifier error (from Dan Horák)
f3da2d1
3eadff4
* Mon Jun 03 2013 Josh Boyer <jwboyer@redhat.com> - 1.3.0-7
3eadff4
- Update dtc to include libfdt_env.h (rhbz 969955)
3eadff4
59ddc0c
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
59ddc0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
59ddc0c
2c0beda
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-5
2c0beda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2c0beda
308f957
* Mon Feb 27 2012 Josh Boyer <jwboyer@redhat.com>
308f957
- Don't package ftdump (rhbz 797805)
308f957
fdb0bcd
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
fdb0bcd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fdb0bcd
dd8478d
* Tue Jun 28 2011 Josh Boyer <jwboyer@gmail.com>
Josh Boyer 9374d42
- Fixup error during tarball upload
Josh Boyer 9374d42
Josh Boyer 9374d42
* Tue Jun 28 2011 Josh Boyer <jwboyer@gmail.com>
dd8478d
- Point to git tree for URL (#717217)
dd8478d
- Add libfdt subpackages based on patch from Paolo Bonzini (#443882)
dd8478d
- Update to latest release
dd8478d
4398f85
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-4
4398f85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4398f85
0eab86b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
0eab86b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0eab86b
f4f7e8d
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
f4f7e8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f4f7e8d
d8039c6
* Thu Aug 28 2008 Josh Boyer <jwboyer@gmail.com>
d8039c6
- Update to latest release
d8039c6
a89dd3e
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.0-2
a89dd3e
- Autorebuild for GCC 4.3
a89dd3e
874f829
* Thu Jan 24 2008 Josh Boyer <jwboyer@gmail.com>
874f829
- Update to 1.1.0
874f829
290fe3c
* Tue Aug 21 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
290fe3c
- Bump and rebuild
290fe3c
21bb059
* Thu Aug 09 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
21bb059
- Update to official 1.0.0 release
21bb059
0f6d2e0
* Fri Aug 03 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
0f6d2e0
- Update license field
0f6d2e0
d4d100e
* Mon Jul 09 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
d4d100e
- Update to new snapshot
d4d100e
b0ece15
* Tue Jul 03 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
b0ece15
- Update to new snapshot
b0ece15
- Drop upstreamed install patch
b0ece15
1338fb3
* Fri Jun 29 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
1338fb3
- Fix packaging errors
1338fb3
1338fb3
* Thu Jun 28 2007 Josh Boyer <jwboyer@jdub.homelinux.org>
1338fb3
- Initial packaging