File Genepop.spec of Package Genepop
#
# spec file for package Genepop
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: Genepop
Version: 4.5.1
Release: 0
Summary: Population Genetics Program
License: CECILL-2.0
Group: Productivity/Scientific/Other
Url: http://kimura.univ-montp2.fr/~rousset/Genepop.htm
Source: http://kimura.univ-montp2.fr/~rousset/GenepopV4.zip
Source1: Genepop.changes
BuildRequires: gcc-c++
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GENEPOP is a population genetics software package originally developed by
Michel Raymond (Raymond@isem.univ-montp2.fr) and Francois Rousset
(Rousset@isem.univ-montp2.fr), at the Laboratiore de Genetique et Environment,
Montpellier, France.
Raymond M. & Rousset F, 1995. GENEPOP (version 1.2): population genetics
software for exact tests and ecumenicism. J. Heredity, 86:248-249
Rousset, F., 2008. Genepop'007: a complete reimplementation of the Genepop
software for Windows and Linux. Mol. Ecol. Resources 8: 103-106.
%prep
%setup -q -c
unzip -d examples examples.zip
unzip -d src sources.zip
# fix builddate info
# Remove build time references so build-compare can do its work
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE1} '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{SOURCE1} '+%%b %%e %%Y')
sed -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" -i src/GenepopS.h
sed -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -i src/GenepopS.h
%build
export CXXFLAGS="%{optflags}"
cd src
g++ -DNO_MODULES -o Genepop GenepopS.cpp -O3
%install
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_datadir}/%{name}
install -m 755 src/Genepop %{buildroot}/%{_bindir}/Genepop
cp -r examples %{buildroot}/%{_datadir}/%{name}/
%files
%defattr(-,root,root)
%{_bindir}/Genepop
%{_datadir}/%{name}
%doc Genepop.pdf
%changelog