Package accepted

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-10-22 22:40:38 +02:00
parent fd0f63ef9f
commit f6023037ee
4 changed files with 184 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/dolfin-2019.1.0.post0.tar.gz
/dolfin-2019.1.0.post0.tar.gz.asc

View File

@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFm3qPYBCADLVRsKIH2xwxzrRyax3SXsd3pcV1K0fAXC8C1P32wh5o8NLX80
QGNWKIln4kdrYtL5MHChZipNFmYCRT/vrFOaVftj/TM2QebOBwoGVIhQ2ueIQ9mO
GYTKKwNLPugUTf04l/+37B/WX/t8JsWfo1EVQ6FRjdY1P7iQpWDzhSMouKJE3+Xy
SH3Okh/OiumPSM/fNGLN6b/OE0K6BBH/RWWJVT/cbdSm3FrjYflTPPtP9yLWRj0o
TW81E7lYiKPL6pzi7kVtxicUu8MzOPpESBDty8M/xUmkdVzUU5E7NkRFnkCjhoJF
scLwdpdLRWaaLqAYp6W5puU/95X6Ddn9utLFABEBAAG0SkZFbmlDUyBQcm9qZWN0
IFN0ZWVyaW5nIENvdW5jaWwgPGZlbmljcy1zdGVlcmluZy1jb3VuY2lsQGdvb2ds
ZWdyb3Vwcy5jb20+iQE+BBMBAgAoBQJZt6j2AhsDBQkDwmcABgsJCAcDAgYVCAIJ
CgsEFgIDAQIeAQIXgAAKCRC+0GEG3SK6szJ2B/9Zxea+l83Q9il/Z21VFZRWBETx
y189cqlOeVsMPJm/KpSDtjAC1iJWi9ogN2zyZej/m8Su+eAJ7QUHgz8StJUXOO6J
Y7OZ/v/SlJbf6ADcT9p981H9gFzufzU6NqjynFQRLjaApToZtSiAM4lsL21zk8Z+
B7SMSouKGGn/ODWuZeVA1QT6pJTAX31lT1oFbdPRHc4j41qU+ogyjcwPh2dYFOBc
ZEp5XyU+7ZCGK1A2p/0i6orXBUVKw/1zm9jCSwxgd5FpEvnB6BXvHV3lXdiqxJuN
Xr+3OBoq0k5vQPkBKTDhvCf3UFEODJ98mFAKD1zezLTex+3yzOSmXpoLXTEcuQEN
BFm3qPYBCACqGoAPALpcUGwMgullThXVEEUJ2WY7wXoNvX6qAZ0gyf/vkJnuNyQH
Qd6ZJJVLzP28vHGLkftqcyjVLlu6Ok7dTrFobXTEeR9GO2cqxccfVTUUbURQ65kl
QhL6g+w/MeLtvMdAomClODvz7jRGAZUsezQcWrFnT8R25S94O4kPfky7fP+gNcwM
YT4SyScFvFTFGy6PSjnGIzGQUchBQRam56K8tP2FrCOMIWryeXjTcyixJPFfzmc3
N3ifnTQPtu7VQtUkmq6L6dBtf8cCvi42Cnscq6HmcgGqkZTm81af/FPOI5SoY+gZ
8Oiur4KnOhkHJDg0+MzM8sKYVHmUf84hABEBAAGJASUEGAECAA8FAlm3qPYCGwwF
CQPCZwAACgkQvtBhBt0iurPTYwgAyIKm3ySpEcJlIVquiq9Xx52yCtdaNfIkwLOo
GwoTF4uIxGLWHNZn7nMn3HNMLxohNpuVmbDW++bK1ui0eqzeAFkvjCULwFU5RRsW
lVgN5xxtmjuSsVZBuE4KZMQevv6HcUUe6nEMERHUnujJdJKydXPOrWC3/+B/NYUR
8KoUFPL1+4si2wIdFOQZ8194Ic/JA4/FBhwMKG/rNNvRU2MNAzWzZCP7V0FeRLUs
fIsWs/CSG7SnPKs3o45D9tSiKVcBUilTbJYwmUnmTCwYD71OWa3q8t1ZmvHY/XMk
BSGJR5XcHeZKG/tjm5aSVp8yLsP4xEiRZcAFapBcMnaSDOTWOA==
=vY8l
-----END PGP PUBLIC KEY BLOCK-----

150
dolfin.spec Normal file
View File

