%global commit 960c6cf557a0 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global checkout 20160526hg%{shortcommit} Name: fast-downward Version: 0 Release: 8.%{checkout}%{?dist} Summary: A classical PDDL planning system based on heuristic search License: GPLv3+ URL: http://www.fast-downward.org/ Source0: http://hg.fast-downward.org/archive/%{commit}.tar.gz#/fast-downward-%{shortcommit}.tar.gz Patch0: fast-downward.cmake-relwithdebinfo.patch Patch1: fast-downward.allow-pyc-files.patch Patch2: fast-downward.cmake-shared-libs.patch Patch3: fast-downward.gcc6.patch Patch4: fast-downward.build64.patch Patch5: fast-downward.build32.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: help2man BuildRequires: python3-devel Provides: python3-fast-downward %description Fast Downward is a classical planning system based on heuristic search. It can deal with general deterministic planning problems encoded in the propositional fragment of PDDL2.2, including advanced features like ADL conditions and effects and derived predicates (axioms). %if 0%{?__isa_bits} == 64 %global buildtype relwithdebinfo64 %else %global buildtype relwithdebinfo32 %endif %prep %setup -n Fast-Downward-%{commit} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %if 0%{?__isa_bits} == 64 %patch4 -p1 %else %patch5 -p1 %endif for file in $(grep -rIl "#! */usr/bin/env *python" .); do sed -i.orig "1s:#\! */usr/bin/env *python:#\!%{__python3}:" $file touch -r $file.orig $file rm $file.orig done %build ./build.py %{_smp_mflags} %{buildtype} # create a symlink to get the name right for help2man ln -s fast-downward.py fast-downward help2man --version-string="%{version}-%{release}" -N -o fast-downward.man.1 ./fast-downward %install mkdir -p %{buildroot}/%{python3_sitelib}/fastdownward cp -a driver %{buildroot}/%{python3_sitelib}/fastdownward/ # The script fast-downward.py expects driver files in the local folder, thus # install it into the module and symlink it to /usr/bin. install -p fast-downward.py %{buildroot}/%{python3_sitelib}/fastdownward/ mkdir -p %{buildroot}/%{_bindir} ln -s %{python3_sitelib}/fastdownward/fast-downward.py %{buildroot}/%{_bindir}/fast-downward mkdir -p %{buildroot}/%{_libdir}/fast-downward/bin cp -a builds/%{buildtype}/bin/{downward,preprocess} %{buildroot}/%{_libdir}/fast-downward/bin mkdir -p %{buildroot}/%{python3_sitelib}/fastdownward/builds/ ln -s %{_libdir}/fast-downward %{buildroot}/%{python3_sitelib}/fastdownward/builds/%{buildtype} # Again, the translate/translate.py is referenced locally and expected to be in # the same directory as the executables. We install it into python's sitelib, # but symlink it to the libdir. cp -a builds/%{buildtype}/bin/translate %{buildroot}/%{python3_sitelib}/fastdownward ln -s %{python3_sitelib}/fastdownward/translate %{buildroot}/%{_libdir}/fast-downward/bin install -p -D -m644 fast-downward.man.1 %{buildroot}/%{_mandir}/man1/fast-downward.1 %files %doc README.md %{python3_sitelib}/fastdownward %{_bindir}/fast-downward %{_libdir}/fast-downward %{_mandir}/man1/fast-downward.1.gz %changelog * Fri Jan 18 2019 Till Hofmann - 0-8.20160526hg960c6cf - Add missing BR: gcc-c++ * Thu Nov 17 2016 Till Hofmann - 0-7.20160526hg960c6cf - Fix symlink in %{python3_sitelib} to build directory * Wed Nov 16 2016 Till Hofmann - 0-6.20160526hg960c6cf - Fix debug option patch * Wed Nov 16 2016 Till Hofmann - 0-5.20160526hg960c6cf - symlink bin directory into python site-packages directory so the driver finds the binaries * Wed Nov 16 2016 Till Hofmann - 0-4.20160526hg960c6cf - Remove debug option, which is not available because we don't build the debug target * Wed Nov 16 2016 Till Hofmann - 0-3.20160526hg960c6cf - Add patch to start the correct build type from the driver * Thu May 26 2016 Till Hofmann - 0-2.20160526hg960c6cf - Update to commit 960c6cf * Thu Feb 25 2016 Till Hofmann - 0-1.20160224hg101a688 - Initial package