File NetworkManager-openvpn.spec of Package NetworkManager-openvpn

#
# spec file for package NetworkManager-openvpn
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


Name:           NetworkManager-openvpn
Summary:        NetworkManager VPN support for OpenVPN
License:        GPL-2.0+
Group:          Productivity/Networking/System
Version:        1.2.6
Release:        0
Url:            http://www.gnome.org/projects/NetworkManager
Source0:        http://download.gnome.org/sources/NetworkManager-openvpn/1.2/%{name}-%{version}.tar.xz
BuildRequires:  intltool
%if !0%{?is_opensuse}
BuildRequires:  translation-update-upstream
%endif
BuildRequires:  pkgconfig(NetworkManager) >= 1.2.0
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libnm) >= 1.2.0
BuildRequires:  pkgconfig(libnm-glib) >= 1.2.0
BuildRequires:  pkgconfig(libnm-glib-vpn) >= 1.2.0
BuildRequires:  pkgconfig(libnm-gtk) >= 1.2.0
BuildRequires:  pkgconfig(libnm-util) >= 1.2.0
BuildRequires:  pkgconfig(libnma) >= 1.2.0
BuildRequires:  pkgconfig(libsecret-1) >= 0.18
Recommends:     %{name}-frontend
Requires:       NetworkManager >= 1.2.0
Requires:       openvpn
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x

%description
NetworkManager-openvpn provides VPN support to NetworkManager for
OpenVPN.

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

%description gnome
NetworkManager-openvpn provides VPN support to NetworkManager for
OpenVPN.

%lang_package
%prep
%setup -q
%if !0%{?is_opensuse}
translation-update-upstream
%endif

%build
%configure\
	--disable-static
%__make %{?_smp_mflags}

%install
%makeinstall
%find_lang %{name} %{?no_lang_C}
find %{buildroot}%{_libdir} -name '*.la' -delete -print

%clean
rm -rf $RPM_BUILD_ROOT

%pre
getent group  nm-openvpn >/dev/null || groupadd -r nm-openvpn
getent passwd nm-openvpn >/dev/null || useradd  -r -g nm-openvpn \
                                                    -d %{_localstatedir}/lib/openvpn \
                                                    -s /sbin/nologin \
                                                    -c "NetworkManager user for OpenVPN" \
                                                    nm-openvpn
exit 0

%post gnome
%icon_theme_cache_post

%postun gnome
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%doc README
%{_libdir}/NetworkManager/libnm-vpn-plugin-openvpn.so
%{_libdir}/NetworkManager/libnm-vpn-plugin-openvpn-editor.so
%{_libexecdir}/nm-openvpn-service
%{_libexecdir}/nm-openvpn-service-openvpn-helper
%dir %{_libexecdir}/NetworkManager
%dir %{_libexecdir}/NetworkManager/VPN
%{_libexecdir}/NetworkManager/VPN/nm-openvpn-service.name
%{_sysconfdir}/NetworkManager/VPN/nm-openvpn-service.name
%{_sysconfdir}/dbus-1/system.d/nm-openvpn-service.conf

%files gnome
%defattr(-,root,root,-)
%{_datadir}/appdata/network-manager-openvpn.metainfo.xml
%{_datadir}/gnome-vpn-properties/
%{_libdir}/NetworkManager/libnm-openvpn-properties.so*
%{_libexecdir}/nm-openvpn-auth-dialog

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by