c76eaf1
%global forgeurl https://github.com/acerion/cwdaemon
c76eaf1
Version:  0.12.0
c76eaf1
%forgemeta
c76eaf1
c76eaf1
Name:           cwdaemon
9bc4ca1
Release:        %autorelease
c76eaf1
Summary:        Morse daemon for the parallel or serial port
c76eaf1
c76eaf1
License:        GPL-2.0-only
c76eaf1
URL:            http://cwdaemon.sourceforge.net
c76eaf1
Source0:        %{forgesource}
c76eaf1
Source1:        cwdaemon.sysconfig
c76eaf1
Source2:        cwdaemon.service
5dcaba4
Igor Gnatenko 590d52b
BuildRequires:  gcc
c76eaf1
BuildRequires:  perl-generators
c76eaf1
BuildRequires:  unixcw-devel
c76eaf1
BuildRequires:  systemd-rpm-macros
c76eaf1
BuildRequires:  make
c76eaf1
0a1cfea
Requires(post): systemd
0a1cfea
Requires(preun): systemd
0a1cfea
Requires(postun): systemd
5dcaba4
5dcaba4
%description
c76eaf1
cwdaemon is a small daemon which uses the pc parallel or serial port and a
c76eaf1
simple transistor switch to output morse code to a transmitter from a text
c76eaf1
message sent to it via udp port 6789. The program also uses the soundcard or PC
c76eaf1
speaker (console buzzer) to generate a sidetone.
5dcaba4
5dcaba4
%prep
c76eaf1
%forgeautosetup -p1
5dcaba4
5dcaba4
%build
5dcaba4
%configure
c76eaf1
%make_build
5dcaba4
5dcaba4
%install
c76eaf1
%make_install
c76eaf1
e314a95
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
e314a95
mkdir -p %{buildroot}%{_unitdir}
c76eaf1
install -pDm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/cwdaemon
c76eaf1
install -pDm644 %{SOURCE2} %{buildroot}%{_unitdir}/cwdaemon.service
c76eaf1
c76eaf1
mkdir -p %{buildroot}%{_bindir}
c76eaf1
mv %{buildroot}%{_sbindir}/%{name} %{buildroot}%{_bindir}/%{name}
5dcaba4
c76eaf1
%check
c76eaf1
make check
5dcaba4
5dcaba4
%post
0a1cfea
%systemd_post cwdaemon.service
5dcaba4
5dcaba4
%preun
0a1cfea
%systemd_preun cwdaemon.service
e314a95
5dcaba4
%postun
2bfa2fb
%systemd_postun_with_restart cwdaemon.service
e314a95
5dcaba4
%files
c76eaf1
%doc AUTHORS ChangeLog README TODO
c76eaf1
%license COPYING
c76eaf1
%{_bindir}/%{name}
e314a95
%{_unitdir}/cwdaemon.service
5dcaba4
%config(noreplace) %{_sysconfdir}/sysconfig/cwdaemon
5dcaba4
%{_mandir}/man8/%{name}.8.gz
c76eaf1
%{_datadir}/%{name}/
5dcaba4
5dcaba4
%changelog
9bc4ca1
%autochangelog