File lcdproc.spec of Package lcdproc

#
# spec file for package lcdproc
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2019-2020 Malcolm J Lewis <malcolmlewis@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 https://bugs.opensuse.org/
#


Name:           lcdproc
Version:        0.5.9+20211220.0e2ce9b
Release:        0
Summary:        Multi-platform LCD display driver
License:        GPL-2.0-only
Group:          System/Monitoring
URL:            https://lcdproc.org/
Source0:        %{name}-%{version}.tar.xz
Source1:        LCDd.service
Source2:        lcdproc.service
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libftdi)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(x11)
%{?systemd_requires}

%description
Open source software that displays real-time system information from your Linux/*BSD
box on a LCD. The server supports several serial and USB devices from Matrix Orbital
and CrystalFontz as well as some devices connected to the LPT port: HD44780, T6963,
SED1520 and SED1330. Various clients are available that display things like CPU load,
system load, memory usage, uptime, and a lot more.

%prep
%setup -q

%build
autoreconf -ifs
%configure --sysconfdir=%{_sysconfdir}/%{name} \
           --enable-drivers=all \
           --enable-testmenus \
           --enable-lcdproc-menus \
           --enable-stat-nfs \
           --enable-stat-smbfs \
           --enable-extra-charmaps \
           --with-lcdport=13666 \
           --with-pidfile-dir=/run
%make_build

%install
%make_install
install -Dm0644 %{SOURCE1} %{buildroot}%{_unitdir}/LCDd.service
install -Dm0644 %{SOURCE2} %{buildroot}%{_unitdir}/lcdproc.service
pushd %{buildroot}%{_sbindir}
ln -s service rcLCDd
ln -s service rclcdproc
popd

%pre
%service_add_pre LCDd.service lcdproc.service

%post
%service_add_post LCDd.service lcdproc.service

%preun
%service_del_preun LCDd.service lcdproc.service

%postun
%service_del_postun LCDd.service lcdproc.service

%files
%license COPYING
%doc BUGS ChangeLog.md CODE_OF_MERIT.md
%doc CREDITS.md README.md TODO
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/*.conf
%{_bindir}/fortune.pl
%{_bindir}/iosock.pl
%{_bindir}/lcdexec
%{_bindir}/lcdident.pl
%{_bindir}/lcdmetar.pl
%{_bindir}/lcdproc
%{_bindir}/lcdvc
%{_bindir}/tail.pl
%{_bindir}/x11amp.pl
%{_unitdir}/LCDd.service
%{_unitdir}/lcdproc.service
%{_libdir}/lcdproc/
%{_sbindir}/LCDd
%{_sbindir}/rcLCDd
%{_sbindir}/rclcdproc
%{_mandir}/man1/lcdexec.1%{?ext_man}
%{_mandir}/man1/lcdproc.1%{?ext_man}
%{_mandir}/man1/lcdvc.1%{?ext_man}
%{_mandir}/man5/lcdproc-config.5%{?ext_man}
%{_mandir}/man8/LCDd.8%{?ext_man}

%changelog
openSUSE Build Service is sponsored by