A new user interface for you! Read more...

File dtb-armv7l.spec of Package dtb-armv7l

#
# spec file for package dtb-armv7l
#
# 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/
#


%define kernel_version 4.7.rc5
%define kernel_release 3.1.gd89346f
Name:           dtb-armv7l
Version:        %{kernel_version}
Release:        0
Summary:        Device Tree files for $MACHINES
License:        GPL-2.0
Group:          System/Boot
Url:            http://www.kernel.org/
BuildRequires:  kernel-source = %{kernel_version}
ExclusiveArch:  armv7l armv7hl
%if "dtb-armv7l" == "dtb-source"
Source99:       pre_checkin.pl
%else
BuildRequires:  cpp
BuildRequires:  dtc >= 1.4.0
BuildRequires:  xz
Requires:       kernel = %{kernel_version}
%endif

%description
Device Tree files for $MACHINES.

%package -n dtb-am335x
Summary:        TI AM335x based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-am335x
Device Tree Files for TI AM335x based systems.

%package -n dtb-am3517
Summary:        TI AM3517 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-am3517
Device Tree Files for TI AM3517 based systems.

%package -n dtb-am57xx
Summary:        TI AM57xx based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-am57xx
Device Tree Files for TI AM57xx based systems.

%package -n dtb-armada-370
Summary:        Armada 370 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-370
Device Tree Files for Armada 370 based systems.

%package -n dtb-armada-375
Summary:        Armada 375 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-375
Device Tree Files for Armada 375 based systems.

%package -n dtb-armada-385
Summary:        Armada 385 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-385
Device Tree Files for Armada 385 based systems.

%package -n dtb-armada-388
Summary:        Armada 388 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-388
Device Tree Files for Armada 388 based systems.

%package -n dtb-armada-398
Summary:        Armada 398 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-398
Device Tree Files for Armada 398 based systems.

%package -n dtb-armada-xp
Summary:        Armada XP based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-armada-xp
Device Tree Files for Armada XP based systems.

%package -n dtb-dove
Summary:        Marvell dove based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-dove
Device Tree Files for Marvell dove based systems.

%package -n dtb-exynos4
Summary:        Samsung Exynos 4 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-exynos4
Device Tree Files for Samsung Exynos 4 based systems.

%package -n dtb-exynos5
Summary:        Samsung Exynos 5 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-exynos5
Device Tree Files for Samsung Exynos 5 based systems.

%package -n dtb-imx5
Summary:        Freescale i.MX51 and i.MX53 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-imx5
Device Tree Files for Freescale i.MX51 and i.MX53 based systems.

%package -n dtb-imx6
Summary:        Freescale i.MX6 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-imx6
Device Tree Files for Freescale i.MX6 based systems.

%package -n dtb-meson6
Summary:        Amlogic Meson 6 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-meson6
Device Tree Files for Amlogic Meson 6 based systems.

%package -n dtb-meson8
Summary:        Amlogic Meson 8 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-meson8
Device Tree Files for Amlogic Meson 8 based systems.

%package -n dtb-meson8b
Summary:        Amlogic Meson 8b based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-meson8b
Device Tree Files for Amlogic Meson 8b based systems.

%package -n dtb-omap3
Summary:        TI OMAP3 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-omap3
Device Tree Files for TI OMAP3 based systems.

%package -n dtb-omap4
Summary:        TI OMAP4 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-omap4
Device Tree Files for TI OMAP4 based systems.

%package -n dtb-omap5
Summary:        TI OMAP5 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-omap5
Device Tree Files for TI OMAP5 based systems.

%package -n dtb-qcom
Summary:        Qualcomm Snapdragon based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-qcom
Device Tree Files for Qualcomm Snapdragon based systems.

%package -n dtb-rk3
Summary:        Rockchip RK3xxx based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-rk3
Device Tree Files for Rockchip RK3xxx based systems.

%package -n dtb-ste
Summary:        ST Ericsson based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-ste
Device Tree Files for ST Ericsson based systems.

