# make an common out-of-source build %define common_build \ rm -rf common; \ mkdir common; \ cd common; \ %cmake "../fdistdump-0.4.1-source"; \ make %{?_smp_mflags} ; \ cd .. # make an out-of-source build specific for the MPI environment %define mpi_build \ rm -rf "$MPI_COMPILER"; \ mkdir "$MPI_COMPILER"; \ cd "$MPI_COMPILER"; \ %cmake -D CMAKE_INSTALL_PREFIX:PATH="$MPI_HOME" \\\ -D CMAKE_INSTALL_BINDIR:PATH="$MPI_BIN" \\\ -D CMAKE_INSTALL_MANDIR:PATH="$MPI_MAN" \\\ -D EXECUTABLE_SUFFIX="$MPI_SUFFIX" \\\ "../fdistdump-0.4.1-source"; \ make %{?_smp_mflags} ; \ cd .. %define cmake_install_file cmake_install.cmake # preamble ##################################################################### # shared Name: fdistdump Version: 0.5.0 Release: 1%{?dist} Summary: A tool to query IP flow records on a distributed system License: GPLv3+ URL: https://github.com/CESNET/fdistdump Source0: %{url}/releases/download/v%{version}/fdistdump-0.4.1-source.tar.xz %description fdistdump is a fast, scalable and distributed tool to query Internet Protocol flow files. The master/slave communication model allows it to run jobs on unlimited number of nodes, including a single local node. Among other features, fdistdump allows you to list, sort and aggregate records with the possibility to apply powerful record filter. # preamble for the common subpackage %package common Summary: A tool to query IP flow records on a distributed system, common files BuildArch: noarch %description common fdistdump is a fast, scalable and distributed tool to query Internet Protocol flow files. The master/slave communication model allows it to run jobs on unlimited number of nodes, including a single local node. Among other features, fdistdump allows you to list, sort and aggregate records with the possibility to apply powerful record filter. This package contains common, compiler independent files. # preamble for the Open MPI subpackage %package openmpi Summary: fdistdump compiled against Open MPI BuildRequires: gcc cmake3 make BuildRequires: libnf-devel BuildRequires: openmpi-devel BuildRequires: bloom_filter_indexes # require explicitly to guarantee the pickup of the right runtime Requires: openmpi Requires: %{name}-common = %{version}-%{release} %description openmpi fdistdump is a fast, scalable and distributed tool to query Internet Protocol flow files. The master/slave communication model allows it to run jobs on unlimited number of nodes, including a single local node. Among other features, fdistdump allows you to list, sort and aggregate records with the possibility to apply powerful record filter. This package is compiled against Open MPI. # preamble for the MPICH subpackage %package mpich Summary: fdistdump compiled against MPICH BuildRequires: gcc cmake3 make BuildRequires: libnf-devel BuildRequires: mpich-devel BuildRequires: bloom_filter_indexes # require explicitly to guarantee the pickup of the right runtime Requires: mpich Requires: %{name}-common = %{version}-%{release} %description mpich fdistdump is a fast, scalable and distributed tool to query Internet Protocol flow files. The master/slave communication model allows it to run jobs on unlimited number of nodes, including a single local node. Among other features, fdistdump allows you to list, sort and aggregate records with the possibility to apply powerful record filter. This package is compiled against MPICH. # shared prep section ########################################################## %prep # setup macro is used to unpack the original sources %setup -q -n "fdistdump-0.4.1-source" # shared build section ######################################################### %build cd .. # step out of the source tree %{_openmpi_load} # Configure for the common subpackage (only because of man pages). This has to # be inside MPI environment, otherwise CMake would fail. Then build for the Open # MPI subpackage. %common_build %mpi_build %{_openmpi_unload} %{_mpich_load} # Build for the MPICH subpackage. %mpi_build %{_mpich_unload} # shared install section ####################################################### %install cd .. # step out of the source tree # install files for the common subpackage -- only man-pages CMake component DESTDIR="%{buildroot}" cmake -D COMPONENT:STRING=man-pages \ -P "common/%{cmake_install_file}" # install files for the Open MPI subpackage -- only executables CMake component %{_openmpi_load} DESTDIR="%{buildroot}" cmake -D COMPONENT:STRING=executables \ -P "$MPI_COMPILER/%{cmake_install_file}" %{_openmpi_unload} # install files for the MPICH subpackage -- only executables CMake component %{_mpich_load} DESTDIR="%{buildroot}" cmake -D COMPONENT:STRING=executables \ -P "$MPI_COMPILER/%{cmake_install_file}" %{_mpich_unload} # files section ################################################################ %files common %doc LICENSE README.md %{_mandir}/man1/%{name}.1.gz %files openmpi %{_libdir}/openmpi/bin/%{name}_openmpi %files mpich %{_libdir}/mpich/bin/%{name}_mpich # changelog section ############################################################ %changelog * Sun Jan 21 2018 Jan Wrona 0.2.2-1 - Fix missing build dependencies: gcc autoconf automake libtool make. - Add new build dependency: bloom_filter_indexes. Support for Bloom filter base indexes has been integrated into fdistdump using bloom-filter-index library (https://github.com/CESNET/bloom-filter-index). * Thu Sep 1 2016 Jan Wrona 0.1.0-2 - Changed install paths, because MPI implementation specific files MUST be installed in the directories used by the used MPI compiler. * Tue Aug 30 2016 Jan Wrona 0.1.0-1 - First vesrion of the specfile.