File NetworkManager.spec of Package NetworkManager.import5373

#
# spec file for package NetworkManager
#
# 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/
#



Name:           NetworkManager
Url:            http://www.gnome.org/projects/NetworkManager/
Version:        0.8.2
Release:        15.<RELEASE28>
License:        GPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  dbus-1-devel dbus-1-glib-devel gtk-doc intltool iptables libgcrypt-devel libgudev-1_0-devel libiw-devel libnl-devel libtool libuuid-devel mozilla-nss-devel polkit-devel ppp-devel translation-update-upstream wireless-tools
Group:          Productivity/Networking/System
Summary:        Network Link Manager and User Applications
Source0:        NetworkManager-%{version}.tar.bz2
Source1:        nfs
Source2:        nm-system-settings.conf
# bnc#476502, add a general frontend dbus configuration for 
# nm-applet, cnetworkmanager, knetworkmanager, bili@novell.com
Source3:        NetworkManager-frontend.conf
Source99:       NetworkManager-rpmlintrc
# PATCH-FIX-UPSTREAM nm-64bit-timestamp.diff -- Taken from git
Patch0:         nm-64bit-timestamp.diff
# PATCH-FIX-UPSTREAM nm-nis-domain.diff -- Taken from git
Patch1:         nm-nis-domain.diff
# PATCH-FIX_USPTREAM nm-crash-lack-ipv4.patch jeffm@suse.de -- Taken from git
Patch2:         nm-crash-lack-ipv4.patch
# PATCH-FIX-UPSTREAM nm-ignore-temp-files.patch bgo#602868 bnc#668183 bjorn.lie@gmail.com -- Silence on warning for non-existing temp files. Taken from git 		
Patch3:         nm-ignore-temp-files.patch
# PATCH-FIX-UPSTREAM nm-stop-touching-hosts.patch bnc#667265 binli@opensuse.org -- Stop touching /etc/hosts. Taken from git 		
Patch4:         nm-stop-touching-hosts.patch
# PATCH-FIX-UPSTREAM nm-destory-crash.patch bnc#673627 binli@opensuse.org -- Fix crash when NM exit.
Patch5:         nm-destory-crash.patch
# PATCH-FIX-UPSTREAM nm-suppress-user-proxy-error-msg.patch bnc#687001 binli@opensuse.org -- Suppress the user_proxy_init() errors.
Patch6:         nm-suppress-user-proxy-error-msg.patch
# PATCH-FIX-UPSTREAM nm-dismiss-keyfile-spam.patch bnc#681072 binli@opensuse.org -- Dismiss the keyfile's spam log.
Patch7:         nm-dismiss-keyfile-spam.patch
# PATCH-FIX-UPSTREAM NetworkManager-dhcp-hostname-true.patch bnc#557720 binli@opensuse.org -- Set the dhcp-hostname to true.
Patch8:         %{name}-dhcp-hostname-true.patch
# PATCH-FIX-UPSTREAM nm-settings-subject-match.patch bnc#574266 glin@suse.com -- Add subject to nm-settings-80211x
Patch9:         nm-settings-subject-match.patch
# PATCH-FIX-UPSTREAM nm-probe-ca-cert.patch bnc#574266 glin@suse.com -- Probe the RADIUS server certificate
Patch10:        nm-probe-ca-cert.patch
# PATCH-FIX-UPSTREAM nm-check-for-shared-wifi-authorization.patch bnc#702016 glin@suse.com -- Check whether the shared wifi is authorized or not
Patch11:        nm-check-for-shared-wifi-authorization.patch
Requires:       %{name}-glib = %{version}
Requires:       dhcp-client
Requires:       iproute2
Requires:       iputils
Requires:       libnl >= 1.1
Requires:       mozilla-nss
Requires:       ppp
Requires:       sysconfig >= 0.71.1
Requires:       wpa_supplicant >= 0.6.4
Provides:       dhcdbd = 1.14
Obsoletes:      dhcdbd < 1.14
Recommends:     dnsmasq
Recommends:     iptables
Recommends:     NetworkManager-client
Recommends:     org.freedesktop.ModemManager
Recommends:     %{name}-lang

%description
NetworkManager attempts to keep an active network connection available
at all times.  The point of NetworkManager is to make networking
configuration and setup as painless and automatic as possible.	If
using DHCP, NetworkManager is intended to replace default routes,
obtain IP addresses from a DHCP server, and change name servers
whenever it sees fit.

%package devel
License:        GPLv2+
Summary:        Libraries and headers for adding NetworkManager support to applications
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{name}-glib = %{version}
Requires:       dbus-1 >= %( echo `rpm -q --queryformat '%{VERSION}' dbus-1`)
Requires:       dbus-1-glib >= %( echo `rpm -q --queryformat '%{VERSION}' dbus-1-glib`)
Requires:       dbus-1-devel
Requires:       glib2-devel
Requires:       dbus-1-glib-devel
Requires:       libgcrypt-devel
Requires:       libgpg-error-devel

