File lsb.spec of Package lsb

#
# spec file for package lsb
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           lsb
BuildRequires:  glibc-devel-32bit
Summary:        Linux Standard Base Core
Version:        4.0
Release:        10
Obsoletes:      lsb-desktop
Requires:       lsb-release
Requires:       pax cpio grep gzip
Requires:       glibc-i18ndata
Requires:       /usr/bin/ar /usr/bin/at /usr/bin/awk
Requires:       /usr/bin/basename /usr/bin/batch /usr/bin/bc
Requires:       /bin/cat /usr/bin/chfn /bin/chgrp /bin/chmod /bin/chown
Requires:       /usr/bin/chsh /usr/bin/cksum /usr/bin/cmp /usr/bin/col
Requires:       /usr/bin/comm /bin/cp /usr/bin/crontab /usr/bin/csplit
Requires:       /usr/bin/cut
Requires:       /bin/dd /bin/df /usr/bin/diff /usr/bin/dirname /usr/bin/du
Requires:       /bin/echo /bin/ed /usr/bin/env /usr/bin/expand /usr/bin/expr
Requires:       /bin/false /usr/bin/file /usr/bin/find /usr/bin/fold /bin/fuser
Requires:       /usr/bin/gencat /usr/bin/getconf /usr/bin/gettext
Requires:       /usr/sbin/groupadd /usr/sbin/groupdel
Requires:       /usr/sbin/groupmod /usr/bin/groups
Requires:       /usr/bin/head /bin/hostname
Requires:       /usr/bin/iconv /usr/bin/id /usr/bin/install
Requires:       /usr/bin/ipcrm /usr/bin/ipcs
Requires:       /usr/bin/join /bin/kill /usr/bin/killall
Requires:       /bin/ln /usr/bin/locale /usr/bin/localedef /bin/logger
Requires:       /usr/bin/logname /usr/bin/lp /usr/bin/lpr /bin/ls
Requires:       /usr/bin/m4 /usr/bin/make /usr/bin/mailx /usr/bin/man
Requires:       /usr/bin/md5sum /bin/mkdir /usr/bin/mkfifo /bin/mknod
Requires:       /bin/more /bin/mount /usr/bin/msgfmt /bin/mv
Requires:       /usr/bin/newgrp /usr/bin/nice /usr/bin/nl /usr/bin/nohup
Requires:       /usr/bin/od
Requires:       /usr/bin/passwd /usr/bin/paste /usr/bin/patch /usr/bin/pathchk
Requires:       /sbin/pidof /usr/bin/pr /usr/bin/printf /bin/ps /bin/pwd
Requires:       /usr/bin/renice /bin/rm /bin/rmdir /usr/bin/rsync
Requires:       /bin/sed /usr/sbin/sendmail /bin/sh /sbin/shutdown /bin/sleep
Requires:       /bin/sort /usr/bin/split
Requires:       /usr/bin/strip /bin/stty /bin/su /usr/bin/sum /bin/sync
Requires:       /usr/bin/tail /bin/tar /usr/bin/tee /usr/bin/test /usr/bin/time
Requires:       /bin/touch /usr/bin/tr /bin/true /usr/bin/tsort /usr/bin/tty
Requires:       /bin/umount /bin/uname /usr/bin/unexpand /usr/bin/uniq
Requires:       /usr/sbin/useradd /usr/sbin/userdel /usr/sbin/usermod
Requires:       /usr/bin/wc /usr/bin/xargs
Obsoletes:      lsb-runtime
Provides:       lsb = 2.0
Provides:       lsb-core-noarch = 2.0 lsb-core-noarch = 3.2 lsb-core-noarch = 4.0
%ifarch %ix86
Provides:       lsb-core-ia32 = 2.0 lsb-core-ia32 = 3.2 lsb-core-ia32 = 4.0
%else
%ifarch x86_64
Provides:       lsb-core-ia32 = 2.0 lsb-core-ia32 = 3.2 lsb-core-ia32 = 4.0
Provides:       lsb-core-amd64 = 2.0 lsb-core-amd64 = 3.2 lsb-core-amd64 = 4.0
%else
%ifarch s390x
Provides:       lsb-core-s390 = 2.0 lsb-core-s390 = 3.2 lsb-core-s390 = 4.0
%endif
%ifarch ppc64 ppc
Provides:       lsb-core-ppc32 = 2.0 lsb-core-ppc32 = 3.2 lsb-core-ppc32 = 4.0
%ifarch ppc64
Provides:       lsb-core-ppc64 = 2.0 lsb-core-ppc64 = 3.2 lsb-core-ppc64 = 4.0
%endif
%else
Provides:       lsb-core-%{_target_cpu} = 2.0
Provides:       lsb-core-%{_target_cpu} = 3.2
Provides:       lsb-core-%{_target_cpu} = 4.0
%endif
%endif
%endif
Provides:       lsb-graphics-noarch = 2.0 lsb-graphics-noarch = 3.2 lsb-graphics-noarch = 4.0
%ifarch %ix86
Provides:       lsb-graphics-ia32 = 2.0 lsb-graphics-ia32 = 3.2 lsb-graphics-ia32 = 4.0
%else
%ifarch x86_64
Provides:       lsb-graphics-ia32 = 2.0 lsb-graphics-ia32 = 3.2 lsb-graphics-ia32 = 4.0
Provides:       lsb-graphics-amd64 = 2.0 lsb-graphics-amd64 = 3.2 lsb-graphics-amd64 = 4.0
%else
%ifarch s390x
Provides:       lsb-graphics-s390 = 2.0 lsb-graphics-s390 = 3.2 lsb-graphics-s390 = 4.0
%endif
%ifarch ppc64 ppc
Provides:       lsb-graphics-ppc32 = 2.0 lsb-graphics-ppc32 = 3.2 lsb-graphics-ppc32 = 4.0
%ifarch ppc64
Provides:       lsb-graphics-ppc64 = 2.0
Provides:       lsb-graphics-ppc64 = 3.2
Provides:       lsb-graphics-ppc64 = 4.0
%endif
%else
Provides:       lsb-graphics-%{_target_cpu} = 2.0
Provides:       lsb-graphics-%{_target_cpu} = 3.2
Provides:       lsb-graphics-%{_target_cpu} = 4.0
%endif
%endif
%endif
Requires:       xorg-x11-libs Mesa
Requires:       fontconfig
Requires:       libpng >= 1.2
Requires:       glib2 >= 2.8
Requires:       atk >= 1.10
Requires:       pango >= 1.10
Requires:       gtk2 >= 2.8
Requires:       qt3 >= 3.3.5
Recommends:     libqt4 >= 4.4.0
Requires:       libxml2 >= 2.6.20
Requires:       perl-base >= 5.8.8
Requires:       python >= 2.4.2
Prefix:         /usr
License:        GPL-2.0+
Group:          System/Fhs
Url:            http://www.linuxbase.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Necessary files and dependencies for the Linux Standard Base (LSB)
Core.



