File Togl.spec of Package togl

# norootforbuild

Name: 	 Togl
Summary: Togl is a Tk OpenGL widget
Version: 1.7
Release: 1
License: GPL
Group:   Development/Libraries/Tcl 	
URL:     http://togl.sourceforge.net/
Source0: Togl-1.7.tar.bz2
Source1: tcl8.5.5-src.tar.bz2
Source2: tk8.5.5-src.tar.bz2
Source3: Togl-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: make autoconf automake gcc gcc-c++ tcl-devel
BuildRequires: tk-devel xorg-x11-devel Mesa-devel
%if %suse_version > 1020
BuildRequires: fdupes
%endif

%description
Togl is a Tk widget for OpenGL rendering.
Togl was originally based on OGLTK, written
by Benjamin Bederson at the University of
New Mexico. Togl's main features are:

    * unifies Microsoft Windows, X11 (Linux/IRIX/...), and Mac OS X Aqua support
    * support for requesting stencil, accumulation, alpha buffers, etc.
    * multiple OpenGL drawing windows
    * simple stereo rendering support
    * simple, portable font support
    * color-index mode support including color allocation functions
    * overlay plane support
    * OpenGL extension testing from Tcl
    * Tcl Extension Architecture (TEA) 3 compliant 

Togl does almost no OpenGL drawing itself, instead it
manages OpenGL drawing by calling various Tcl commands
(a.k.a., callback functions). Those commands can be C
functions that call OpenGL (in)directly or another Tcl package (e.g., Tcl3D).

%prep
%setup -b 1
%setup -b 2
%setup -q -n %name-%version

%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
%configure
%__make %{?jobs:-j%{jobs}}

%install
%makeinstall

#chmod -x %buildroot/%_libdir/libToglstub1.7.a

# made brp-checks happy
%__install -d %buildroot/%_datadir/%name%version
%__mv %buildroot/%_libdir/Togl1.7/pkgIndex.tcl %buildroot/%_datadir/%name%version/pkgIndex.tcl
%__ln_s %_libdir/Togl1.7/libTogl1.7.so %buildroot/%_datadir/%name%version/libTogl1.7.so
%__ln_s %_libdir/Togl1.7/libTogl1.7.so %buildroot/%_libdir/libTogl1.7.so

%if %suse_version > 1020
%fdupes -s %{buildroot}
%endif

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%clean
rm -fr %buildroot

%files
%defattr(-,root,root)
%doc LICENSE *.html
%_includedir/togl*.h
%dir %_datadir/%name%version
%_datadir/%name%version/pkgIndex.tcl
%_datadir/%name%version/libTogl1.7.so
%dir %_libdir/Togl1.7
%_libdir/Togl1.7/libTogl1.7.so
%_libdir/libTogl1.7.so

%changelog
openSUSE Build Service is sponsored by