File patterns-openSUSE.spec.in of Package patterns-openSUSE

Name:           patterns-openSUSE
BuildRequires:  patterns
License:        GPL v2 or later
Group:          Metapackages
AutoReqProv:    on
Summary:        Patterns for Installation (full ftp tree)
Version:        11.3
Release:        1
Url:		http://en.opensuse.org/Patterns
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         patterns-openSUSE-data.tar.bz2
Source1:        preprocess
Source3:        %name-rpmlintrc
Source4:        create-suggests
Source5:        sort_patterns
Source6:        patterns-openSUSE.spec.in
Conflicts:	patterns-openSUSE-dvd5 patterns-openSUSE-dvd9 patterns-openSUSE-cd patterns-openSUSE-addon-non-oss patterns-openSUSE-GNOME-cd patterns-openSUSE-KDE-cd

%description
This is an internal package that is used to create the patterns as part
of the installation source setup.  Installation of this package does
not make sense.



%package Promo
License:        GPL v2 or later
Summary:        Patterns for Installation (Promo DVD)
Group:          Metapackages
Conflicts:      patterns-openSUSE-dvd5 patterns-openSUSE-dvd9 patterns-openSUSE-cd patterns-openSUSE-addon-non-oss patterns-openSUSE patterns-openSUSE-KDE-cd patterns-openSUSE-GNOME-cd

%description Promo
This is an internal package that is used to create the patterns as part
of the installation source setup.  Installation of this package does
not make sense.

%package dvd
License:        GPL v2 or later
Summary:        Patterns for Installation (DVD media)
Group:          Metapackages
Conflicts:      patterns-openSUSE-dvd5 patterns-openSUSE-dvd9 patterns-openSUSE-cd patterns-openSUSE-addon-non-oss patterns-openSUSE patterns-openSUSE-KDE-cd patterns-openSUSE-GNOME-cd

%description dvd
This is an internal package that is used to create the patterns as part
of the installation source setup.  Installation of this package does
not make sense.

#BEGIN1
#END1

%prep
%setup -q -n patterns-openSUSE-data

%build
for i in data/*; do sh %SOURCE1 $i; done | perl %SOURCE4 | \
   uniq > data/REST-DVD-SUGGESTS
for i in gnome kde4; do 
  sh %{SOURCE1} toinstall/rest_cd_$i/requires > t && \
    mv t toinstall/rest_cd_$i/requires
done
/usr/sbin/patterns_utf8

%install
# Create description files for YaST2:
#
# Patterns
#
# For generation of -32bit/-x86/-64bit patterns
export RPM_BUILD_ROOT 
export RPM_SOURCE_DIR
sh -e %{SOURCE5} %{version} %{release} %{_target_cpu} openSUSE
/usr/sbin/patterns_lint $RPM_BUILD_ROOT/CD1/suse/setup/descr/*.pat
rm $RPM_BUILD_ROOT/CD1/suse/setup/descr/kde4_cd-*.pat
rm $RPM_BUILD_ROOT/CD1/suse/setup/descr/gnome_cd-*.pat
rm $RPM_BUILD_ROOT/CD1/suse/setup/descr/x11_cd-*.pat
rm $RPM_BUILD_ROOT/CD1/suse/setup/descr/dvd9-*.pat

#BEGIN2
#END2

%files
%defattr(-,root,root)
%dir /CD1
%dir /CD1/suse
%dir /CD1/suse/setup
%dir /CD1/suse/setup/descr
/CD1/suse/setup/descr/dvd-*.pat
/CD1/suse/setup/descr/ftp-*.pat
/CD1/suse/setup/descr/non_oss-*.pat

%files dvd
%defattr(-,root,root)
%dir /CD1
%dir /CD1/suse
%dir /CD1/suse/setup
%dir /CD1/suse/setup/descr
/CD1/suse/setup/descr/dvd-*.pat

%files Promo
%defattr(-,root,root)
%dir /CD1
%dir /CD1/suse
%dir /CD1/suse/setup
%dir /CD1/suse/setup/descr
/CD1/suse/setup/descr/promo_dvd-*.pat
/CD1/suse/setup/descr/non_oss-*.pat

#BEGIN3
#END3

%changelog -n patterns-openSUSE
openSUSE Build Service is sponsored by