File minicom.spec of Package minicom.4628

# spec file for package minicom
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

# This is just so SLE-12 and Leap 42 can share the package, Leap ended up
# with a separate lang package
%define separate_lang (0%{?is_opensuse})

Name:           minicom
Version:        2.7
Release:        0
Summary:        A Terminal Program
License:        GPL-2.0+
Group:          Hardware/Modem
Patch0:         minicom-2.2-defaults.diff
Patch2:         03norzsz.diff
Patch4:         minicom-2.3-no-build-date.patch
Patch5:         minicom-2.4-norootsetup.diff
# PATCH-FIX-UPSTREAM increase permitted length of serial device (bnc#707860)
Patch6:         minicom-2.5-serial_device_path_length.patch
Patch7:         fix-upstream-CVE-2017-7467.patch
BuildRequires:  ckermit
BuildRequires:  gettext-devel
BuildRequires:  lockdev-devel
BuildRequires:  ncurses-devel
BuildRequires:  pkg-config
Requires:       ckermit
Requires:       rzsz
%if %{separate_lang}
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A terminal program similar to Telix(tm) (a program for calling other
computers via modem) under MS-DOS.

If you want to access your modem with minicom, you have to be a member
of the uucp group.

%if %{separate_lang}

%setup -q
%patch2 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

export CFLAGS="%{optflags} $(ncursesw6-config --cflags)"
export LDFLAGS="$(ncursesw6-config --libs)"
%configure \
    --disable-rpath \
    --enable-music \
    --enable-dfl-baud=57600 \
    --enable-dfl-port=/dev/modem \
    --enable-socket \
make %{?_smp_mflags}

make check %{?_smp_mflags}

make DESTDIR=%{buildroot} install %{?_smp_mflags}
%find_lang %{name}

%if %{separate_lang}
%files -f %{name}.lang
%attr(0755,root,root) %{_bindir}/ascii-xfr
%attr(0755,root,uucp) %{_bindir}/minicom
%attr(0755,root,root) %{_bindir}/runscript
%attr(0755,root,root) %{_bindir}/xminicom

%if %{separate_lang}
%files lang -f %{name}.lang

openSUSE Build Service is sponsored by