%define origname tora
Name: tora
Version: 2.1.1
Release: alt1
Summary: TOra is an open-source multi-platform database management GUI
License: GPL
Group: Games/Other
Url: http://www.torasql.com
Packager: Andrew Clark <andyc@altlinux.ru>
Source: http://sourceforge.net/projects/tora/files/tora/2.1.1/%name-%version.tar.gz

BuildRequires(pre): rpm-macros-cmake

# Automatically added by buildreq on Fri Jan 01 2010
BuildRequires: gcc-c++ glibc-devel-static imake libice-devel libX11-devel libpcre-devel libqscintilla2-qt4-devel xorg-cf-files

%description
TOra is a Toolkit for Oracle which aims to help the DBA or
developer of database applications. Features PL/SQL debugger,
SQL worksheet with syntax highlighting, DB browser and a full
set of DBA tools. TOra also includes support for MySQL and Postgres.

%prep
%setup -n %name-%version

%build
%configure
%make_build

%install
#%makeinstall_std

mkdir -p %buildroot/{%_bindir,%_libdir/%name,%_infodir,%_docdir/%name/{api,images}}

install -pD -m 755 %_builddir/%name-%version/src/%name %buildroot%_bindir/

install -pD -m 644 %_builddir/%name-%version/src/i18n/*.qm %buildroot%_libdir/%name/

install -pD -m 644 %_builddir/%name-%version/doc/help/%name/*.html  %buildroot%_docdir/%name/
install -pD -m 644 %_builddir/%name-%version/doc/help/images/*.png %buildroot%_docdir/%name/images

install %_builddir/%name-%version/doc/help/%name.info %buildroot%_infodir/

#install -pD -m 644 %_builddir/%name-%version/doc/help/api/ %buildroot%_docdir/%name/api

%files
%_bindir/*
%_libdir/%name/
%_docdir/%name
%_infodir/*.info*

%changelog
* Sat Jan 2 2010 Andrew Clark <andyc@altlinux.ru> 2.1.1-alt1
- initial build for ALT.

