File chemtool.spec of Package chemtool

#
# spec file for package chemtool (Version 1.6.12)
#
# Copyright (c) 2008 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:           chemtool
%define name0 cht
Summary:        Program for Drawing 2D Organic Molecules
Url:            http://ruby.chemie.uni-freiburg.de/~martin/chemtool/
Version:        1.6.12
Release:        74
License:        GPL v2 or later
PreReq:         shared-mime-info
BuildRequires:  gtk2-devel shared-mime-info update-desktop-files
Group:          Productivity/Graphics/Other
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Patch1:         %{name}-1.6.11-mime.diff
Patch2:         %{name}-1.6.11-memmove.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Chemtool is a program for drawing organic molecules easily and storing
them as an X bitmap, Xfig, or EPS file. It runs under the X Window
System using the GTK widget set.



Authors:
--------
    Thomas Volk
    Dr. Martin Kroeker

%prep
%setup -q
%patch1
%patch2

%build
# to convince configure to install also gnome stuff
%configure \
    --with-gnomedir=/usr
make %{?jobs:-j%jobs}
# rebuild the .mo files -- the distributed cs/chemtool.mo didn't work in 1.6.7
# for po in locales/*/*.po; do
#	msgfmt -o "${po/%.po/.mo}" "$po"
# done

%install
%makeinstall
%find_lang %{name}
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
install -m 0644 %SOURCE1 \
         $RPM_BUILD_ROOT/usr/share/applications/
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 gnome/gnome-application-%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
DESTDIR=$RPM_BUILD_ROOT mime-info-to-mime
%suse_update_desktop_file %name Chemistry

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ -x usr/bin/update-mime-database ]; then
	usr/bin/update-mime-database /usr/share/mime >/dev/null
fi

%postun
if [ -x usr/bin/update-mime-database ]; then
	usr/bin/update-mime-database /usr/share/mime >/dev/null
fi

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name0}
%{_bindir}/chemtoolbg
%doc NEWS README TODO ChangeLog
%doc %{_mandir}/man1/%{name}.1*
%doc %{_mandir}/man1/%{name0}.1*
/usr/share/applications/*.desktop
/usr/share/pixmaps/gnome-application-chemtool.png

%changelog
* Mon Sep 22 2008 lrupp@suse.de
- fix some rpmlint warnings and beautify specfile
* Wed Feb 27 2008 anosek@suse.cz
- updated to version 1.6.11
  - Key sequences @+ and @- now generate "circle" variants of plus and minus signs
  - Bond length and zoom factor are now saved in chemtool files and restored on loading
  - Corrected length calculation for labels without sub- or superscripts (thereby fixing
  truncation of labels near the edges of a drawing)
  - Corrected positioning and inter-character spacing of labels with sub- or superscripts
  - Changed OpenOffice output to avoid LaTeX formatting (that fig2sxd does not support)
  - Improved clipping of double and triple bonds around labels in the screen view
  - Improved the preview function to cope with older (pre-1.6) chemtool files
  - The "gtklp" frontend for CUPS is now available from the "print command" menu
  - Updated documentation
- dropped patch (Makefile.diff)
* Wed Apr 25 2007 anosek@suse.cz
- updated to version 1.6.10
  - Added a "round parentheses" option to the bracket tool.
  - Added export to PNG (through fig2dev/gs).
  - Added template entries for morphine and several diazoles.
  - Improved truncation of bonds around labels in the screen view.
  - Redesigned Configuration dialogs.
  - XFig and related export modes now support text in non-western
  european character sets ("Times" font only) through fig2dev's
  "international" option.
  - The KDE "kprinter" frontend is now available from the "print command"
  configuration dialog
  - Cleanup no longer removes drop shadows from boxes
  - Fixed a potential crash with non-ascii characters in labels (including
  electron-pair dots) and gtk2.
  - Fixed menu shortcuts getting intercepted by the labeling shortcut mechanism.
  - Fixed width of arrowheads in ps/eps.
  - Fixed superscript position, national characters and arrowhead size in SVG.
  - Fixed a bug in SVG export that could truncate labels in subsequent save or
  export actions.
- removed obsolete zoom.diff
* Wed Jan 17 2007 anosek@suse.cz
- changed prefix /opt/gnome -> /usr
* Tue Dec 05 2006 prusnak@suse.cz
- fixed comparison with string literal [#224840]
* Fri Nov 10 2006 ro@suse.de
- fix manpage permissions
* Thu Aug 03 2006 anosek@suse.cz
- updated to 1.6.9
  - Fixed placement of right-justified labels containing sub-
  and/or superscripts on screen and in all XFig-based export modes.
  - Worked around a bug in fig2dev that prevented creation of EMF files
  - Improved spacing of sub/superscripted labels in GTK2 builds
  - Corrected line spacing of triple and quadruple bonds.
- removed not existing .desktop category Edutainment
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 05 2006 mmarek@suse.cz
- update to 1.6.8
* Tue Oct 25 2005 mmarek@suse.cz
- correctly fix #122542 (thanks to rguenther@suse.de)
* Tue Oct 18 2005 mmarek@suse.cz
- updated to 1.6.7
- build with gtk2
- added workaround for some gcc-4.0 bug [#122542] to be able to test
  the package
* Mon Jun 13 2005 ro@suse.de
- avoid redefining memcpy
* Tue Apr 12 2005 ltinkl@suse.cz
- update to 1.6.6
* Tue Sep 07 2004 sbrabec@suse.cz
- Generated shared mime info.
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Thu Sep 25 2003 meissner@suse.de
- fixed undo_* prototypes, fixing #31724
* Sat Aug 16 2003 adrian@suse.de
- add desktop file
* Wed Jul 09 2003 ltinkl@suse.cz
- updated sources to version 1.6
- fixed Gnome-related files installation
- use %%find_lang macro
* Tue Nov 12 2002 ro@suse.de
- changed neededforbuild <xf86 xdevel> to <x-devel-packages>
* Thu Mar 21 2002 tcrhak@suse.cz
- moved ChangeLog, TODO and README to %%{_docdir}/%%{_name}-%%{_version}
* Fri Oct 26 2001 tcrhak@suse.cz
- New package: initial version 1.4.1
openSUSE Build Service is sponsored by