Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > bf0a3dc7529321c639f7d3dd43bef10a > files > 9

coot-0.6.1-3.20100127svn2740.fc13.src.rpm

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define refmac_dictionary %(rpm -q --queryformat '%%{name}-%%{version}' refmac-dictionary)

Name: coot
Summary: The crystallographic object-oriented toolkit
URL: http://www.biop.ox.ac.uk/coot/
Version: 0.6.1
Release: 3.20100127svn2740%{?dist}
# source code is mixed GPLv3+ and LGPLv2+ (see %files for breakdown)
License: GPLv3+ and LGPLv2+
Group: Applications/Engineering
# The source for this package was pulled from upstream's vcs.  Use the
# following commands to generate the tarball:
#  svn co -r 2740 http://coot.googlecode.com/svn/trunk/ coot-0.6.1
#  tar cvzf coot-0.6.1-20100127svn2740.tar.gz coot-0.6.1
Source0: coot-0.6.1-20100127svn2740.tar.gz
Source1: http://www.ysbl.york.ac.uk/~emsley/software/%{name}-reference-structures.tar.gz
Source2: svn-revision.cc
Source3: coot.in
Source4: %{name}.png
Source5: %{name}.desktop
Source6: __init__.py
Patch0: coot-configure.in.patch
Patch1: coot-user-manual.texi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: clipper-devel >= 2.1-7
BuildRequires: desktop-file-utils
BuildRequires: freeglut-devel
BuildRequires: gsl-devel
BuildRequires: gtk2-devel
BuildRequires: gtkglext-devel
BuildRequires: guile-devel
BuildRequires: guile-lib
BuildRequires: imlib-devel
BuildRequires: libcurl-devel
BuildRequires: libgnomecanvas-devel
BuildRequires: libtool
BuildRequires: mmdb-devel >= 1.19
BuildRequires: python-devel
BuildRequires: pygtk2-devel
BuildRequires: refmac-dictionary
BuildRequires: ssm-devel
BuildRequires: swig
%if 0%{?rhel}
BuildRequires: tetex-latex
%else
BuildRequires: tex(latex)
%endif
BuildRequires: texinfo-tex
Requires: refmac-dictionary

%description

Coot is a toolkit for Macromolecular Crystallography and
model-building.  Coot uses professional (and free) widgets (with the
GUI builder glade), mmdb, clipper, and OpenGL, together with a new
approach to map contouring and importing/creation and other modeling
and building operations.

%package devel
Summary: Header files and library for developing programs with coot
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries

%description devel

This package contains libraries and header files needed for program
development using the coot macromolecular model building package.

%package doc
Summary: documentation PDF files for coot
Requires: %{name} = %{version}-%{release}
Group: Applications/Engineering

%description doc

the coot-doc package contains information concerning the use and
button/key shortcuts for the coot macromolecular model building
package.

%prep
%setup -q -a 1
%patch0 -p0
%patch1 -p0

cp %{SOURCE2} ./src/
cp %{SOURCE3} ./src/

# various cleanups
rm src/coot_wrap_guile_pre.cc
rm src/coot_wrap_python_pre.cc
iconv -f iso8859-1 -t utf-8 README > README.conv && mv -f README.conv README
find . -executable \( -name "*.cc" -o -name "*.cpp" -o -name "*.h" -o -name "*.hh" \) -exec chmod 644 {} \;

aclocal -I macros
libtoolize --automake --copy
autoconf
automake --copy --add-missing --gnu

%build
%configure --with-gtk2 --with-guile --with-python --with-pygtk --with-gtkcanvas-prefix=/usr --disable-static CPPFLAGS="-I/usr/include/mmdb -I/usr/include/ssm" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags}
pushd doc
texi2pdf user-manual.texi
make coot-keys-and-buttons.pdf
popd

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'

mv reference-structures %{buildroot}%{_datadir}/coot/
sed -i 's|COOT_PYTHON_DIR=|COOT_PYTHON_DIR=%{python_sitelib}/coot|' src/coot
sed -i 's|COOT_REFMAC_LIB_DIR=|COOT_REFMAC_LIB_DIR=%{_datadir}/%{refmac_dictionary}|' src/coot
install -p -m 755 src/coot %{buildroot}%{_bindir}/

