File kde3-kvpnc.spec of Package kde3-kvpnc

#
# spec file for package kde3-kvpnc (Version 0.9.0)
#
# 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:           kde3-kvpnc
BuildRequires:  kdelibs3-devel
%if %suse_version < 1010 || %suse_version > 1140
BuildRequires:  libgcrypt-devel
%endif
License:        GPL-2.0-or-later
Group:          Productivity/Networking/System
Summary:        GUI Front-End for openswan and vpnc
Version:        0.9.0
Release:        1
Url:            http://home.gna.org/kvpnc/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define tar_name kvpnc
Source0:        %tar_name-%{version}.tar.bz2
Patch0:         fix-build.diff
Patch1:         kvpnc-deprecate-update-desktop-files.patch
Provides:       kvpnc = 0.9.0
Obsoletes:      kvpnc <= 0.9.0

%description
The application can create configurations for various kinds of VPN
connections. You should also install the vpnc or openswan package.

%prep
%setup -q -n %tar_name-%version
%patch -P 0
sed -i 1i\ '#include <unistd.h>' src/generateopenvpnkeydialog.cpp
sed -i 1i\ '#include <unistd.h>' src/networkinterface.cpp
sed -i 1i\ '#include <unistd.h>' src/toolinfo.cpp
. /etc/opt/kde3/common_options
update_admin --no-unsermake
%patch -P 1 -p1

%build
. /etc/opt/kde3/common_options
./configure $configkde --disable-final
make -j1

%install
. /etc/opt/kde3/common_options
iconv -f iso8859-1 -t utf-8 src/kvpnc.desktop > w && mv w src/kvpnc.desktop
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/kvpnc
# move to the right place
mkdir -p %{buildroot}/opt/kde3/share/applications/kde
mv %{buildroot}/opt/kde3/share/applnk/kvpnc.desktop %{buildroot}/opt/kde3/share/applications/kde/kvpnc.desktop
kde_post_install
%find_lang %tar_name

%files -f %tar_name.lang
%defattr(-,root,root)
%dir /opt/kde3/share/icons/hicolor/16x16
%dir /opt/kde3/share/icons/hicolor/16x16/apps
%dir /opt/kde3/share/icons/hicolor/32x32
%dir /opt/kde3/share/icons/hicolor/32x32/apps
/opt/kde3/bin/kvpnc
/opt/kde3/share/appl*/*/kvpnc.desktop
/opt/kde3/share/apps/kvpnc
/opt/kde3/share/icons/*/*/*/kvpnc*.png

%changelog
openSUSE Build Service is sponsored by