File cwdaemon.spec of Package cwdaemon

#
# spec file for package cwdaemon
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

Name:           cwdaemon
Version:        0.13.0
Release:        0
License:        GPL-2.0
Group:          Productivity/Hamradio/Other
Summary:        Morse daemon for the parallel or serial port
Url:            https://github.com/acerion/cwdaemon
Source:         https://github.com/acerion/cwdaemon/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         no_example.diff
Patch1:         build_with_gcc7.diff
BuildRequires:  pkgconfig
BuildRequires:  unixcw-devel >= 3.3.1

%description
Cwdaemon is a small daemon which uses the pc parallel or serial port 
and a simple transistor switch to output morse code to a transmitter
from a text message sent to it via the udp internet protocol.

%package examples 
Summary:        Cwdaemon examples
Group:          Development/Libraries/Other
BuildArch:      noarch
Requires:       %{name} = %{version}

%description examples
In this package are three examples of how to interface cwdaemon.
You can treat them as hints about how to write an application interfacing
cwdaemon.

%prep
%setup -q
%patch -P 0 -p1
%if 0%{?suse_version} < 1600
%patch -P 1 -p1
%endif

%build
%configure
%make_build

%install
%make_install

%check

%files
%doc ChangeLog NEWS
%license COPYING
%{_sbindir}/cwdaemon
%{_mandir}/man8/cwdaemon.8.gz
%dir %{_datadir}/cwdaemon/
%{_datadir}/cwdaemon/*.jpg
%{_datadir}/cwdaemon/*.ps
%{_datadir}/cwdaemon/cwsetup.sh
%{_datadir}/cwdaemon/cwdaemon.png

%files examples
%{_datadir}/cwdaemon/Makefile.*
%{_datadir}/cwdaemon/example.*
%{_datadir}/cwdaemon/README

%changelog
openSUSE Build Service is sponsored by