@ -0,0 +1,150 @@
Name: dolfin
Version: 2019.1.0.post0
%global fenics_version 2019.1
Release: 1%{?dist}
Summary: FEniCS computational backend and problem solving environment
License: LGPLv3+
URL: https://fenicsproject.org/
Source0: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{version}.tar.gz
Source1: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{version}.tar.gz.asc
Source2: 3083BE4C722232E28AD0828CBED06106DD22BAB3.gpg
BuildRequires: gcc-c++
BuildRequires: gnupg2
BuildRequires: cmake
BuildRequires: boost-devel
BuildRequires: eigen3-devel
BuildRequires: petsc-devel
BuildRequires: sundials-devel
BuildRequires: scotch-devel
# ptscotch-mpich-devel?
BuildRequires: blas-devel
# openblas-devel?
BuildRequires: hdf5-devel
# hdf5-mpich-devel?
BuildRequires: zlib-devel
BuildRequires: python3-devel
BuildRequires: pybind11-devel
BuildRequires: python3dist(numpy)
BuildRequires: python3dist(fenics-ffc) >= %{fenics_version}
BuildRequires: python3dist(fenics-ufl) >= %{fenics_version}
BuildRequires: python3dist(fenics-dijitso) >= %{fenics_version}
# go cmake go
BuildRequires: chrpath
# check-buildroot flags the python .so, but it should be fine after rpath removal.
# It seems that the original path to the library is stored in some comment.
%global __arch_install_post /usr/lib/rpm/check-buildroot || :
#BuildRequires: mpich-devel
#BuildRequires: openmpi-devel
%global _description %{expand:
DOLFIN is the computational backend of FEniCS and implements the
FEniCS Problem Solving Environment.}
%description %_description
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}%{?isa}
%description devel
%{summary}.
%package -n python3-dolfin
Summary: Python wrapper for the FEniCS dolfin environment
# The jit compiles and links to the dolfin library
Requires: %{name}-devel = %{version}-%{release}%{?isa}
%{?python_provide:%python_provide python3-dolfin}
%description -n python3-dolfin %_description
%package doc
Summary: Documentation and demos for %{name}
BuildArch: noarch
%description doc
%{summary}.
%prep
%{?gpgverify:%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'}
%autosetup -n dolfin-%{version}
# Let's just specify an exact version of a dependency, yay!
sed -i -r 's|pybind11==|pybind11>=|' python/setup.py
cat >>python/CMakeLists.txt <<EOF
set(CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -I$PWD")
EOF
%build
# %%_mpich_load
mkdir -p build && cd build
CFLAGS=-Wno-unused-variable %cmake .. -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=off
%make_build
# "temporary install" so the python build can find the stuff it needs
%make_install
cd ../python
VERBOSE=1 CMAKE_PREFIX_PATH=%{buildroot}/usr/share/dolfin/cmake CMAKE_SKIP_INSTALL_RPATH=yes CMAKE_SKIP_RPATH=yes %py3_build
%install
cd build
%make_install
cd ../python
VERBOSE=1 CMAKE_PREFIX_PATH=%{buildroot}/usr/share/dolfin/cmake CMAKE_SKIP_INSTALL_RPATH=yes CMAKE_SKIP_RPATH=yes %py3_install
sed -r -i '1 {s|#!/usr/bin/env python.*|#!%{__python3}|}' \
%{buildroot}/usr/bin/dolfin-order \
%{buildroot}/usr/bin/dolfin-plot \
%{buildroot}/usr/bin/dolfin-convert
# this file is just pointless
rm %{buildroot}/usr/share/dolfin/dolfin.conf
# there's even an option for this, except it seems to have no effect
chrpath %{buildroot}%{python3_sitearch}/dolfin/*.so
chrpath --delete %{buildroot}%{python3_sitearch}/dolfin/*.so
%check
ctest -V %{?_smp_mflags}
%files
%license COPYING COPYING.LESSER AUTHORS
%doc README.rst
/usr/bin/dolfin-version
/usr/bin/fenics-version
%{_libdir}/libdolfin.so.%{fenics_version}
%{_libdir}/libdolfin.so.%{fenics_version}.*
%dir /usr/share/dolfin
%dir /usr/share/dolfin/data
/usr/share/dolfin/data/README
%files devel
/usr/include/dolfin.h
/usr/include/dolfin/
%{_libdir}/libdolfin.so
%{_libdir}/pkgconfig/dolfin.pc
/usr/share/dolfin/cmake/
%files doc
/usr/bin/dolfin-get-demos
/usr/share/dolfin/demo/
%files -n python3-dolfin
/usr/bin/dolfin-convert
/usr/bin/dolfin-order
/usr/bin/dolfin-plot
%{python3_sitearch}/dolfin/
%{python3_sitearch}/dolfin_utils/
%{python3_sitearch}/fenics/
%{python3_sitearch}/fenics_dolfin-%{fenics_version}*-py%{python3_version}.egg-info/
%changelog
* Wed Oct 9 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2019.1.0-1
- Initial packaging

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (dolfin-2019.1.0.post0.tar.gz) = 0677245d2537d6e3b25bc8c47700a4d10690f35a49a544456456601505703e0b21ddec510f456146edef3d0beea366092a54a23ac29bd165c9c97cede6d6ca10
SHA512 (dolfin-2019.1.0.post0.tar.gz.asc) = 3ba38f0d2cc965d2aa2676eb80f14901fe0491efbaffa612cf15e16ef312329d8aa6c078e5d4515cc6876bf11f044be87cb80ddcaf19d0a6600f0de2cb1c6eac