%package -n dtb-sun4i
Summary:        Allwinner sun4i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun4i
Device Tree Files for Allwinner sun4i based systems.

%package -n dtb-sun5i
Summary:        Allwinner sun5i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun5i
Device Tree Files for Allwinner sun5i based systems.

%package -n dtb-sun6i
Summary:        Allwinner sun6i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun6i
Device Tree Files for Allwinner sun6i based systems.

%package -n dtb-sun7i
Summary:        Allwinner sun7i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun7i
Device Tree Files for Allwinner sun7i based systems.

%package -n dtb-sun8i
Summary:        Allwinner sun8i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun8i
Device Tree Files for Allwinner sun8i based systems.

%package -n dtb-sun9i
Summary:        Allwinner sun9i based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-sun9i
Device Tree Files for Allwinner sun9i based systems.

%package -n dtb-tegra2
Summary:        NVidia Tegra2 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-tegra2
Device Tree Files for NVidia Tegra2 based systems.

%package -n dtb-tegra3
Summary:        NVidia Tegra3 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-tegra3
Device Tree Files for NVidia Tegra3 based systems.

%package -n dtb-tegra114
Summary:        NVidia Tegra4 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-tegra114
Device Tree Files for NVidia Tegra4 based systems.

%package -n dtb-tegra124
Summary:        NVidia Tegra K1 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-tegra124
Device Tree Files for NVidia Tegra K1 based systems.

%package -n dtb-vexpress
Summary:        ARM Versatile Express machines
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-vexpress
Device Tree Files for ARM Versatile Express machines.

%package -n dtb-vf500
Summary:        Freescale Vybrid VF500 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-vf500
Device Tree Files for Freescale Vybrid VF500 based systems.

%package -n dtb-vf6
Summary:        Freescale Vybrid VF610 based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-vf6
Device Tree Files for Freescale Vybrid VF610 based systems.

%package -n dtb-xenvm
Summary:        Xen virtual machines
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-xenvm
Device Tree Files for Xen virtual machines.

%package -n dtb-zynq
Summary:        Xilinx Zynq based systems
Group:          System/Boot
Provides:       multiversion(dtb)
Requires(post): coreutils

%description -n dtb-zynq
Device Tree Files for Xilinx Zynq based systems.



%prep

%build
cp %{_prefix}/src/linux/COPYING .
%if "dtb-armv7l" != "dtb-source"
mkdir pp
PPDIR=`pwd`/pp
export DTC_FLAGS="-R 4 -p 0x1000"

cd %{_prefix}/src/linux/arch/arm/boot/dts
for dts in am335x-*.dts am3517*.dts am57xx-*.dts armada-370-*.dts armada-375-*.dts armada-385-*.dts armada-388-*.dts armada-398-*.dts armada-xp-*.dts dove-*.dts exynos4*.dts exynos5*.dts imx5*.dts imx6*.dts meson6-*.dts meson8-*.dts meson8b-*.dts omap3*.dts omap4*.dts omap5*.dts qcom-*.dts rk3*.dts ste-*.dts sun4i-*.dts sun5i-*.dts sun6i-*.dts sun7i-*.dts sun8i-*.dts sun9i-*.dts tegra20-*.dts tegra30-*.dts tegra114-*.dts tegra124-*.dts vexpress-*.dts vf500-*.dts vf610-*.dts xenvm-*.dts zynq-*.dts ; do
	target=${dts%*.dts}
	mkdir -p $PPDIR/$(dirname $target)
	cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I./include/ -P $target.dts -o $PPDIR/$target.dts
	dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%endif

%define dtbdir /boot/dtb-%{kernel_version}-%{kernel_release}

%install
%if "dtb-armv7l" != "dtb-source"

