File openmotif22-libs.spec of Package openmotif22-libs

#
# spec file for package openmotif22-libs (Version 2.2.4)
#
# Copyright (c) 2009 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:           openmotif22-libs
%{expand:%%global _prefix %(pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_prefix" == "/usr/X11R6"
%define _mandir %_prefix/man
%define _datadir %_prefix/lib
%endif
BuildRequires:  bison flex pkgconfig xorg-x11 xorg-x11-devel
Version:        2.2.4
Release:        137.<RELEASE73>
License:        MOTIF 2.1.30
Group:          System/Libraries
AutoReqProv:    on
Summary:        Open Motif 2.2.4 Libraries
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.motifzone.net/
Source:         openmotif-%{version}.tar.bz2
Patch:          openmotif-%{version}.diff
Patch1:         warn.patch
Patch2:         datadir.patch
Patch3:         XmResizeHashTable.patch
Patch4:         openmotif-xpm.diff
Patch5:         sentinel.diff
Patch6:         openmotif-uil.diff
Patch7:         PrintableString.diff
Patch8:         openmotif22-strcmp.diff
#PATCH-FIX-UPSTREAM add LONG64 define from X11/Xmd.h (bnc#486469) SWAMP-ID 23476
Patch9:         openmotif22-add_LONG64_define.diff

%description
This is the old version 2.2.4 Open Motif runtime environment.  It
includes the Motif version 2.2.4 shared libraries.

Open Motif is a freely available version of the well-known Motif user
interface toolkit for open source operating systems.  This package was
built with the Metro Link sources.



%prep
%setup -q -n openmotif-%{version}
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9

%build
rm -f depcomp
%{suse_update_config -f}
autoreconf --force --install
%ifarch %arm
# miscompilation?
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O1"
%endif
./configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
	    --prefix=%{_prefix} --libdir=%{_libdir} \
	    --datadir=%{_datadir} --mandir=%{_mandir}
# Not parallel safe
make

%install
make install DESTDIR="$RPM_BUILD_ROOT"
# remove everything not packaged
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -f $RPM_BUILD_ROOT%_libdir/lib*.a
rm -f $RPM_BUILD_ROOT%_libdir/lib*.la
rm -f $RPM_BUILD_ROOT%_libdir/lib*.so
rm -rf $RPM_BUILD_ROOT%{_datadir}/X11
rm -rf $RPM_BUILD_ROOT%{_datadir}/Xm
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -rf $RPM_BUILD_ROOT%{_prefix}/bin

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_libdir}/*.so.*

%changelog
* Fri Mar 27 2009 mseben@suse.cz
- added openmotif22-add_LONG64_define.diff to add LONG64 define from
  X11/Xmd.h (bnc#486469) SWAMP-ID 23476
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Sun Aug 05 2007 aj@suse.de
- Fix build.
* Fri Mar 30 2007 ro@suse.de
- added flex,bison to buildreq
* Fri Oct 13 2006 schwab@suse.de
- Fix XPM plausibility checks.
* Thu Aug 03 2006 schwab@suse.de
- Don't build demos.
* Fri Jul 28 2006 schwab@suse.de
- Fix building with Xorg7.
* Mon Jul 03 2006 schwab@suse.de
- OpenMotif 2.2.4 libraries.