File xstereograph.spec of Package xstereograph

#
# spec file for package xstereograph (Version 2.1)
#
# 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:           xstereograph
BuildRequires:  libpng-devel xaw3d-devel xorg-x11 xorg-x11-devel
%define		version_libsx 2.03
Summary:        Stereogram generator
Group:          Amusements/Games/Other
License:        GPL v2 or later ; LGPL v2.1 or later
Requires:       xless ImageMagick emacs-x11
Version:        2.1
Release:        788
Url:            http://freshmeat.net/projects/xstereograph/
Source0:        %{name}-%{version}.tar.bz2
Source1:        libsx-%{version_libsx}.tar.bz2
Patch0:         %{name}-%{version}.patch
Patch1:         %{name}-%{version}-ia64.patch
Patch2:         %{name}-%{version}-strings.patch
Patch3:         %{name}-%{version}-dialogs.patch
Patch4:         %{name}-%{version}-gcc4.patch
Patch5:         %{name}-%{version}-uninitialized.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Stereograph is a stereogram generator. In detail it is a single image
stereogram (SIS) generator. That's a program that produces
two-dimensional images that seem to be three-dimensional (surely you
know the famous works of "The Magic Eye", Stereograph produces the same
output). You do _not_ need any pair of colored spectacles to regard
them - everyone can learn it.



Authors:
--------
    fabian.linux@januszewski.de
    demailly@fourier.ujf-grenoble.fr

%prep
%setup -q -a 1
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5

%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
#
# libsx
cd libsx-%{version_libsx}/src
make
cd ../..
#
# xstereograph
make X11_LIBDIR=/usr/%{_lib}

%install
make DESTDIR=$RPM_BUILD_ROOT install
install -d -m 755 $RPM_BUILD_ROOT/usr/share/xstereograph/
cp -r depth_maps textures mathfiles magic-eye.xpm stereo_dia.png \
      $RPM_BUILD_ROOT/usr/share/xstereograph/      
#
# documentation
install -d -m 755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
install -m 644 AUTHORS COPYING README $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
#
# documentation stereograph
cd stereograph-0.28a
install -d -m 755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/stereograph/
install -m 644 AUTHORS COPYING INSTALL README TODO \
	       $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/stereograph/
cd ..
#
# libsx
cd libsx-%{version_libsx}/src
make DESTDIR=$RPM_BUILD_ROOT \
     LIBDIR=%{_libdir} \
     INCLUDEDIR=%{_includedir}/SX \
     SHAREDIR=%{_datadir}/libsx \
     install
#
# libsx documentation
cd ..
install -d -m 755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/libsx/
install -m 644 CHANGES HELP HINTS LICENSE README \
               $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/libsx/
cd ..
%{__rm} -f %{buildroot}%{_libdir}/*.a

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}/
%doc %{_mandir}/man1/*
%{_bindir}/*
%{_includedir}/SX
%{_datadir}/xstereograph
%{_datadir}/libsx
%{_libdir}/lib*

%changelog
* Fri Jun 19 2009 coolo@novell.com
- disable as-needed for this package as it fails to build with it
* Fri Apr 17 2009 crrodriguez@suse.de
- remove static libraries
* Wed Aug 22 2007 anosek@suse.cz
- changed prefix /usr/bin/X11 -> /usr/bin
- dropped obsoleted xstereograph-X11R7.patch
* Fri Jun 01 2007 dmueller@suse.de
- fix buildrequires
* Thu Aug 17 2006 cthiel@suse.de
- fix build with X.Org 7.1
* Mon Jul 24 2006 mmarek@suse.de
- workaround build with modular Xorg
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 schwab@suse.de
- Use RPM_OPT_FLAGS.
- Don't strip binaries.
* Tue Jan 03 2006 mmarek@suse.cz
- fix uninitialized variable warning
  [#140092] (uninitialized.patch)
* Wed Apr 27 2005 ro@suse.de
- fix build with gcc-4
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Wed Aug 27 2003 kukuk@suse.de
- Use Xaw3d instead of Xaw95
* Tue Jun 17 2003 ro@suse.de
- added directory to filelist
* Tue Mar 18 2003 pmladek@suse.cz
- fixed to find /usr/X11R6/share/libsx/dialogs.xx
* Mon Nov 11 2002 pmladek@suse.cz
- fixed multiline string literals for the new gcc-3.3 (strings patch)
- installed correctly under the /usr/X11R6 direcory tree
- used %%run_ldconfig in the %%post and %%postun sections
* Fri Apr 05 2002 pmladek@suse.cz
- more used macro %%{_lib} to fix for lib64
- fixed LDFLAGS for libpng and libz
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Wed Jan 23 2002 pmladek@suse.cz
- used macro %%{_lib} to fix for lib64
* Fri Jan 11 2002 ro@suse.de
- no subdirs in /usr/games
* Fri Nov 30 2001 sf@suse.de
- lots of missing includes added
- libsx compiles now with -fPIC
* Thu Oct 25 2001 pmladek@suse.cz
- package created, version 2.1
- with libsx, version 2.03
openSUSE Build Service is sponsored by