File NetworkManager-vpnc.spec of Package NetworkManager-vpnc

#
# spec file for package NetworkManager-vpnc
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#

# norootforbuild


Name:           NetworkManager-vpnc
Summary:        NetworkManager VPN Support for vpnc
Version:        0.9.0
Release:        1
# FIXME .desktop icon is currently disabled (on purpose) in the NM tarballs. They will re-appear later on (when nmce supports --import)
License:        GPLv2+
Group:          Productivity/Networking/System
Url:            http://people.redhat.com/dcbw/NetworkManager/
Source0:        http://download.gnome.org/sources/NetworkManager-vpnc/0.9/%{name}-%{version}.tar.bz2
Source1:        NetworkManager-vpnc-nm-vpnc.png
Patch0:         nm-vpnc-desktop.patch
BuildRequires:  intltool
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(NetworkManager)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(libnm-glib)
BuildRequires:  pkgconfig(libnm-util)
BuildRequires:  pkgconfig(gnome-keyring-1)
BuildRequires:  pkgconfig(gtk+-3.0)
Requires:       vpnc %{name}-frontend
Requires:       NetworkManager >= 0.8.995
Requires:       gnome-keyring
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x

%description
NetworkManager-vpnc provides VPN support to NetworkManager for vpnc.

%package gnome
License:        GPLv2+
Summary:        NetworkManager VPN Support for vpnc
Group:          Productivity/Networking/System
Provides:       %{name}-frontend
Requires:       %{name} = %{version}-%{release}
Requires:       NetworkManager-gnome

%description gnome
NetworkManager-vpnc provides VPN support to NetworkManager for vpnc.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
cp -a %{S:1} nm-vpnc-settings.png

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

%install
%makeinstall
%find_lang %{name} %{?no_lang_C}
find %{buildroot}%{_libdir} -name '*.la' -delete -print
# FIXME: There is no MIME type definition for application/x-openvpn-settings in %{_datadir}/mime/packages.
# Without it, MIME icon has no effect.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes
mv $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/gnome-mime-application-x-cisco-vpn-settings.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes/
cp nm-vpnc-settings.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
# FIXME .desktop icon is currently disabled (on purpose) in the NM tarballs. They will re-appear later on (when nmce supports --import)
# %%suse_update_desktop_file nm-vpnc GNOME Network Monitor Applet
%suse_update_desktop_file nm-vpnc-auth-dialog

%clean
rm -rf $RPM_BUILD_ROOT

%post gnome
%icon_theme_cache_post

%postun gnome
%icon_theme_cache_post

%files
%defattr(-,root,root,0755)
%doc README
%{_libexecdir}/nm-vpnc-service
%{_libexecdir}/nm-vpnc-service-vpnc-helper
%config %{_sysconfdir}/NetworkManager/VPN/nm-vpnc-service.name
%config %{_sysconfdir}/dbus-1/system.d/nm-vpnc-service.conf

%files gnome
%defattr(-,root,root,0755)
# FIXME .desktop icons are currently disabled (on purpose) in the NM tarballs. They will re-appear later on (when nmce supports --import)
#%{_datadir}/applications/nm-vpnc.desktop
%{_datadir}/applications/nm-vpnc-auth-dialog.desktop
# FIXME: Owned also by NetworkManager-openvpn. Probably move to NetworkManager-gnome:
%{_datadir}/gnome-vpn-properties/
%{_datadir}/icons/hicolor/*/*/*.png
%{_libdir}/NetworkManager/libnm-vpnc-properties.so*
%{_libexecdir}/nm-vpnc-auth-dialog

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by