File qcoan.spec of Package qcoan

#
# spec file for package qcoan
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2014 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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:           qcoan
Version:        2.0
Release:        1
Summary:        Automaton and Turing Machine Simulator 
License:        C-FSL-v1.1
Group:          Development/Tools/Other
URL:            https://www.elstel.org/coan/index.html.en
Source0:        https://www.elstel.org/coan/coan-v%{version}.tar.bz2
BuildRequires:  gcc-c++
%if %{defined suse_version}
BuildRequires:  libqt5-qtbase-common-devel
%endif
%if %{defined fedora}
BuildRequires:  qt5-devel
%endif
%if %{defined centos_version}
BuildRequires: qt5-qtbase-devel
%endif
%if %{defined mageia}
BuildRequires: libqt5core-devel
%endif
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Svg)

%description
qCoAn allows you to edit automata and turing machines in their graphical representation. qCoAn can simulate finite automata, pushdown automata, Turing machines and machine schemata for both types of automata: deterministic and non-deterministic. The machines are abbreviated as follows: FA, NFA, DFA, PDA, NPDA, TM, NDTM, MS.

%prep
%setup -T -b 0 -n coan-%{version}

%build
%if ! %{defined mageia}
qmake-qt5 qcoan.pro
%else
qmake qcoan.pro
%endif
make %{_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/apps/16x16
install --mode=0755 build-qt/qcoan %{buildroot}%{_bindir}/qcoan
install --mode=0644 qcoan.desktop %{buildroot}%{_datadir}/applications/qcoan.desktop
install --mode=0644 images/coan-ico.png %{buildroot}%{_datadir}/icons/hicolor/apps/16x16/coan-ico.png
mkdir -p %{buildroot}%{_docdir}/%{name}/examples
install --mode=0644 Test2.atm %{buildroot}%{_docdir}/%{name}/examples/Test2.atm

%files
%defattr(-,root,root)
%doc html/QuickHelp.html
%docdir %{_docdir}/%{name}/examples
%{_docdir}/%{name}/examples/
%{_docdir}/%{name}/examples/Test2.atm
%license C-FSL-v1.1.txt
%{_bindir}/qcoan
%{_datadir}/applications/qcoan.desktop
%{_datadir}/icons/*


%changelog

openSUSE Build Service is sponsored by