File skelcd-openSUSE.spec of Package skelcd-openSUSE

#
# spec file for package skelcd-openSUSE
#
# 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 version_unconverted 84.87.20161107.bcb1a98

Name:           skelcd-openSUSE
BuildRequires:  build-key
%bcond_without  java
%if %{with java}
BuildRequires:  release-notes-openSUSE
# we abuse the no java path here to skip license processing in staging
BuildRequires:  translate-toolkit
%endif
Conflicts:      skelcd-sles skelcd-sled skelcd-openSUSE-non-OSS skelcd-openSUSE-non-OSS-CD
Version:        84.87.20161107.bcb1a98
Release:        0
Summary:        Skeleton for openSUSE OSS Media Sets
License:        MIT
Group:          Metapackages
Url:            https://github.com/openSUSE/skelcd-openSUSE
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         skelcd-openSUSE-%{version}.tar.xz
Source99:       skelcd-openSUSE-rpmlintrc
# changed by pre_checkin
%define is_non_oss 0

%description
Internal package only, used for openSUSE OSS Media sets

%package non-OSS
Summary:        Skeleton for openSUSE non-OSS Media Sets
Group:          Metapackages

%description non-OSS
Internal package only, used for openSUSE non-OSS Media sets

%prep
%setup

%build
DIST="%distribution"
DISTVER=${DIST#openSUSE }
if [ "$DISTVER" = 'Factory' ]; then
  DISTVER=Tumbleweed
fi
sed -i -e"s@#VERSION#@$DISTVER@g" license/license.txt
%if %{with java}
make VERSION="$DISTVER"
%else
# build without translate-toolkit support in staging
make VERSION="$DISTVER" LICENSES=
%endif
#

%install
mkdir -p $RPM_BUILD_ROOT/CD1/boot
# YaST uses release notes txt for textmode installation and rtf for graphical
%if %{with java}
  mkdir -p $RPM_BUILD_ROOT/CD1/docu
  cp -p /usr/share/doc/release-notes/openSUSE/RELEASE-NOTES.*.{rtf,txt} $RPM_BUILD_ROOT/CD1/docu
%endif
#
# Note: kiwi will remove README.BETA for final product.
cp skelcd/* $RPM_BUILD_ROOT/CD1/
install -m 644 /usr/lib/rpm/gnupg/keys/*.asc $RPM_BUILD_ROOT/CD1/

%files
%defattr(644,root,root,755)
/CD1

%files non-OSS
%defattr(644,root,root,755)
/CD1
%exclude /CD1/docu
%exclude /CD1/license.tar.gz

%changelog
openSUSE Build Service is sponsored by