Summary: A program for 2D drawing organic molecules
Name: chemtool
Version: 1.6.11
Release: 1%{?dist}
License: GPLv2+
Group: Applications/Editors
Source0: http://ruby.chemie.uni-freiburg.de/~martin/chemtool/%{name}-%{version}.tar.gz
Patch0: %{name}-compile.patch
Patch1: %{name}-desktop.patch
Patch2: %{name}-gmd.patch
URL: http://ruby.chemie.uni-freiburg.de/~martin/chemtool/chemtool.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel
BuildRequires: libXt-devel
BuildRequires: gnome-mime-data
BuildRequires: kdelibs
Requires: openbabel
Requires: transfig
%description
Chemtool is a program for drawing organic molecules easily and store them
in a variety of output formats including as a X bitmap, Xfig, SVG or EPS
file. It runs under the X Window System using the GTK widget set.
%prep
%setup -q
%patch0 -p1 -b .compile
%patch1 -p1 -b .d
%patch2 -p1 -b .gmd
%build
%configure \
--with-kdedir=%{_prefix} \
--with-gnomedir=%{_prefix}
%{__make} %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/{applications,mimelnk/application,mime-info,mime-types,pixmaps} \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{32x32/mimetypes,48x48/apps}
# fix line endings
pushd examples
tr -d '\r' < 14263232.mol > 14263232.mol.unix && mv -f 14263232.mol.unix 14263232.mol
tr -d '\r' < sample.sdf > sample.sdf.unix && mv -f sample.sdf.unix sample.sdf
popd
%{__make} DESTDIR=$RPM_BUILD_ROOT install
install -p kde/mimelnk/application/x-chemtool.desktop $RPM_BUILD_ROOT%{_datadir}/mimelnk/application
install -p kde/icons/hicolor/32x32/mimetypes/chemtool.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/mimetypes
install -p gnome/mime-types/chemtool.* $RPM_BUILD_ROOT%{_datadir}/mime-types
install -p gnome/gnome-application-chemtool.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/chemtool.png
install -p chemtool.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
desktop-file-install --vendor=fedora \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
--add-category=Education \
--add-category=Science \
--add-category=Chemistry \
pld/chemtool.desktop
%find_lang %{name}
%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%{_bindir}/update-desktop-database &> /dev/null ||:
%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%{_bindir}/update-desktop-database &> /dev/null ||:
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc ChangeLog README TODO examples
%attr(755,root,root) %{_bindir}/*
%{_datadir}/mimelnk/application/*
%{_datadir}/mime-types/chemtool.*
%{_datadir}/pixmaps/*.xpm
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/applications/*.desktop
%{_mandir}/man1/*
%changelog
* Wed Oct 24 2007 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.11-1
- updated to 1.6.11
- updated license tag
- specfile cleanups
- fixed GNOME dir detection
- drop libEMF dependency (current transfig/fig2dev supports EMF output)
* Wed Apr 25 2007 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.10-1
- updated to 1.6.10
* Thu Dec 22 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-7
- fix stupid directory creation bug
* Thu Dec 21 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-6
- fix MIME type in desktop file (#220125)
* Mon Nov 20 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-5
- keep the whole examples dir in docs
- add update-desktop-database call to post{,un} scripts
* Mon Nov 20 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-4
- fix build without mock
* Sun Nov 19 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-3
- added missing BRs
- add scriptlets to update icon cache
* Sun Nov 19 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-2
- don't use non-standard macros
* Fri Nov 17 2006 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> 1.6.9-1
- initial build, based on bioxray.dk and PLD specfiles