File NetworkManager-pptp.spec of Package NetworkManager-pptp

#
# spec file for package NetworkManager-pptp (Version 0.7.0.r4274)
#
# Copyright (c) 2008 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 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.7.0.r4274
Release:        2
License:        GPL v2 or later
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
#Patch1:         nm-pptp-properties.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       pptp %{name}-frontend = %{version}
Requires:       NetworkManager >= 0.7.0.r4274

%description
NetworkManager-pptp provides VPN support to NetworkManager for PPTP.



Authors:
--------
    Antony Mee <eemynotna@gmail.com>
    Tim Niemueller <tim@niemueller.de>
    Dan Williams <dcbw@redhat.com>

%package gnome
License:        GPL v2 or later
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.



Authors:
--------
    Antony Mee <eemynotna@gmail.com>
    Tim Niemueller <tim@niemueller.de>
    Dan Williams <dcbw@redhat.com>

%prep
%setup -q -n %{name}-0.7.0
%patch0 -p1
#%patch1 -p1
cp -a %{S:1} nm-pptp-settings.png

%build
intltoolize --copy --force
autoreconf -f -i
%configure\
	--disable-static \
	--with-pppd-plugin-dir=%{pppd_plugin_dir}
make %{?jobs:-j%jobs}

%install
%makeinstall
%find_lang %{name}
# No headers, no development files:
rm $RPM_BUILD_ROOT%{_libdir}/NetworkManager/*.la
# 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/
cp nm-pptp-settings.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
%suse_update_desktop_file nm-pptp GNOME Network Monitor Applet

%clean
rm -rf $RPM_BUILD_ROOT

%post gnome -p /sbin/ldconfig

%postun gnome -p /sbin/ldconfig

%files -f %{name}.lang
%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,-)
%{_datadir}/applications/nm-pptp.desktop
%{_datadir}/gnome-vpn-properties
%{_datadir}/icons/hicolor/*/*/*.png
%{_libexecdir}/nm-pptp-auth-dialog
%{_libdir}/NetworkManager/libnm-pptp-properties.so*

%changelog
* Tue Nov 25 2008 bili@suse.de
- Fix dependencies(bnc#448119)
* Fri Nov 07 2008 bili@suse.de
- Update to r4274 from SVN.
* Sat Oct 25 2008 bili@suse.de
- Update to r4211 from SVN.
* Fri Sep 26 2008 ro@suse.de
- do not require exact release
* Wed Sep 17 2008 bili@suse.de
-  Update to r4060 from SVN.
* Fri May 16 2008 bili@suse.de
- Initial checkin, version in svn is 3842.(bnc#221466)
openSUSE Build Service is sponsored by