File jeos-licenses.spec of Package jeos-licenses

#
# spec file for package jeos-licenses
#
# Copyright (c) 2018 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.

Name:           jeos-licenses
Version:        3.0
Release:        0
Summary:        Licenses for packages included in JeOS images
License:        MIT
Group:          Documentation/Other
URL:            https://www.suse.com/de-de/licensing/eula
ExclusiveArch:  x86_64 aarch64
# Not present in OBS
#!BuildIgnore:  gpg-pubkey
# These packages cause conflicts otherwise
# Prevent a build loop
#!BuildIgnore:  jeos-licenses
BuildRequires: aaa_base
BuildRequires: aaa_base-extras
BuildRequires: acl
BuildRequires: bash
BuildRequires: blog
BuildRequires: boost-license1_66_0
BuildRequires: btrfsmaintenance
BuildRequires: btrfsprogs
BuildRequires: btrfsprogs-udev-rules
BuildRequires: bzip2
BuildRequires: ca-certificates
BuildRequires: ca-certificates-mozilla
BuildRequires: coreutils
BuildRequires: cpio
BuildRequires: cracklib
BuildRequires: cracklib-dict-small
BuildRequires: cron
BuildRequires: cronie
BuildRequires: curl
BuildRequires: dbus-1
BuildRequires: dbus-1-glib
BuildRequires: device-mapper
BuildRequires: dialog
BuildRequires: diffutils
BuildRequires: dmidecode
BuildRequires: dracut
BuildRequires: e2fsprogs
BuildRequires: ebtables
BuildRequires: efibootmgr
BuildRequires: elfutils
BuildRequires: fdupes
BuildRequires: file
BuildRequires: file-magic
BuildRequires: filesystem
BuildRequires: fillup
BuildRequires: findutils
BuildRequires: fipscheck
BuildRequires: firewalld
BuildRequires: gawk
BuildRequires: gettext-runtime
BuildRequires: gio-branding-upstream
BuildRequires: girepository-1_0
BuildRequires: glib2-tools
BuildRequires: glibc
BuildRequires: glibc-locale
BuildRequires: gpg2
BuildRequires: gpg-pubkey
BuildRequires: gptfdisk
BuildRequires: grep
BuildRequires: grub2
BuildRequires: grub2-branding-SLE
BuildRequires: grub2-snapper-plugin
BuildRequires: gzip
BuildRequires: hardlink
BuildRequires: haveged
BuildRequires: hostname
BuildRequires: hwinfo
BuildRequires: info
BuildRequires: iproute2
BuildRequires: ipset
BuildRequires: iptables
BuildRequires: iputils
BuildRequires: jeos-firstboot
BuildRequires: jeos-licenses
BuildRequires: kbd
BuildRequires: kbd-legacy
BuildRequires: kmod
BuildRequires: kmod-compat
BuildRequires: krb5
BuildRequires: less
BuildRequires: libacl1
BuildRequires: libaio1
BuildRequires: libapparmor1
BuildRequires: libargon2-1
BuildRequires: libasm1
BuildRequires: libassuan0
BuildRequires: libattr1
BuildRequires: libaudit1
BuildRequires: libaugeas0
BuildRequires: libblkid1
BuildRequires: libboost_system1_66_0
BuildRequires: libboost_thread1_66_0
BuildRequires: libbtrfs0
BuildRequires: libbz2-1
BuildRequires: libcap2
BuildRequires: libcap-ng0
BuildRequires: libcom_err2
BuildRequires: libcrack2
BuildRequires: libcroco-0_6-3
BuildRequires: libcryptsetup12
BuildRequires: libcurl4
BuildRequires: libdb-4_8
BuildRequires: libdbus-1-3
BuildRequires: libdevmapper1_03
BuildRequires: libdevmapper-event1_03
BuildRequires: libdialog14
BuildRequires: libdw1
BuildRequires: libebl-plugins
BuildRequires: libedit0
BuildRequires: libefivar1
BuildRequires: libelf1
BuildRequires: libexpat1
BuildRequires: libext2fs2
BuildRequires: libfdisk1
BuildRequires: libffi7
BuildRequires: libfipscheck1
BuildRequires: libfreebl3
BuildRequires: libfreetype6
BuildRequires: libfuse2
BuildRequires: libgcc_s1
BuildRequires: libgcrypt20
BuildRequires: libgdbm4
BuildRequires: libgio-2_0-0
BuildRequires: libgirepository-1_0-1
BuildRequires: libglib-2_0-0
BuildRequires: libgmodule-2_0-0
BuildRequires: libgmp10
BuildRequires: libgnutls30
BuildRequires: libgobject-2_0-0
BuildRequires: libgpg-error0
BuildRequires: libhavege1
BuildRequires: libhogweed4
BuildRequires: libidn11
BuildRequires: libidn2-0
BuildRequires: libipset11
BuildRequires: libiptc0
BuildRequires: libjson-c3
BuildRequires: libkeyutils1
BuildRequires: libkmod2
BuildRequires: libksba8
BuildRequires: libldap-2_4-2
BuildRequires: liblua5_3-5
BuildRequires: liblz4-1
BuildRequires: liblzma5
BuildRequires: liblzo2-2
BuildRequires: libmagic1
BuildRequires: libmetalink3
BuildRequires: libmnl0
BuildRequires: libmodman1
BuildRequires: libmount1
BuildRequires: libncurses6
BuildRequires: libnetfilter_conntrack3
BuildRequires: libnettle6
BuildRequires: libnfnetlink0
BuildRequires: libnghttp2-14
BuildRequires: libnl3-200
BuildRequires: libnl-config
BuildRequires: libnm0
BuildRequires: libnpth0
BuildRequires: libnsl2
BuildRequires: libopenssl1_1
BuildRequires: libp11-kit0
BuildRequires: libparted0
BuildRequires: libpcre1
BuildRequires: libpng16-16
BuildRequires: libpopt0
BuildRequires: libprocps6
BuildRequires: libproxy1
BuildRequires: libpsl5
BuildRequires: libpython3_6m1_0
BuildRequires: libqrencode4
BuildRequires: libreadline7
BuildRequires: libreiserfscore0
BuildRequires: libruby2_5-2_5
BuildRequires: libsasl2-3
BuildRequires: libseccomp2
BuildRequires: libselinux1
BuildRequires: libsemanage1
BuildRequires: libsepol1
BuildRequires: libsmartcols1
BuildRequires: libsnapper4
BuildRequires: libsodium23
BuildRequires: libsoftokn3
BuildRequires: libsolv-tools
BuildRequires: libsqlite3-0
BuildRequires: libssh2-1
BuildRequires: libstdc++6
BuildRequires: libsystemd0
BuildRequires: libtasn1
BuildRequires: libtasn1-6
BuildRequires: libtirpc3
BuildRequires: libtirpc-netconfig
BuildRequires: libudev1
BuildRequires: libunistring2
BuildRequires: libunwind
BuildRequires: libusb-1_0-0
BuildRequires: libustr-1_0-1
BuildRequires: libutempter0
BuildRequires: libuuid1
BuildRequires: libverto1
BuildRequires: libwicked-0-6
BuildRequires: libxml2-2
BuildRequires: libxml2-tools
BuildRequires: libxtables12
BuildRequires: libyaml-0-2
BuildRequires: libz1
BuildRequires: libzio1
BuildRequires: libzmq5
BuildRequires: libzypp
BuildRequires: logrotate
BuildRequires: mailx
BuildRequires: mozilla-nspr
BuildRequires: mozilla-nss
BuildRequires: mozilla-nss-certs
BuildRequires: ncurses-utils
BuildRequires: netcfg
BuildRequires: net-tools
BuildRequires: openslp
BuildRequires: openssh
BuildRequires: openssl
BuildRequires: openssl-1_1
BuildRequires: p11-kit
BuildRequires: p11-kit-tools
BuildRequires: pam
BuildRequires: pam-config
BuildRequires: parted
BuildRequires: patterns-base-minimal_base
BuildRequires: perl
BuildRequires: perl-base
BuildRequires: perl-Bootloader
BuildRequires: permissions
BuildRequires: pigz
BuildRequires: pinentry
BuildRequires: pkg-config
BuildRequires: procps
BuildRequires: python3
BuildRequires: python3-Babel
BuildRequires: python3-base
BuildRequires: python3-certifi
BuildRequires: python3-chardet
BuildRequires: python3-dbus-python
BuildRequires: python3-decorator
BuildRequires: python3-firewall
BuildRequires: python3-gobject
BuildRequires: python3-idna
BuildRequires: python3-Jinja2
BuildRequires: python3-MarkupSafe
BuildRequires: python3-msgpack
BuildRequires: python3-psutil
BuildRequires: python3-py
BuildRequires: python3-pycrypto
BuildRequires: python3-pytz
BuildRequires: python3-PyYAML
BuildRequires: python3-pyzmq
BuildRequires: python3-requests
BuildRequires: python3-rpm
BuildRequires: python3-salt
BuildRequires: python3-simplejson
BuildRequires: python3-six
BuildRequires: python3-slip
BuildRequires: python3-slip-dbus
BuildRequires: python3-tornado
BuildRequires: python3-urllib3
BuildRequires: python3-zypp-plugin
BuildRequires: python-rpm-macros
BuildRequires: rollback-helper
BuildRequires: rpm
BuildRequires: rsync
BuildRequires: ruby2.5
BuildRequires: ruby2.5-rubygem-gem2rpm
BuildRequires: ruby2.5-stdlib
BuildRequires: ruby-common
BuildRequires: salt
BuildRequires: salt-minion
BuildRequires: sed
BuildRequires: shadow
BuildRequires: shared-mime-info
BuildRequires: sles-release
BuildRequires: snapper
BuildRequires: snapper-zypp-plugin
BuildRequires: suse-build-key
BuildRequires: SUSEConnect
BuildRequires: suse-module-tools
BuildRequires: sysconfig
BuildRequires: sysconfig-netconfig
BuildRequires: systemd
BuildRequires: systemd-presets-branding-SLE
BuildRequires: systemd-sysvinit
BuildRequires: system-group-hardware
BuildRequires: system-group-wheel
BuildRequires: system-user-mail
BuildRequires: system-user-nobody
BuildRequires: system-user-root
BuildRequires: sysuser-shadow
BuildRequires: sysvinit-tools
BuildRequires: tar
BuildRequires: terminfo-base
BuildRequires: thin-provisioning-tools
BuildRequires: timezone
BuildRequires: typelib-1_0-NM-1_0
BuildRequires: udev
BuildRequires: update-alternatives
BuildRequires: util-linux
BuildRequires: util-linux-systemd
BuildRequires: vim
BuildRequires: wicked
BuildRequires: wicked-service
BuildRequires: xfsprogs
BuildRequires: xtables-plugins
BuildRequires: xz
BuildRequires: zypper
BuildRequires: zypper-lifecycle-plugin
%ifarch x86_64
BuildRequires: grub2-i386-pc
BuildRequires: grub2-x86_64-efi
BuildRequires: grub2-x86_64-xen
BuildRequires: kernel-default-base
BuildRequires: libpgm-5_2-0
BuildRequires: libx86emu1
BuildRequires: libyajl2
BuildRequires: shim
BuildRequires: vim-data
BuildRequires: xen-libs
BuildRequires: xen-tools-domU
BuildRequires: grub2-i386-pc
BuildRequires: grub2-x86_64-efi
BuildRequires: hyper-v
BuildRequires: kernel-default-base
BuildRequires: libpgm-5_2-0
BuildRequires: libx86emu1
BuildRequires: shim
BuildRequires: vim-data
BuildRequires: cloud-init
BuildRequires: cloud-init-config-suse
BuildRequires: growpart
BuildRequires: grub2-i386-pc
BuildRequires: grub2-x86_64-efi
BuildRequires: kernel-default-base
BuildRequires: libpgm-5_2-0
BuildRequires: libx86emu1
BuildRequires: python3-appdirs
BuildRequires: python3-asn1crypto
BuildRequires: python3-blinker
BuildRequires: python3-cffi
BuildRequires: python3-configobj
BuildRequires: python3-cryptography
BuildRequires: python3-ecdsa
BuildRequires: python3-jsonpatch
BuildRequires: python3-jsonpointer
BuildRequires: python3-jsonschema
BuildRequires: python3-oauthlib
BuildRequires: python3-packaging
BuildRequires: python3-pyasn1
BuildRequires: python3-pycparser
BuildRequires: python3-PyJWT
BuildRequires: python3-pyparsing
BuildRequires: python3-pyserial
BuildRequires: python3-setuptools
BuildRequires: shim
BuildRequires: sudo
BuildRequires: vim-data
BuildRequires: grub2-i386-pc
BuildRequires: grub2-x86_64-efi
BuildRequires: kernel-default-base
BuildRequires: libdnet1
BuildRequires: libicu60_2
BuildRequires: libicu60_2-ledata
BuildRequires: libmspack0
BuildRequires: libpgm-5_2-0
BuildRequires: libvmtools0
BuildRequires: libx86emu1
BuildRequires: libxalan-c111
BuildRequires: libxerces-c-3_1
BuildRequires: libxml-security-c17
BuildRequires: open-vm-tools
BuildRequires: shim
BuildRequires: vim-data
BuildRequires: which
BuildRequires: grub2-i386-pc
BuildRequires: grub2-x86_64-efi
BuildRequires: grub2-x86_64-xen
BuildRequires: kernel-default-base
BuildRequires: libpgm-5_2-0
BuildRequires: libx86emu1
BuildRequires: libyajl2
BuildRequires: shim
BuildRequires: vim-data
BuildRequires: xen-libs
BuildRequires: xen-tools-domU
%endif
%ifarch aarch64
BuildRequires: bc
BuildRequires: bcm43xx-firmware
BuildRequires: cryptsetup
BuildRequires: dracut-kiwi-lib
BuildRequires: dracut-kiwi-oem-repart
BuildRequires: grub2-arm64-efi
BuildRequires: kernel-default
BuildRequires: kernel-firmware
BuildRequires: libavahi-client3
BuildRequires: libavahi-common3
BuildRequires: libdns_sd
BuildRequires: libevent-2_1-8
BuildRequires: liblvm2app2_2
BuildRequires: liblvm2cmd2_02
BuildRequires: libpwquality1
BuildRequires: lvm2
BuildRequires: mdadm
BuildRequires: ntp
BuildRequires: pv
BuildRequires: raspberrypi-firmware
BuildRequires: raspberrypi-firmware-config
BuildRequires: raspberrypi-firmware-dt
BuildRequires: u-boot-rpi3
BuildRequires: vim-data-common
%endif

%description
This package contains licenses for all packages included in the JeOS images.

%prep

%build

%install
pushd %{_datadir}/doc/packages/
for pkg in *; do
        destdir="%{buildroot}%{_datadir}/licenses/jeos/${pkg}/"

        found=0
        pushd "${pkg}"
	for filename in LICENSE* COPYING* COPYRIGHT* AUTHORS*; do
		[ ! -f "${filename}" ] && continue
		mkdir -p "${destdir}"
		cp "${filename}" "${destdir}"
		found=1
	done
        popd

	if [ "${found}" -ne "1" ]; then
		pkglicense="$(rpm -q --qf '%%{license}' -f ${pkg})" || pkglicense="$(rpm -q --qf '%%{license}' -f ${pkg}/* | head -n1)"
		echo "Package ${pkg} has no license file (license \"${pkglicense}\")."
	fi
done
popd

%fdupes %{buildroot}

%files
%{_datadir}/licenses/jeos

%changelog
openSUSE Build Service is sponsored by