cd pp
for dts in am335x-*.dts am3517*.dts am57xx-*.dts armada-370-*.dts armada-375-*.dts armada-385-*.dts armada-388-*.dts armada-398-*.dts armada-xp-*.dts dove-*.dts exynos4*.dts exynos5*.dts imx5*.dts imx6*.dts meson6-*.dts meson8-*.dts meson8b-*.dts omap3*.dts omap4*.dts omap5*.dts qcom-*.dts rk3*.dts ste-*.dts sun4i-*.dts sun5i-*.dts sun6i-*.dts sun7i-*.dts sun8i-*.dts sun9i-*.dts tegra20-*.dts tegra30-*.dts tegra114-*.dts tegra124-*.dts vexpress-*.dts vf500-*.dts vf610-*.dts xenvm-*.dts zynq-*.dts ; do
	target=${dts%*.dts}
	install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target)
	install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
done
cd -

%post -n dtb-am335x
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-am3517
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-am57xx
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-370
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-375
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-385
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-388
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-398
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-armada-xp
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-dove
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-exynos4
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-exynos5
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-imx5
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-imx6
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-meson6
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-meson8
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-meson8b
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-omap3
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-omap4
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-omap5
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-qcom
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-rk3
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-ste
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun4i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun5i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun6i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun7i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun8i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-sun9i
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-tegra2
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-tegra3
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-tegra114
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-tegra124
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-vexpress
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-vf500
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-vf6
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-xenvm
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%post -n dtb-zynq
cd /boot
# If /boot/dtb is a symlink, remove it, so that we can replace it.
[ -d dtb ] && [ -L dtb ] && rm -f dtb
# Unless /boot/dtb exists as real directory, create a symlink.
[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb

%files -n dtb-am335x
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/am335x-*.dtb

%files -n dtb-am3517
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/am3517*.dtb

%files -n dtb-am57xx
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/am57xx-*.dtb

%files -n dtb-armada-370
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-370-*.dtb

%files -n dtb-armada-375
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-375-*.dtb

%files -n dtb-armada-385
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-385-*.dtb

%files -n dtb-armada-388
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-388-*.dtb

%files -n dtb-armada-398
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-398-*.dtb

%files -n dtb-armada-xp
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/armada-xp-*.dtb

%files -n dtb-dove
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/dove-*.dtb

%files -n dtb-exynos4
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/exynos4*.dtb

%files -n dtb-exynos5
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/exynos5*.dtb

%files -n dtb-imx5
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/imx5*.dtb

%files -n dtb-imx6
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/imx6*.dtb

%files -n dtb-meson6
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/meson6-*.dtb

%files -n dtb-meson8
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/meson8-*.dtb

%files -n dtb-meson8b
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/meson8b-*.dtb

%files -n dtb-omap3
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/omap3*.dtb

%files -n dtb-omap4
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/omap4*.dtb

%files -n dtb-omap5
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/omap5*.dtb

%files -n dtb-qcom
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/qcom-*.dtb

%files -n dtb-rk3
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/rk3*.dtb

%files -n dtb-ste
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/ste-*.dtb

%files -n dtb-sun4i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun4i-*.dtb

%files -n dtb-sun5i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun5i-*.dtb

%files -n dtb-sun6i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun6i-*.dtb

%files -n dtb-sun7i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun7i-*.dtb

%files -n dtb-sun8i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun8i-*.dtb

%files -n dtb-sun9i
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/sun9i-*.dtb

%files -n dtb-tegra2
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/tegra20-*.dtb

%files -n dtb-tegra3
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/tegra30-*.dtb

%files -n dtb-tegra114
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/tegra114-*.dtb

%files -n dtb-tegra124
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/tegra124-*.dtb

%files -n dtb-vexpress
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/vexpress-*.dtb

%files -n dtb-vf500
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/vf500-*.dtb

%files -n dtb-vf6
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/vf610-*.dtb

%files -n dtb-xenvm
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/xenvm-*.dtb

%files -n dtb-zynq
%defattr(-,root,root)
%doc COPYING
%ghost /boot/dtb
%dir %{dtbdir}
%{dtbdir}/zynq-*.dtb

%else
cat - > README <<EOF
This package only consists for convenience reason to pass openSUSE Factory
review bots. Please take a look at the dtb-%{_arch}.src.rpm instead.
EOF

%files
%doc README COPYING

%endif

%changelog