File skelcd-control-openSUSE.spec of Package skelcd-control-openSUSE
#
# spec file for package skelcd-control-openSUSE
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#
Name: skelcd-control-openSUSE
BuildRequires: libxml2
# new global option - FaTE#307555
BuildRequires: yast2-installation >= 2.19.0
Url: http://www.suse.com/
AutoReqProv: off
Version: 2013.5.16
Release: 0
Summary: SuSE Linux Professional Control file
License: MIT
Group: Metapackages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: control.xml
Source1: control.promo.diff
Provides: product_control
Conflicts: product_control
%description
Control file for installation
%prep
%build
%install
#
# Add control file
#
mkdir -p $RPM_BUILD_ROOT/CD1
#
# Verify syntax
#
install -m 644 %{SOURCE0} $RPM_BUILD_ROOT/CD1/control.xml
%if "%{name}" == "skelcd-control-openSUSE-promo"
patch $RPM_BUILD_ROOT/CD1/control.xml %{SOURCE1}
%endif
xmllint --noout --relaxng /usr/share/YaST2/control/control.rng $RPM_BUILD_ROOT/CD1/control.xml
%ifarch ppc ppc64
sed -i -e "s,http://download.opensuse.org/distribution/,http://powerpc.opensuse.org/distribution/," $RPM_BUILD_ROOT/CD1/control.xml
sed -i -e "s,http://download.opensuse.org/debug/,http://powerpc.opensuse.org/debug/," $RPM_BUILD_ROOT/CD1/control.xml
sed -i -e "s,http://download.opensuse.org/source/,http://powerpc.opensuse.org/source/," $RPM_BUILD_ROOT/CD1/control.xml
diff -u %{SOURCE0} $RPM_BUILD_ROOT/CD1/control.xml || true
%endif
%files
%defattr(644,root,root,755)
%dir /CD1
/CD1/control.xml
%changelog