%prep

%build

%install
mkdir -p $RPM_BUILD_ROOT/%{_lib}
mkdir -p $RPM_BUILD_ROOT/etc/lsb-release.d
echo -n "LSB_VERSION=\"core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:" > $RPM_BUILD_ROOT/etc/lsb-release
%ifarch %ix86
echo -n "core-2.0-ia32:core-3.2-ia32:core-4.0-ia32" >>  $RPM_BUILD_ROOT/etc/lsb-release
%else
echo -n "core-2.0-%{_target_cpu}:core-3.2-%{_target_cpu}:core-4.0-%{_target_cpu}" >>  $RPM_BUILD_ROOT/etc/lsb-release
%endif
echo "\"" >> $RPM_BUILD_ROOT/etc/lsb-release
%ifarch x86_64
mkdir -p $RPM_BUILD_ROOT/lib
ln -sf /lib64/ld-linux-x86-64.so.2 $RPM_BUILD_ROOT/lib64/ld-lsb-x86-64.so.2
ln -sf /lib64/ld-linux-x86-64.so.2 $RPM_BUILD_ROOT/lib64/ld-lsb-x86-64.so.3
%endif
%ifarch %ix86 x86_64
ln -sf /lib/ld-linux.so.2 $RPM_BUILD_ROOT/lib/ld-lsb.so.2
ln -sf /lib/ld-linux.so.2 $RPM_BUILD_ROOT/lib/ld-lsb.so.3
%endif
%ifarch ppc64
mkdir -p $RPM_BUILD_ROOT/lib
ln -s /lib64/ld64.so.1 $RPM_BUILD_ROOT/lib64/ld-lsb-ppc64.so.2
ln -s /lib64/ld64.so.1 $RPM_BUILD_ROOT/lib64/ld-lsb-ppc64.so.3
%endif
%ifarch ppc ppc64
ln -s /lib/ld.so.1            $RPM_BUILD_ROOT/lib/ld-lsb-ppc32.so.2
ln -s /lib/ld.so.1            $RPM_BUILD_ROOT/lib/ld-lsb-ppc32.so.3
%endif
%ifarch ia64
ln -s /lib/ld-linux-ia64.so.2 $RPM_BUILD_ROOT/lib/ld-lsb-ia64.so.2
ln -s /lib/ld-linux-ia64.so.2 $RPM_BUILD_ROOT/lib/ld-lsb-ia64.so.3
%endif
%ifarch s390x
mkdir -p $RPM_BUILD_ROOT/lib
ln -sf /lib64/ld64.so.1         $RPM_BUILD_ROOT/lib64/ld-lsb-s390x.so.2
ln -sf /lib64/ld64.so.1         $RPM_BUILD_ROOT/lib64/ld-lsb-s390x.so.3
%endif
%ifarch s390 s390x
ln -sf /lib/ld.so.1	      $RPM_BUILD_ROOT/lib/ld-lsb-s390.so.2
ln -sf /lib/ld.so.1           $RPM_BUILD_ROOT/lib/ld-lsb-s390.so.3
%endif
%ifarch sparc
ln -sf /lib/ld-linux.so.2      $RPM_BUILD_ROOT/lib/ld-lsb-sparc.so.2
ln -sf /lib/ld-linux.so.2      $RPM_BUILD_ROOT/lib/ld-lsb-sparc.so.3
%endif
# These platforms do not have a LSB, just add something to make it compile
%ifarch axp mips
ln -sf /lib/ld-linux.so.2      $RPM_BUILD_ROOT/lib/ld-lsb-%{_target_cpu}.so.2
ln -sf /lib/ld-linux.so.2      $RPM_BUILD_ROOT/lib/ld-lsb-%{_target_cpu}.so.3
%endif
mkdir -p $RPM_BUILD_ROOT/etc/lsb-release.d
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-noarch
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-noarch
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-noarch
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-noarch
%ifarch %ix86
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-ia32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-ia32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-ia32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-ia32
%else
%ifarch x86_64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-amd64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-amd64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-amd64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-amd64
%else
%ifarch s390x
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-s390
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-s390
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-s390
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-s390
%endif
%ifarch ppc64 ppc
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-ppc32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-ppc32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-ppc32
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-ppc32
%ifarch ppc64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-ppc64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-ppc64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-ppc64
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-ppc64
%endif
%else
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-2.0-%{_target_cpu}
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-3.2-%{_target_cpu}
touch $RPM_BUILD_ROOT/etc/lsb-release.d/graphics-%{version}-%{_target_cpu}
touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-%{version}-%{_target_cpu}
%endif
%endif
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir /etc/lsb-release.d
/etc/lsb-release.d/*
/etc/lsb-release
%ifarch %ix86 x86_64
/lib/ld-lsb.so.2
/lib/ld-lsb.so.3
%endif
%ifarch ppc ppc64
/lib/ld-lsb-ppc32.so.2
/lib/ld-lsb-ppc32.so.3
%endif
%ifarch x86_64
/lib64/ld-lsb-x86-64.so.2
/lib64/ld-lsb-x86-64.so.3
%endif
%ifarch s390 s390x
/lib/ld-lsb-s390.so.2
/lib/ld-lsb-s390.so.3
%endif
%ifarch ppc64 s390x ia64
/%{_lib}/ld-lsb-%{_target_cpu}.so.2
/%{_lib}/ld-lsb-%{_target_cpu}.so.3
%endif

%changelog