File libccp4.spec of Package ccp4
#
# spec file for package libccp4
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global sover 0
Name: libccp4
Version: 8.0.0
Release: 0
Summary: Software for Macromolecular X-Ray Crystallography
License: GPL-3.0
Group: Productivity/Scientific/Chemistry
URL: https://www.ccp4.ac.uk
Source0: https://ftp.ccp4.ac.uk/opensource/libccp4-%{version}.tar.gz
Patch0: 0002-fix-ftbfs-with-gcc-10.patch
Patch1: 1-libccp4-data.patch
BuildRequires: gcc-fortran
BuildRequires: automake >= 1.11.2
BuildRequires: libtool
BuildRequires: gcc-c++
BuildRequires: pkgconfig(mmdb2)
BuildRequires: pkg-config
%description
CCP4 exists to produce and support a world-leading, integrated suite
of programs that allows researchers to determine macromolecular
structures by X-ray crystallography, and other biophysical techniques.
CCP4 aims to develop and support the development of cutting edge
approaches to experimental determination and analysis of protein
structure, and integrate these approaches into the suite. CCP4 is a
community based resource that supports the widest possible researcher
community, embracing academic, not for profit, and for profit
research. CCP4 aims to play a key role in the education and training
of scientists in experimental structural biology. It encourages the
wide dissemination of new ideas, techniques and practice.
This package contains a GPL-licensed subset of the full CCP4 suite.
%package devel
Group: Development/Libraries/C and C++
Summary: Software for Macromolecular X-Ray Crystallography
Requires: libccp4-%{sover} = %{version}
%description devel
CCP4 exists to produce and support a world-leading, integrated suite
of programs that allows researchers to determine macromolecular
structures by X-ray crystallography, and other biophysical techniques.
This package contains the development headers and auxiliary files.
%package data
Group: Development/Libraries/C and C++
Summary: Software for Macromolecular X-Ray Crystallography
BuildArch: noarch
%description data
CCP4 exists to produce and support a world-leading, integrated suite
of programs that allows researchers to determine macromolecular
structures by X-ray crystallography, and other biophysical techniques.
This package contains required data files.
%package -n libccp4-%{sover}
Group: System/Libraries
Summary: Software for Macromolecular X-Ray Crystallography
Requires: libccp4-data >= %{version}
Conflicts: libccp4
%description -n libccp4-%{sover}
CCP4 exists to produce and support a world-leading, integrated suite
of programs that allows researchers to determine macromolecular
structures by X-ray crystallography, and other biophysical techniques.
This package contains the shared libraries.
%prep
%setup -q -n libccp4-%{version}
%autopatch -p1
%build
%if 0%{?suse_version} >= 1550
# Workaround bad code, GCC 10, GCC14 complain
# Fix build w/ gcc-15, which defaults to C23
export CFLAGS="%{optflags} -Wno-error=incompatible-pointer-types -std=gnu17"
export FCFLAGS="%{optflags} -fallow-argument-mismatch"
export FFLAGS="%{optflags} -fallow-argument-mismatch"
%endif
autoreconf -f -i
automake
%configure --enable-shared --disable-static
%make_build
%install
%make_install
rm %{buildroot}%{_libdir}/*.la
# Fix mmdb version
sed -i -e '/Requires.private/ s/mmdb/mmdb2/' %{buildroot}%{_libdir}/pkgconfig/ccp4*
sed -i -e '/Requires.private/ { s/mmdb22/mmdb2/ ; s/libccp4c/ccp4c/ }' %{buildroot}%{_libdir}/pkgconfig/ccp4*
%post -n libccp4-%{sover} -p /sbin/ldconfig
%postun -n libccp4-%{sover} -p /sbin/ldconfig
%files devel
%{_includedir}/ccp4
%{_libdir}/libccp4c.so
%{_libdir}/libccp4f.so
%{_libdir}/pkgconfig/ccp4*
%files -n libccp4-%{sover}
%{_libdir}/libccp4c.so.*
%{_libdir}/libccp4f.so.*
%files data
%{_datadir}/ccp4
%changelog