%global refmac_dictionary %(rpm -q --queryformat '%%{name}-%%{version}' refmac-dictionary) Name: coot Summary: The crystallographic object-oriented toolkit URL: http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/ Version: 0.8.8 Release: 2%{?dist} # source code is mixed GPLv3+ and LGPLv2+ (see files for breakdown) License: GPLv3+ Group: Applications/Engineering Source0: http://www2.mrc-lmb.cam.ac.uk/Personal/pemsley/coot/source/releases/%{name}-%{version}.tar.gz # additional files for reference/libraries used in main binary Source1: http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/dependencies/reference-structures.tar.gz Source2: coot.in Source3: %{name}.desktop Source4: __init__.py # don't use broken guile_lib autoconf macro Patch0: coot-configure.ac.patch # fix location of python files and remove hard coding of -Wl Patch1: coot-makefile.patch # fix to use guile1.8 config in autoconf script Patch2: coot-guile.patch # fix to includes so build completes Patch3: coot-utils.patch # proper include for rdkit Patch4: coot-rdkit.patch # Fix for moving python files to coot/lidia Patch5: coot-lbg.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: clipper-devel >= 2.1-7 BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: libappstream-glib BuildRequires: freeglut-devel BuildRequires: goocanvas-devel BuildRequires: gsl-devel BuildRequires: gtk2-devel BuildRequires: gtkglext-devel BuildRequires: compat-guile18-devel BuildRequires: guile-lib BuildRequires: imlib-devel BuildRequires: libcurl-devel BuildRequires: libgnomecanvas-devel BuildRequires: libtool BuildRequires: mmdb2-devel BuildRequires: python2-devel BuildRequires: python2-rdkit BuildRequires: pygtk2-devel BuildRequires: rdkit-devel BuildRequires: refmac-dictionary BuildRequires: ssm-devel BuildRequires: swig BuildRequires: tex(latex) BuildRequires: texinfo-tex BuildRequires: ghostscript Requires: compat-guile18 Requires: hicolor-icon-theme Requires: refmac-dictionary Requires: %{name}-data = %{version}-%{release} Requires: lib%{name}%{?_isa} = %{version}-%{release} Requires: python2-%{name}%{?_isa} = %{version}-%{release} %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 data Summary: Data files for coot Group: Applications/Engineering BuildArch: noarch %description data The coot-data package contains all the support files for coot, such as reference structures, rotamer libraries, etc. %package -n libcoot Summary: Library files for coot Group: Development/Libraries %description -n libcoot This package contains library files needed for program development using the coot macromolecular model building package. %package -n libcoot-devel Summary: Header files and library for developing programs with coot Group: Development/Libraries Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n libcoot-devel This package contains header files needed for program development using the coot macromolecular model building package. %package -n python2-%{name} %{?python_provide:%python_provide python2-%{name}} Summary: Python support for coot Group: Development/Libraries %description -n python2-%{name} This package contains python specific library files needed for coot to provide support for and interface with the python shell %package doc Summary: documentation PDF files for coot Group: Applications/Engineering BuildArch: noarch %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 %patch2 -p0 %patch3 -p0 %patch4 -p0 %patch5 -p0 cp %{SOURCE2} ./src/ cp %{SOURCE3} . # various cleanups iconv -f iso8859-1 -t utf-8 README > README.conv && mv -f README.conv README rm macros/libtool.m4 aclocal -I macros libtoolize --automake --copy autoconf automake --copy --add-missing --gnu %build mkdir guile %configure --with-guile --with-python --with-pygtk --disable-static CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" --with-enhanced-ligand-tools RDKIT_LIBS="-lMolDraw2D -lForceFieldHelpers -lDescriptors -lForceField -lSubstructMatch -lOptimizer -lDistGeomHelpers -lDistGeometry -lAlignment -lEigenSolvers -lDepictor -lMolChemicalFeatures -lFileParsers -lRDGeometryLib -lGraphMol -lSmilesParse -lDataStructs -lRDGeneral -lboost_python -lpython2.7" RDKIT_CXXFLAGS="-I%{_includedir}/rdkit -DRDKIT_HAS_CAIRO_SUPPORT" # remove rpath, direct-shlib-dep 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 sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool # sed -i "s|ofile='libtool'|ofile='libtool.foo'|" config.status sed -i 's|$(SHELL) ./config.status;; \\|echo "skipping";; \\|' Makefile cp libtool libtool.tdf make %{?_smp_mflags} pushd src doxygen coot-dox.cfg popd pushd doc make coot-user-manual.pdf make coot-keys-and-buttons.pdf popd %install make install DESTDIR=%{buildroot} INSTALL='install -p' mv reference-structures %{buildroot}%{_datadir}/coot/ sed -i 's|COOT_PYTHON_DIR=|COOT_PYTHON_DIR=%{python2_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 rm -f %{buildroot}%{python2_sitearch}/*.la # python stuff for lib in $(find %{buildroot}%{python2_sitelib}/coot/ -name "*.py"); do sed '/\/usr\/bin\/env/d' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done cp %{SOURCE4} %{buildroot}%{python2_sitelib}/coot/ chmod 644 %{buildroot}%{python2_sitelib}/coot/coot.py # desktop file desktop-file-install --vendor='' --dir=%{buildroot}%{_datadir}/applications coot.desktop appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %post -n libcoot -p /sbin/ldconfig %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %postun -n libcoot -p /sbin/ldconfig %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %{_bindir}/* %{_libexecdir}/* %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/icons/hicolor/48x48/apps/coot.png %{_datadir}/icons/hicolor/64x64/apps/coot.png %{_datadir}/icons/hicolor/96x96/apps/coot.png %{_datadir}/icons/hicolor/256x256/apps/coot.png %{_datadir}/icons/hicolor/scalable/apps/coot.svg %{_mandir}/man1/* %files data %{_datadir}/coot/ %files -n libcoot %doc AUTHORS README %license COPYING # GPLv3+ %{_libdir}/*.so.* %files -n python2-%{name} %{python2_sitelib}/coot/ %{python2_sitearch}/*.so.* %{python2_sitearch}/*.so %files -n libcoot-devel %{_libdir}/*.so %{_includedir}/coot/ %files doc %license COPYING %doc doc/coot-keys-and-buttons.pdf doc/coot-user-manual.pdf %changelog * Mon May 15 2017 Fedora Release Engineering - 0.8.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild * Sat Mar 18 2017 Tim Fenn - 0.8.8-1 - update to 0.8.8 * Thu Feb 09 2017 Tim Fenn - 0.8.7-6 - Fix to requires * Wed Feb 08 2017 Kalev Lember - 0.8.7-5 - Rebuilt for Boost 1.63 * Sun Feb 05 2017 Tim Fenn - 0.8.7-4 - add missing patch * Thu Jan 26 2017 Tim Fenn - 0.8.7-3 - rename python2 package - add python_provide macro - remove hardcoded library path include * Sat Nov 12 2016 Tim Fenn - 0.8.7-2 - test build for fixing unused-shlib and weak-sybmol * Sun Nov 06 2016 Tim Fenn - 0.8.7-1 - update to 0.8.7 - fix requires in devel packages - make coot-data noarch - remove macros and lingering ldconfig calls * Tue Nov 01 2016 Tim Fenn - 0.8.6.2-2 - move license and doc files to libcoot - remove spurious ldconfig - split out python files and data to separate packages and add requires * Sat Oct 22 2016 Tim Fenn - 0.8.6.2-1 - update to 0.8.6.2 - add rdkit support (and patch to fix it) - change define to global - fix hicolor requires and png files - fix shlib dep - remove outdated autoconf macro * Fri Oct 14 2016 Tim Fenn - 0.8.6.1-3 - remove unecessary rhel only macros - put doc in noarch * Fri Oct 07 2016 Tim Fenn - 0.8.6.1-2 - include description of patches - python-devel to python2-devel BR - remove python-sitelib macro (use system defined version) * Fri Aug 26 2016 Tim Fenn - 0.8.6.1-1 - update to 0.8.6.1 * Sat Jul 30 2016 Tim Fenn - 0.8.5-1 - update to 0.8.5 * Thu Apr 07 2016 Tim Fenn - 0.8.3-1 - Update to 0.8.3 * Mon Feb 22 2016 Orion Poplawski - 0.8.2-3 - Rebuild for gsl 2.1 * Wed Feb 03 2016 Fedora Release Engineering - 0.8.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Sep 7 2015 Tim Fenn - 0.8.2-1 - update to 0.8.2 - add patch for coot-utils * Sun Jun 28 2015 Tim Fenn - 0.8.1-3 - fix to appdata.xml - add all icon pixmaps, edit desktop file to match * Wed Jun 17 2015 Fedora Release Engineering - 0.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jan 31 2015 Tim Fenn - 0.8.1-1 - update to 0.8.1 - update URL - no sxml support in guile 1.8 (remove AM_GUILE_LIB check) - add gtk update icon cache scriptlets - add appdata xml file and additional app-data-validate scripts * Sat Aug 16 2014 Fedora Release Engineering - 0.7.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.7.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Dec 27 2013 Tim Fenn - 0.7.2-1 - update to 0.7.2 - update upstream URLs, no longer using vcs * Sun Aug 11 2013 Tim Fenn - 0.7-5.20120929svn4458 - add ghostscript to buildrequires * Fri Aug 09 2013 Tim Fenn - 0.7-4.20120929svn4458 - use xz instead of gz (BZ 982385) - update for soname bump in deps (BZ 989141) - use guile1.8-compat, add guile requires * Sat Aug 03 2013 Fedora Release Engineering - 0.7-3.20120929svn4458 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 13 2013 Fedora Release Engineering - 0.7-2.20120929svn4458 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Sep 29 2012 Tim Fenn - 0.7-1.20120929svn4458 - update to 0.7 * Wed Jul 18 2012 Fedora Release Engineering - 0.6.2-14.20110715svn3566 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Tue Feb 28 2012 Fedora Release Engineering - 0.6.2-13.20110715svn3566 - Rebuilt for c++ ABI breakage * Sat Jan 14 2012 Tim Fenn - 0.6.2-12.20110715svn3566 - patches to fix unistd.h issue and compilation errors * Thu Jan 12 2012 Fedora Release Engineering - 0.6.2-11.20110715svn3566 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sat Dec 10 2011 Tim Fenn - 0.6.2-10.20110715svn3566 - patch for new libpng * Tue Dec 06 2011 Adam Jackson - 0.6.2-9.20110715svn3566 - Rebuild for new libpng * Fri Jul 15 2011 Tim Fenn - 0.6.2-8.20110715svn3566 - update to SVN 3566 (0.6.2 final) * Tue Apr 26 2011 Tim Fenn - 0.6.2-7.20110421svn3461 - add reference structures source file * Tue Apr 26 2011 Tim Fenn - 0.6.2-6.20110421svn3461 - add missing source * Thu Apr 21 2011 Tim Fenn - 0.6.2-5.20110421svn3461 - update to SVN 3461 - fix missing Requires: guile-lib * Tue Mar 29 2011 Tim Fenn - 0.6.2-4.20110328svn3442 - update to SVN 3442 (should remove guile-gtk broken dependencies) * Fri Feb 25 2011 Tim Fenn - 0.6.2-3.20110225svn3399 - update to SVN 3399 * Tue Feb 08 2011 Fedora Release Engineering - 0.6.2-2.20101012svn3213 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Oct 12 2010 Tim Fenn - 0.6.2-1.20101012svn3213 - update to 0.6.2 * Thu Aug 05 2010 Tim Fenn - 0.6.1-3.20100127svn2740 - fix file attr - add comment to make check error * Tue Jul 20 2010 Tim Fenn - 0.6.1-2.20100127svn2740 - move some documentation to subpackage - add check section * Wed Jan 27 2010 Tim Fenn - 0.6.1-1.20100127svn2740 - update to SVN 2740, 0.6.1 release - add curl buildrequires * Thu Dec 03 2009 Tim Fenn - 0.6-6.20091203svn2545 - update to SVN 2545, 0.6 release * Mon Nov 30 2009 Tim Fenn - 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 - 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 - 0.6-3.20091005svn2400 - update to SVN 2400 * Wed Sep 23 2009 Tim Fenn - 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 - 0.6-1.20090920svn2334 - update to 0.6 - get source from VCS system * Wed Mar 25 2009 Tim Fenn - 0.5.2-3 - fix summary - add additional licensing information - split guile-extras into original tarballs * Sat Mar 14 2009 Tim Fenn - 0.5.2-2 - fix for desktop-file-install - gcc 4.4 patch * Mon Dec 15 2008 Tim Fenn - 0.5.2-1 - update to 0.5.2 * Thu Nov 27 2008 Tim Fenn - 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 - 0.5-2 - enable guile - include extra guile modules * Mon Nov 17 2008 Tim Fenn - 0.5-1 - initial build