File sax2.spec of Package sax2
#
# spec file for package sax2
#
# Copyright (c) 2012 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: sax2
Version: 8.1
Release: 0
Summary: SuSE advanced X Window System-configuration
License: GPL-2.0+
Group: System/X11/Utilities
Url: http://sax.berlios.de
Source: sax2.tar.bz2
Source1: sax2.desktop
Source2: sax2-rpmlintrc
Patch1: sax2-tools-only.diff
Patch2: nohal.diff
Patch3: sax2-dots_as_needed.diff
Patch4: sax2-XF86OptionPtr-definition-changes.diff
BuildRequires: antlr
BuildRequires: automake
BuildRequires: bison
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gettext-devel
BuildRequires: ghostscript-fonts-std
BuildRequires: graphviz
BuildRequires: hwinfo-devel
BuildRequires: libqt4
BuildRequires: libqt4-devel
BuildRequires: libqt4-qt3support
BuildRequires: libqt4-x11
BuildRequires: python-devel
BuildRequires: readline-devel
BuildRequires: swig
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-server-sdk
PreReq: %fillup_prereq
PreReq: %insserv_prereq
PreReq: /bin/mkdir
PreReq: /bin/rm
PreReq: /usr/bin/chroot
Requires: dbus-1
Requires: ncurses
Requires: perl = %{perl_version}
Requires: readline
Requires: sax2-ident
Requires: sax2-libsax
Requires: sax2-tools
Requires: xdg-utils
Requires: xorg-x11-server
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains the SuSE Advanced X-Configuration
%package -n sax2-tools
Summary: X Window System tools for SaX2
Group: System/X11/Utilities
Requires: coreutils
Supplements: packageand(yast2-installation:xorg-x11)
Provides: saxtools
Obsoletes: saxtools
Provides: sax2
Obsoletes: sax2
Provides: sax2-gui
Obsoletes: sax2-gui
Provides: sax2-libsax
Obsoletes: sax2-libsax
Provides: sax2-libsax-perl
Obsoletes: sax2-libsax-perl
Provides: sax2-ident
Obsoletes: sax2-ident
%description -n sax2-tools
Some small X Window System tools to handle input devices, for example,
mouse and keyboard.
%prep
%setup -n sax
%patch1 -p0
%patch2 -p0
%patch3
%patch4 -p1
%build
# disable as-needed to fix build
export SUSE_ASNEEDED=0
test -e /.buildenv && . /.buildenv
test -z "$QTDIR" && export QTDIR=/usr/lib/qt-3.3
test -z "$JAVA_BINDIR" && export JAVA_BINDIR=/usr/bin
test -z "$BUILD_DISTRIBUTION_NAME" && export BUILD_DISTRIBUTION_NAME=OTHER
#=================================================
# add SuSE version to sax.sh script...
#-------------------------------------------------
cat ./startup/sax.sh | \
sed -e s@SuSE-Linux@"$BUILD_DISTRIBUTION_NAME"@ \
> /tmp/sax.sh
cp /tmp/sax.sh ./startup/sax.sh
#=================================================
# build sources
#-------------------------------------------------
make bindlib=%{_lib} buildroot=%{buildroot}
#=================================================
# install sources
#-------------------------------------------------
%install
make buildroot=%{buildroot} \
bindlib=%{_lib} \
lib_prefix=%{buildroot}%{_libdir} \
doc_prefix=%{buildroot}/%{_defaultdocdir} \
man_prefix=%{buildroot}/%{_mandir} \
install-docs
cd tools
make buildroot=%{buildroot} \
bindlib=%{_lib} \
lib_prefix=%{buildroot}%{_libdir} \
doc_prefix=%{buildroot}/%{_defaultdocdir} \
man_prefix=%{buildroot}/%{_mandir} \
install
cd ..
rm -rf %{buildroot}%{_prefix}/lib/perl5
rm -rf %{buildroot}%{_datadir}/doc/packages/sax2/{LICENSE,README,sax.pdf}
rm %{buildroot}/%{_mandir}/man1/sax2.1
#=================================================
# uninstall script stage:[previous]
#-------------------------------------------------
%preun
chroot . rm -f /var/cache/xfine/*
if [ ! -d /var/cache/xfine ];then
mkdir -p /var/cache/xfine
fi
%files -n sax2-tools
%defattr(-,root,root)
%doc %{_mandir}/man1/xkbctrl.1.gz
%doc %{_mandir}/man1/xmode.1.gz
%doc %{_mandir}/man1/xquery.1.gz
%{_sbindir}/corner
%{_sbindir}/dots
%{_sbindir}/isax
%{_sbindir}/testX
%{_sbindir}/whereiam
%{_sbindir}/wmstart
%{_sbindir}/ximage
%{_sbindir}/xidle
%{_sbindir}/xkbctrl
%{_sbindir}/xlook
%{_sbindir}/xmode
%{_sbindir}/xquery
%{_sbindir}/vncp
%{_sbindir}/xw
%{_sbindir}/getPrimary
%changelog