File NetworkManager-sstp.spec of Package NetworkManager-sstp

#
# spec file for package NetworkManager-sstp
#
# Copyright (c) 2020 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/
#


%global pppd_plugin_dir %(rpm -ql ppp | grep -m1 pppd/[0-9]*)
Name:           NetworkManager-sstp
Version:        1.2.6
Release:        0
Summary:        NetworkManager VPN support for SSTP
License:        GPL-2.0-or-later
Group:          Productivity/Networking/System
URL:            http://sstp-client.sourceforge.net
Source:         https://sourceforge.net/project/sstp-client/network-manager-sstp/%{version}/%{name}-%{version}.tar.bz2
Source1:        %{name}.rpmlintrc
BuildRequires:  intltool
BuildRequires:  pkgconfig
BuildRequires:  ppp-devel
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.32
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.4
BuildRequires:  pkgconfig(libnm) >= 1.2.0
BuildRequires:  pkgconfig(libnma) >= 1.2.0
BuildRequires:  pkgconfig(libsecret-1) >= 0.18
BuildRequires:  pkgconfig(sstp-client-1.0)
Requires:       NetworkManager >= 1.2.0
Requires:       sstp-client
%requires_eq    ppp
Recommends:     %{name}-lang

%description
NetworkManager-sstp provides VPN support to NetworkManager for SSTP.

%lang_package

%package gnome
Summary:        NetworkManager VPN support for SSTP
Group:          Productivity/Networking/System
Requires:       %{name} = %{version}-%{release}
Provides:       %{name}-frontend = %{version}

%description gnome
NetworkManager-sstp provides VPN support to NetworkManager for SSTP.

%prep
%autosetup

%build
%configure \
    --disable-static \
    --with-pppd-plugin-dir=%{pppd_plugin_dir} \
    --without-libnm-glib
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%find_lang %{name} %{?no_lang_C}

%files
%doc AUTHORS ChangeLog NEWS README TODO
%config %{_sysconfdir}/dbus-1/system.d/nm-sstp-service.conf
%if 0%{?suse_version} >= 1550
%{_vpnservicedir}/nm-sstp-service.name
%else
%dir %{_libexecdir}/NetworkManager
%dir %{_libexecdir}/NetworkManager/VPN
%{_libexecdir}/NetworkManager/VPN/nm-sstp-service.name
%endif
%{_libexecdir}/nm-sstp-service
%{_libdir}/NetworkManager/libnm-vpn-plugin-sstp.so
%{pppd_plugin_dir}/nm-sstp-pppd-plugin.so
%license COPYING

%files gnome
%{_datadir}/appdata/network-manager-sstp.metainfo.xml
%{_libdir}/NetworkManager/libnm-vpn-plugin-sstp-editor.so
%{_libexecdir}/nm-sstp-auth-dialog

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by