File knetworkmanager-kde3.spec of Package knetworkmanager-kde3

#
# spec file for package NetworkManager-kde (Version 0.7r848570.1)
#
# Copyright (c) 2009 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:           knetworkmanager-kde3
BuildRequires:  NetworkManager-devel dbusxml2qt3 kdelibs3-devel libdbus-1-qt3-0-devel libnl-devel 
BuildRequires:  hal-devel libuuid-devel update-desktop-files
%define appname knetworkmanager
ExcludeArch:    s390 s390x
%define prefix /opt/kde3
%define sysconfdir /etc
License:        GPL v2 or later
Group:          System/GUI/KDE
Version:        0.7_pre1168552
Release:        34
Summary:        KNetworkManager application for use with NetworkManager
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       NetworkManager >= 0.7
Provides:       NetworkManager-client NetworkManager-kde
Source0:        %{appname}-%{version}.tar.bz2
#Source0:        %{appname}-0.7r848570.tar.bz2
Source1:        knetworkmanager.default.sh
Source100:      knetworkmanager-kde3-rpmlintrc
#Patch3:         fix_build.patch
Patch4:         fix_lang.patch
#Patch5:         fix_vpn_api.patch
#Patch6:         fix_vpnc_openvpn.patch
#Patch7:         fix_uuid.patch
#Patch8:         fix_passwords_in_debug.diff
#Patch9:         fix_static_ip.patch
#Patch10:        fix_empty_eap_identity.patch
Patch11:        update_translations_de.patch
#Patch12:        fix_phase2_combo.patch
#Patch13:        fix_use_system_cert.patch
#Patch14:        fix_vpnc_properties.patch
#Patch15:        fix_use_system_cert2.patch
#Patch16:        fix_dbus_config.patch
Patch18:        network-byte-order.patch
Patch19:        libnm-glib.diff
Patch20:        knetworkmanager-0.7-uuid_fix.patch
Patch21:        knetworkmanager-0.7-no_blank_psk.patch
Patch22:        knetworkmanager-0.7-configure-check-for-nm.patch
Patch23:        config-fix.patch
Patch24:        nm-0_9-compatibility.patch
Patch25:	knetworkmanager-wpa_passphrase_lag.patch
Patch26:	knetworkmanager-0.7-dbus_access.patch

%description
System tray applet for controlling network
connections on systems that use the NetworkManager daemon.

%package devel
License:        GPL v2 or later
Summary:        KNetworkManager application for use with NetworkManager
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}-%{release}

%description devel
KNetworkManager is a system tray applet for controlling network
connections on systems that use the NetworkManager daemon.

This subpackage contains headers for building plugins for
KNetworkManager.

%package -n %{appname}-openvpn-kde3
License:        GPL v2 or later
Summary:        KNetworkManager application for use with NetworkManager
Group:          System/GUI/KDE
Provides:       NetworkManager-openvpn-frontend
Requires:       %{name} = %{version}-%{release}
Requires:       NetworkManager-openvpn

%description -n %{appname}-openvpn-kde3
KNetworkManager is a system tray applet for controlling network
connections on systems that use the NetworkManager daemon.

%package -n %{appname}-vpnc-kde3
License:        GPL v2 or later
Summary:        KNetworkManager application for use with NetworkManager
Group:          System/GUI/KDE
Provides:       NetworkManager-vpnc-frontend
Requires:       %{name} = %{version}-%{release}
Requires:       NetworkManager-vpnc

%description -n %{appname}-vpnc-kde3
KNetworkManager is a system tray applet for controlling network
connections on systems that use the NetworkManager daemon.

%prep
%setup -n %{appname} -q
#%patch0 -R -p0
#%patch1 -R -p0
#%patch2 -p0
pushd %{appname}-0.7
#%patch3 -p1
%patch26 -p2
%patch4 -p1
#%patch5 -p3
#%patch6 -p3
#%patch7 -p1
#%patch8 -p1
#%patch9 -p1
#%patch10 -p1
%patch11 -p1
#%patch12 -p1
#%patch13 -p1
#%patch14 -p1
#%patch15 -p1
#%patch16 -p1
%patch18 -p1
%if %suse_version >= 1130
%patch19 -p2
%endif
%patch20 -p2
%patch21 -p2
%patch22 -p2
%patch23 -p2
%if %suse_version > 1140
%patch24 -p2
cd src
#%patch25 -p3
cd ..
%endif
popd
sed -i 's|NetworkManager/||g' `find ./ -type f`
sed -i 's|NetworkManagerVPN.h|NetworkManager.h|g' `find ./ -type f`

