File mopac7.spec of Package mopac7
#
# spec file for package mopac7
#
# Copyright (c) 2015 SUSE LINUX 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/
#
%define libname libmopac7-1
Name: mopac7
Version: 1.15
Release: 0
Summary: Semi-empirical quantum mechanics suite
License: SUSE-Public-Domain
Group: Productivity/Scientific/Chemistry
Url: http://sourceforge.net/projects/mopac7/
Source0: http://www.bioinformatics.org/ghemical/download/current/%{name}-%{version}.tar.gz
Patch1: mopac7-1.14-random_data.patch
Patch2: mopac7-1.14-libdir.patch
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: pkg-config
BuildRequires: gcc-fortran
BuildRequires: libtool
Requires: %{libname} = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MOPAC7 is a semi-empirical quantum-mechanics code written by James J. P.
Stewart and co-workers. The purpose of this project is to maintain MOPAC7 as
a stand-alone program as well as a library that provides the functionality
of MOPAC7 to other programs.
%package -n %{libname}
Summary: Dynamic libraries from %{name}
Group: System/Libraries
%description -n %{libname}
MOPAC7 is a semi-empirical quantum-mechanics code written by James J. P.
Stewart and co-workers. The purpose of this project is to maintain MOPAC7 as
a stand-alone program as well as a library that provides the functionality
of MOPAC7 to other programs.
This package contains dynamic libraries.
%package -n %{libname}-devel
Summary: Header files and static libraries from %{name}
Group: Development/Languages/C and C++
Requires: %{libname} >= %{version}
%description -n %{libname}-devel
MOPAC7 is a semi-empirical quantum-mechanics code written by James J. P.
Stewart and co-workers. The purpose of this project is to maintain MOPAC7 as
a stand-alone program as well as a library that provides the functionality
of MOPAC7 to other programs.
This package contains development files.
%prep
%setup -q
%patch1
%patch2
find . -name ".cvsignore" -exec rm -f {} \;
%build
./autogen.sh
%configure --disable-static
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}%{_bindir}
libtool --mode=install install -m 755 fortran/%{name} %{buildroot}%{_bindir}/%{name}
sed -e "s|\./src|%{_bindir}|g" run_mopac7 > %{buildroot}%{_bindir}/run_mopac7
chmod 755 %{buildroot}%{_bindir}/*
rm tests/Makefile*
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%doc tests
%{_bindir}/%{name}
%{_bindir}/run_mopac7
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*
%files -n %{libname}-devel
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/libmopac7.la
%{_libdir}/pkgconfig/*.pc
%changelog