File bsddialog.spec of Package bsddialog

#
# spec file for package bsddialog
#
# Copyright (c) 2025 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:           bsddialog
Version:        1.1
Release:        0
Summary:        TUI Dialogs and Widgets
License:        BSD-2-Clause
URL:            https://gitlab.com/alfix/bsddialog
Source0:        %{name}-%{version}.tar.gz
Patch0:         0001-Add-correct-include-path-for-wide-characters-NCurses.patch
Patch1:         0002-Add-missing-slider.c-to-GNUMakefile.patch
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  ncurses-devel

%description
This project provides bsddialog and libbsddialog, an utility and a
library to build scripts and tools with TUI dialogs and widgets.

%prep
%autosetup -p1

%build
make DISABLERPATH=1


%install

install -Dm0755 utility/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm0755 lib/lib%{name}.so %{buildroot}%{_libdir}/lib%{name}.so
install -Dm0644 utility/%{name}.1 %{buildroot}%{_mandir}/man1/bsddialog.1
strip %{buildroot}%{_bindir}/%{name}
strip %{buildroot}%{_libdir}/lib%{name}.so

cd %{buildroot}%{_libdir}/
ln -sf lib%{name}.so lib%{name}.so.%{version}


%files
%license LICENSE
%doc CHANGELOG README.md
%{_bindir}/%{name}
%{_libdir}/*.so*
%{_mandir}/man1/%{name}*.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by