File gabedit.spec of Package gabedit

Name:		gabedit
Version:	2.4.8
Summary:	A GTK graphical user interface to computational chemistry packages
Release:	0
Source:		%{name}-%{version}.tar.gz
URL:		http://gabedit.sourceforge.net/home.html
License:	MIT
Group:		Productivity/Scientific/Chemistry
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}
BuildRequires:	desktop-file-utils gtk2-devel Mesa-devel gtkglext-devel 
#BuildRequires:  gtkglarea2-devel
%if 0%{?suse_version} <1230
BuildRequires: libjpeg-devel
%endif
%if 0%{?suse_version} > 1210
BuildRequires:  libICE-devel libSM-devel libXt-devel libXmu-devel
%endif
%if 0%{?suse_version} > 1220
BuildRequires:  glu-devel libjpeg8-devel pangox-devel
%endif

%description
Gabedit is a graphical user interface to Gamess-US, Gaussian, Molcas, Molpro
and MPQC computational chemistry packages. Gabedit includes graphical
facilities for generating keywords and options, molecule specifications and
their input sections for even the most advanced calculation types. Gabedit
includes an advanced Molecule Builder. You can use it to rapidly sketch in
molecules and examine them in three dimensions. You can build molecules by
atom, ring, group, amino acid and nucleoside. You can also read geometry from
a file. Most major molecular file formats are supported.

Gabedit includes a Gamess-US, Gaussian, Molcas, Molpro and MPQC Calculation
Setup window which allows you to set up Gamess-US, Gaussian, Molcas, Molpro
and MPQC jobs in a simple and straightforward manner.

Gabedit can graphically display a variety of Gamess-US, Gaussian, Molcas,
Molpro, MPQC and (partially) ADF calculation results, including the following:
- Molecular orbitals
- Surfaces from the electron density, electrostatic potential, NMR shielding
  density, and other properties.
- Surfaces may be displayed in solid, translucent and wire mesh modes. They
  are can be colorcoded by a separate property.
- Contours (colorcoded), Planes colorcoded, Dipole. XYZ axes and the principal
  axes of the molecule.
- Animation of the normal modes corresponding to vibrational frequencies.
- Animation of the rotation of geometry, surfaces, contours, planes colorcoded,
  xyz and the principal axes of the molecule.
- Animation of contours, Animation of planes colorcoded.

Gabedit can display IR and Raman computed spectra.

Gabedit can generate a povray file for geometry (including hydrogen's bond),
surfaces (including colorcoded surfaces), contours, planes colorcoded.

Gabedit can save picture in BMP, JPEG, PNG, PPM and PS format.

Gabedit can generate automatically a series of pictures for animation
(vibration, geometry convergence, rotation, contours, planes colorcoded).



%prep
%setup -q
# remove bundled pre-built binaries


%build
export SUSE_ASNEEDED=0
export LDFLAGS="$LDFLAGS -lm"
rpm -q gtkglext-devel
#%{__make} %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS"
make

%install
rm -rf %{buildroot}
# hack to make lint happy
echo 'GenericName=Quantum chemistry frontend' >> utils/Others/%{name}.desktop
echo 'X-SuSE-translate=true' >> utils/Others/%{name}.desktop
install -d %{buildroot}/%{_bindir}
install -pm755 %{name} %{buildroot}/%{_bindir}

install -d %{buildroot}%{_datadir}/applications
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
	utils/Others/%{name}.desktop

for size in 16 32 48 ; do
	install -d %{buildroot}/%{_datadir}/icons/hicolor/${size}x${size}/apps
	install -pm644 icons/Gabedit$size.png %{buildroot}/%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png
done

%clean
rm -rf %{buildroot}

%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root)
%doc ChangeLog License utils
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*.png

%changelog