%global pkgname automata Name: gap-pkg-%{pkgname} Version: 1.13 Release: 0.3%{?dist} Summary: Finite automata algorithms License: GPLv2+ URL: http://cmup.fc.up.pt/cmup/mdelgado/%{pkgname}/ Source0: http://cmup.fc.up.pt/cmup/mdelgado/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: noarch # Fedora-specific patch: use xdg-open in preference to specific viewers Patch0: %{name}-viewer.patch BuildRequires: gap-devel BuildRequires: GAPDoc-latex Requires: gap-core Requires: graphviz Requires: xdg-utils %description This package contains algorithms for working with finite automata in GAP. It can do the following: - compute a rational expression for the language recognized by a finite automaton; - compute an automaton for the language given by a rational expression; - minimalize a finite automaton; - visualize automata. %prep %setup -q -n %{pkgname} %patch0 fixtimestamp() { touch -r $1.orig $1 rm -f $1.orig } # Fix character encoding mv PackageInfo.g PackageInfo.g.orig iconv -f ISO8859-1 -t UTF-8 PackageInfo.g.orig > PackageInfo.g fixtimestamp PackageInfo.g # Fix end of line encoding sed -i.orig 's/\r//' README fixtimestamp README # Remove obsolete copies of GAPDoc files rm -f doc/gapdoc.* %build # Link to main GAP documentation ln -s %{_gap_dir}/doc ../../doc mkdir ../pkg ln -s ../%{pkgname} ../pkg/%{pkgname} gap -l "$PWD/..;%{_gap_dir}" << EOF LoadPackage("automata"); MakeGAPDocDoc( "doc", "AutMan.xml", [], "Automata", "../../..", "MathJax" ); CopyHTMLStyleFiles( "doc" ); GAPDocManualLab( "automata" ); EOF rm -fr ../../doc ../pkg %install mkdir -p %{buildroot}%{_gap_dir}/pkg cp -a ../%{pkgname} %{buildroot}%{_gap_dir}/pkg/%{pkgname} rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/{CHANGES,EXAMPLES,LICENSE,README} rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/doc/*.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex,toc} %files %doc CHANGES EXAMPLES README %license LICENSE %docdir %{_gap_dir}/pkg/%{pkgname}/doc %docdir %{_gap_dir}/pkg/%{pkgname}/htm %{_gap_dir}/pkg/%{pkgname}/ %changelog * Fri Feb 10 2017 Fedora Release Engineering - 1.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Aug 31 2016 Jerry James - 1.13-2 - Fix xdg-utils requirement * Sat Aug 27 2016 Jerry James - 1.13-1 - Initial RPM