File knoda.spec of Package knoda

#
# spec file for package knoda (Version 0.8.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           knoda
BuildRequires:  doxygen graphviz hk_classes hk_classes-devel kdelibs3-devel
BuildRequires:  kdelibs3-devel-doc python-devel python-tk
Url:            http://www.knoda.org/
License:        GPL v2 or later; LGPL v2.1 or later
Group:          Productivity/Databases/Clients
Summary:        A Database Front-End
Version:        0.8.3
Release:        1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        knoda-%{version}.tar.bz2
Source1:        Doxyfile
Patch0:         knoda.diff
Patch1:         fix-compile.diff
Patch2:         fix_libtool.patch

%description
Knoda is a database front-end for MySQL and PostgreSQL, which also
contains a generic ODBC driver. You can use it for creating tables and
databases, forms, reports, and queries. Knoda has also an export and
import filter for CSV files.

The package also contains a general library with dialogs for the
handling of databases, which can be used in other applications.



Authors:
--------
    Horst Knorr <hk_classes@knorrnet.de>

%package devel
License:        GPL v2 or later; LGPL v2.1 or later
Requires:       kdelibs3-devel kdelibs3-devel-doc
PreReq:         /bin/sh
Summary:        Database frontend
Group:          Development/Libraries/KDE
Requires:       hk_classes-devel kdelibs3-devel

%description devel
Knoda is a database front end (only for MySQL at the moment). You can
create dialogs with knoda to use them with your database later.

The package contains also a general library with dialogs for the
handling of databases, which can be used in other applications.



Authors:
--------
    Horst Knorr <hk_classes@knorrnet.de>