# remove unpackaged files from the buildroot
rm -f %{buildroot}%{_libdir}/*.la

# headers
mkdir %{buildroot}%{_includedir}/coot
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/coot/
mv %{buildroot}%{_includedir}/*.hh %{buildroot}%{_includedir}/coot/

# python stuff
mkdir -p %{buildroot}%{python_sitelib}/coot
mv %{buildroot}%{_datadir}/coot/python/* %{buildroot}%{python_sitelib}/coot/
cp %{SOURCE6} %{buildroot}%{python_sitelib}/coot/
chmod 644 %{buildroot}%{python_sitelib}/coot/coot.py

# desktop file
desktop-file-install --vendor='' --dir=%{buildroot}%{_datadir}/applications %{SOURCE5}
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pixmaps/

%clean
rm -rf %{buildroot}

%check
# this fails - need to fix upstream
# make check

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS README COPYING
%{_bindir}/*
# libccp4mg-utils.so* is LGPLv2+
# libcoot-surface.so* is a mix of LGPLv2+ and GPLv3+
# all others are GPLv3+ 
%{_libdir}/*.so.*
%{_datadir}/coot/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{python_sitelib}/coot/

%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/coot/

%files doc
%defattr(-,root,root,-)
%doc doc/coot-keys-and-buttons.pdf doc/user-manual.pdf

%changelog
* Thu Aug 05 2010 Tim Fenn <fenn@stanford.edu> - 0.6.1-3.20100127svn2740
- fix file attr
- add comment to make check error

* Tue Jul 20 2010 Tim Fenn <fenn@stanford.edu> - 0.6.1-2.20100127svn2740
- move some documentation to subpackage
- add check section

* Wed Jan 27 2010 Tim Fenn <fenn@stanford.edu> - 0.6.1-1.20100127svn2740
- update to SVN 2740, 0.6.1 release
- add curl buildrequires

* Thu Dec 03 2009 Tim Fenn <fenn@stanford.edu> - 0.6-6.20091203svn2545
- update to SVN 2545, 0.6 release

* Mon Nov 30 2009 Tim Fenn <fenn@stanford.edu> - 0.6-5.20091130svn2528
- fix texi, include user-manual
- update to SVN 2528
- remove net-http, guile-goosh and guile-gui

* Wed Oct 07 2009 Tim Fenn <fenn@stanford.edu> - 0.6-4.20091007svn2404
- update buildrequires
- use tetex-latex on EL builds
- update to SVN 2404 (fixes some licensing issues)

* Mon Oct 05 2009 Tim Fenn <fenn@stanford.edu> - 0.6-3.20091005svn2400
- update to SVN 2400

* Wed Sep 23 2009 Tim Fenn <fenn@stanford.edu> - 0.6-2.20090920svn2334
- edit summary
- update upstream URL
- make create_server.py non-executable
- chmod src to 644

* Sun Sep 20 2009 Tim Fenn <fenn@stanford.edu> - 0.6-1.20090920svn2334
- update to 0.6
- get source from VCS system

* Wed Mar 25 2009 Tim Fenn <fenn@stanford.edu> - 0.5.2-3
- fix summary
- add additional licensing information
- split guile-extras into original tarballs

* Sat Mar 14 2009 Tim Fenn <fenn@stanford.edu> - 0.5.2-2
- fix for desktop-file-install
- gcc 4.4 patch

* Mon Dec 15 2008 Tim Fenn <fenn@stanford.edu> - 0.5.2-1
- update to 0.5.2

* Thu Nov 27 2008 Tim Fenn <fenn@stanford.edu> - 0.5-3
- use consistent buildroot
- include gtkglext-devel, guile-lib, desktop-file-utils in buildrequires
- remove pyobject2 in buildrequires

* Tue Nov 18 2008 Tim Fenn <fenn@stanford.edu> - 0.5-2
- enable guile
- include extra guile modules

* Mon Nov 17 2008 Tim Fenn <fenn@stanford.edu> - 0.5-1
- initial build