File NetworkManager-pptp.spec of Package NetworkManager-pptp
#
# spec file for package NetworkManager-pptp
#
# 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-pptp
BuildRequires: NetworkManager-devel NetworkManager-gnome grep intltool libglade2-devel libgnomeui-devel libgudev-1_0-devel perl-XML-Parser ppp-devel update-desktop-files
ExcludeArch: s390 s390x
%define pppd_plugin_dir %(rpm -ql ppp | grep -m1 pppd/[0-9]*)
Summary: NetworkManager VPN support for PPTP
Version: 0.8.2
Release: 2
# FIXME .desktop icons are 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://www.gnome.org/projects/NetworkManager
Source0: %{name}-%{version}.tar.bz2
Source1: gnome-mime-application-x-pptp-settings.png
Patch0: nm-pptp-desktop.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: pptp %{name}-frontend = %{version}
Requires: NetworkManager >= 0.7.0.r4274
Recommends: %{name}-lang
%description
NetworkManager-pptp provides VPN support to NetworkManager for PPTP.
%package gnome
License: GPLv2+
Summary: NetworkManager VPN support for PPTP
Group: Productivity/Networking/System
Provides: %{name}-frontend = %{version}
Requires: %{name} = %{version}-%{release}
Requires: NetworkManager-gnome >= 0.5.1
%description gnome
NetworkManager-pptp provides VPN support to NetworkManager for PPTP.
%lang_package
%prep
%setup -n %{name}-%{version}
%patch0 -p1
cp -a %{S:1} nm-pptp-settings.png
%build
%configure\
--disable-static \
--with-pppd-plugin-dir=%{pppd_plugin_dir}
%__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-pptp-settings in /usr/share/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-pptp-settings.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes/
install -D nm-pptp-settings.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/nm-pptp-settings.png
# FIXME .desktop icons are currently disabled (on purpose) in the NM tarballs. They will re-appear later on (when nmce supports --import)
# %%suse_update_desktop_file nm-pptp GNOME Network Monitor Applet
%clean
rm -rf $RPM_BUILD_ROOT
%post gnome
%icon_theme_cache_post
%postun gnome
%icon_theme_cache_postun
%files
%defattr(-,root,root,-)
%doc README
%{_libexecdir}/nm-pptp-service
%dir %{_sysconfdir}/NetworkManager/VPN
%{_sysconfdir}/NetworkManager/VPN/nm-pptp-service.name
%{_sysconfdir}/dbus-1/system.d/nm-pptp-service.conf
%{pppd_plugin_dir}/nm-pptp-pppd-plugin.*
%files gnome
%defattr(-,root,root,-)
# 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-pptp.desktop
%{_datadir}/gnome-vpn-properties
%{_datadir}/icons/hicolor/*/*/*.png
%{_libexecdir}/nm-pptp-auth-dialog
%{_libdir}/NetworkManager/libnm-pptp-properties.so*
%files lang -f %{name}.lang
%changelog