%prep
%setup -q -n %{name}-%{version}
%patch0 -p 0 -E
#%patch1
#%patch2
cp admin/*hk_classes .
. /etc/opt/kde3/common_options
update_admin --no-unsermake

%build
. /etc/opt/kde3/common_options
CXXFLAGS="$CXXFLAGS -I%_libdir/hk_classes/include/ -I%_libdir/hk_classes/include/hk_classes -L%_libdir/hk_classes/" 
./configure $configkde \
   --disable-final \
   --with-hk_classes-dir=%_libdir/hk_classes \
   --libdir=%_libdir	\
   --with-hk_classes-incdir=%_libdir/hk_classes/include/hk_classes \
   --with-pythondir=%_libdir/python
make %{?jobs:-j%jobs} -k

%install
make DESTDIR=${RPM_BUILD_ROOT} install
KDEDOCDIR=/usr/share/doc/KDE3-API/
doxygen %SOURCE1 
mkdir -p ${RPM_BUILD_ROOT}/${KDEDOCDIR}
mv apidocs ${RPM_BUILD_ROOT}/${KDEDOCDIR}/hk_kdeclasses
echo "Database handling dialog classes" \
       > ${RPM_BUILD_ROOT}/${KDEDOCDIR}/hk_kdeclasses/description.SuSE
echo "knoda"                 \
       > ${RPM_BUILD_ROOT}/${KDEDOCDIR}/hk_kdeclasses/package.SuSE
%if %suse_version > 1000
%suse_update_desktop_file -G "SQL Database Frontend" -r knoda Office Database
%else
%suse_update_desktop_file -r knoda Office Database
%endif
%find_lang %name

%files -f %name.lang
%defattr(-,root,root)
%doc NEWS README AUTHORS INSTALL ChangeLog COPYING 
/opt/kde3/bin/*
/opt/kde3/%_lib/lib*
/opt/kde3/%_lib/kde3/libhk_*
%dir /opt/kde3/share/applnk/Office
/opt/kde3/share/appl*/*/knoda.desktop
/opt/kde3/share/apps/knoda
/opt/kde3/share/apps/hk_kdeclasses
/opt/kde3/share/icons/??color
/opt/kde3/share/services/hk_*.desktop
/opt/kde3/share/config/magic
/opt/kde3/share/mimelnk/*/*.desktop
#/usr/%_lib/python2.?/site-packages/_hk_kdeclasses.so
#/usr/%_lib/python2.?/site-packages/hk_kdeclasses.py*

%files devel
%defattr(-,root,root)
/opt/kde3/include/*
%doc /usr/share/doc/KDE3-API/hk_kdeclasses

%post
%run_ldconfig

%postun
%run_ldconfig

%post devel
if test -x opt/kde3/share/apps/kdelibs/create-kdeapi; then
   opt/kde3/share/apps/kdelibs/create-kdeapi
fi

%postun devel
if test -x opt/kde3/share/apps/kdelibs/create-kdeapi; then
   opt/kde3/share/apps/kdelibs/create-kdeapi
fi

%changelog
* Thu Apr 24 2008 stbinner@suse.de
- update to 0.8.3:
   - A "reload"-button added to tables, queries and views
   - hk_kdedate: delimiter '#' was not only used in filtermode,
  but also in viewmode, fixed
* Tue Sep 26 2006 dmueller@suse.de
- update to 0.8.2:
  * for cChangeLog, see /usr/share/doc/packages/knoda/ChangeLo
* Mon Jun 26 2006 stbinner@suse.de
- build for < 10.1
* Wed Feb 15 2006 stbinner@suse.de
- add GenericName to .desktop file
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Oct 30 2005 dmueller@suse.de
- 0.8 update
* Sat Sep 17 2005 dmueller@suse.de
- fix build
* Mon Sep 12 2005 ro@suse.de
- fix requires
* Sat Jul 16 2005 dmueller@suse.de
- 0.7.4 update
* Wed May 25 2005 yxu@suse.de
- fixed initialization warnings
* Thu Feb 17 2005 adrian@suse.de
- update to version 0.7.2
- menu entry moved to xdg dir
* Mon Jul 12 2004 adrian@suse.de
- update to version 0.7
* Thu Apr 15 2004 coolo@suse.de
- build without unsermake
* Fri Jan 16 2004 adrian@suse.de
- fix Categories
* Mon Nov 24 2003 adrian@suse.de
- update to version 0.6.2a
* Tue Oct 28 2003 ro@suse.de
- added defattr
* Tue Oct 28 2003 ro@suse.de
- update to 0.6.1
- adapted include paths
* Mon Jul 28 2003 adrian@suse.de
- add Categories
* Thu Jun 12 2003 coolo@suse.de
- use %%find_lang
* Sun May 18 2003 adrian@suse.de
- update to version 0.6
* Wed Feb 26 2003 ro@suse.de
- include assert where needed
* Mon Feb 24 2003 sf@suse.de
- added --libdir=%%_libdir to configure
- change hk_class path in knoda/Makefile.am from
  /usr/lib to %%_libdir
* Sat Jan 25 2003 adrian@suse.de
- fix build with gcc 3.3
* Tue Jan 21 2003 adrian@suse.de
- update to version 0.5.6
* Sat Nov 23 2002 adrian@suse.de
- update to version 0.5.5
* Wed Sep 25 2002 adrian@suse.de
- update to version 0.5.4
* Sun Aug 18 2002 adrian@suse.de
- fix PreRequires
* Tue Aug 13 2002 coolo@suse.de
- KDE-API -> KDE3-API
* Tue Aug 06 2002 adrian@suse.de
- fix Requires in -devel package
* Wed Jul 31 2002 coolo@suse.de
- use doxygen for the docu and call the create-kdeapi script
* Tue Jul 23 2002 adrian@suse.de
- update to version 0.5.3
- add hungarian translation from Marcel
* Fri Jun 14 2002 adrian@suse.de
- update to version 0.5.2 (KDE 3 port)
* Tue May 28 2002 adrian@suse.de
- use update_admin
* Fri Apr 12 2002 coolo@suse.de
- fix for gcc 3.1
* Mon Apr 08 2002 adrian@suse.de
- update to version 0.5.1
* Tue Feb 12 2002 adrian@suse.de
- update to version 0.5
* Sun Dec 30 2001 adrian@suse.de
- update to version 0.4.3
* Fri Nov 09 2001 adrian@suse.de
- use kde2-devel-packages
* Mon Sep 10 2001 adrian@suse.de
- Spec file created from knoda-0.4.2.tar.bz2 by autospec
openSUSE Build Service is sponsored by