%build
. /etc/opt/kde3/common_options
update_admin --no-unsermake
#export CXXFLAGS="$CXXFLAGS -Wl,--add-needed"

./configure $configkde --with-distro=suse --with-dbus-sys=%{_sysconfdir}/dbus-1/system.d --with-openvpn --with-vpnc --disable-final --with-extra-includes=/usr/include/libnm
make

%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
# fix this mess...
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/autostart/
install -m 755 -D %{SOURCE1} $RPM_BUILD_ROOT/opt/kde3/env/knetworkmanager.default.sh
mkdir -p $RPM_BUILD_ROOT/usr/share/kde4/env
ln -s /opt/kde3/env/knetworkmanager.default.sh $RPM_BUILD_ROOT/usr/share/kde4/env/knetworkmanager.default.sh
install %{appname}-0.7/src/%{appname}.desktop $RPM_BUILD_ROOT/opt/kde3/share/autostart/%{appname}-autostart.desktop
echo "OnlyShowIn=KDE;" >> $RPM_BUILD_ROOT/opt/kde3/share/autostart/%{appname}-autostart.desktop
%suse_update_desktop_file -r %appname Utility TrayIcon System Applet
%find_lang %{appname}
kde_post_install

%post
%{run_ldconfig} 

%postun
%{run_ldconfig} 

%files -f %{appname}.lang
%defattr(-,root,root)
# disable for now (we have no documentation)
# %doc /opt/kde3/share/doc/HTML/en/%{appname}
/opt/kde3/bin/*
/opt/kde3/%_lib/*
%exclude /opt/kde3/%_lib/kde3/*vpnc*
%exclude /opt/kde3/%_lib/kde3/*openvpn*
/opt/kde3/%_lib/kde3/*
%attr(0644,root,root) %{_sysconfdir}/dbus-1/system.d/%{appname}.conf
/opt/kde3/share/applications/kde/%{appname}.desktop
/opt/kde3/share/apps/%{appname}
/opt/kde3/share/autostart/%{appname}-autostart.desktop
/opt/kde3/share/icons/*/??x??/
/opt/kde3/env
/usr/share/kde4
/opt/kde3/share/servicetypes/%{appname}_plugin.desktop
/opt/kde3/share/servicetypes/%{appname}_vpnplugin.desktop

%dir /opt/kde3/share/locale/bs
%dir /opt/kde3/share/locale/bs/LC_MESSAGES
%dir /opt/kde3/share/locale/ka
%dir /opt/kde3/share/locale/ka/LC_MESSAGES
%dir /opt/kde3/share/locale/lo
%dir /opt/kde3/share/locale/lo/LC_MESSAGES
%dir /opt/kde3/share/locale/mk
%dir /opt/kde3/share/locale/mk/LC_MESSAGES
%dir /opt/kde3/share/locale/af
%dir /opt/kde3/share/locale/af/LC_MESSAGES
%dir /opt/kde3/share/locale/bn
%dir /opt/kde3/share/locale/bn/LC_MESSAGES
%dir /opt/kde3/share/locale/cy
%dir /opt/kde3/share/locale/cy/LC_MESSAGES
%dir /opt/kde3/share/locale/km
%dir /opt/kde3/share/locale/km/LC_MESSAGES
%dir /opt/kde3/share/locale/si
%dir /opt/kde3/share/locale/si/LC_MESSAGES
%dir /opt/kde3/share/locale/wa
%dir /opt/kde3/share/locale/wa/LC_MESSAGES
%dir /opt/kde3/share/locale/xh
%dir /opt/kde3/share/locale/xh/LC_MESSAGES
%dir /opt/kde3/share/locale/zu
%dir /opt/kde3/share/locale/zu/LC_MESSAGES

%files devel
%defattr(-,root,root)
/opt/kde3/include/%{appname}-plugin.h
/opt/kde3/include/%{appname}-vpnplugin.h

%files -n %{appname}-openvpn-kde3
%defattr(-,root,root)
/opt/kde3/%_lib/kde3/%{appname}_openvpn.*
/opt/kde3/share/services/%{appname}_openvpn.desktop

%files -n %{appname}-vpnc-kde3
%defattr(-,root,root)
/opt/kde3/%_lib/kde3/%{appname}_vpnc.*
/opt/kde3/share/services/%{appname}_vpnc.desktop
openSUSE Build Service is sponsored by