%description devel
This package contains various headers accessing some NetworkManager
functionality from applications.

%package glib
License:        GPLv2+
Summary:        Libraries for adding NetworkManager support to applications that use glib
Group:          Development/Libraries/GNOME

%description glib
This package contains the libraries that make it easier to use some
Network Manager functionality from applications that use glib.

%package doc
License:        GPLv2+
Summary:        Network Link Manager and User Applications
Group:          Productivity/Networking/System

%description doc
NetworkManager attempts to keep an active network connection available
at all times.  The point of NetworkManager is to make networking
configuration and setup as painless and automatic as possible.	If
using DHCP, NetworkManager is intended to replace default routes,
obtain IP addresses from a DHCP server, and change name servers
whenever it sees fit.

%lang_package
%prep
%setup -n %{name}-%{version} -q
%patch0
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
translation-update-upstream

%build
autoreconf	# needed for Patch3 to properly expand.
pppddir=`ls -1d /usr/%_lib/pppd/2*`
test -n "$pppddir" || exit 1
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure\
    --libexecdir=%{_prefix}/lib/NetworkManager\
    --disable-static\
    --with-crypto=nss \
    --with-distro=suse\
    --with-docs\
    --enable-more-warnings=no \
    --with-pppd-plugin-dir=$pppddir \
    --with-dhclient=/sbin/dhclient
%__make %{?_smp_flags}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/VPN
./libtool --mode=install install -m 755 test/nm-online $RPM_BUILD_ROOT%{_bindir}/
mkdir -p $RPM_BUILD_ROOT/var/log/
touch $RPM_BUILD_ROOT/var/log/NetworkManager
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/system-connections
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/

%clean
rm -rf "$RPM_BUILD_ROOT"

%post
/sbin/ldconfig

%postun -p /sbin/ldconfig

%post glib -p /sbin/ldconfig

%postun glib -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS AUTHORS README CONTRIBUTING TODO
%{_bindir}/nm-tool
%{_bindir}/nm-online
%{_bindir}/nmcli
%{_mandir}/man5/NetworkManager.conf.5*
%{_mandir}/man5/nm-system-settings.conf.5*
%dir %{_prefix}/%_lib/pppd/2.4.5
%{_prefix}/%_lib/pppd/2.4.5/nm-pppd-plugin.*
%{_datadir}/NetworkManager
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
%{_datadir}/polkit-1/actions/org.freedesktop.NetworkManager.policy
%{_datadir}/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy
 %attr(0700,root,root) %{_localstatedir}/run/NetworkManager
%doc %{_mandir}/man1/*.*
%doc %{_mandir}/man8/*.*
# On 64-bit biarch systems, the libraries go to /usr/lib64/NetworkManager,
# and libexec-y things remain in /usr/lib/NetworkManager.
# Whereas on single-arch or 32-bit biarch, everything goes into
# /usr/lib/NetworkManager.
%ifarch x86_64 ppc64 s390x sparc64
%{_libdir}/NetworkManager
%endif
%{_prefix}/lib/NetworkManager
%{_sbindir}/*
%{_sysconfdir}/dbus-1/system.d/NetworkManager.conf
%{_sysconfdir}/dbus-1/system.d/nm-dhcp-client.conf
%{_sysconfdir}/dbus-1/system.d/nm-dispatcher.conf
%{_sysconfdir}/dbus-1/system.d/nm-avahi-autoipd.conf
%dir %{_sysconfdir}/NetworkManager
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
%dir %{_sysconfdir}/NetworkManager/system-connections
%{_sysconfdir}/NetworkManager/nm-system-settings.conf
%{_sysconfdir}/dbus-1/system.d/NetworkManager-frontend.conf
%attr(0755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/nfs
%dir /lib/udev
%dir /lib/udev/rules.d
/lib/udev/rules.d/77-nm-olpc-mesh.rules
%ghost %config(noreplace) /var/log/NetworkManager

%files devel
%defattr(-,root,root)
%{_includedir}/NetworkManager
%{_includedir}/libnm-glib
%{_libdir}/libnm-util.so
%{_libdir}/libnm-glib.so
%{_libdir}/libnm-glib-vpn.so
%{_libdir}/pkgconfig/NetworkManager.pc
%{_libdir}/pkgconfig/libnm-util.pc
%{_libdir}/pkgconfig/libnm-glib.pc
%{_libdir}/pkgconfig/libnm-glib-vpn.pc

%files glib
%defattr(-,root,root)
%{_libdir}/libnm-util.so.*
%{_libdir}/libnm-glib.so.*
%{_libdir}/libnm-glib-vpn.so.*

%files doc
%defattr(-,root,root)
%dir %{_datadir}/gtk-doc/html/libnm-glib
%{_datadir}/gtk-doc/html/libnm-glib/*
%dir %{_datadir}/gtk-doc/html/libnm-util
%{_datadir}/gtk-doc/html/libnm-util/*

%files lang -f %{name}.lang

%changelog