Name:		openconnect
Version:	4.06
Release:        1%{?_dist_release}
Summary:	Open client for Cisco AnyConnect VPN
Summary(ja):	Cisco AnyConnect VPM 用のオープンクライアント

Group:		Applications/Internet
License:	LGPLv2+
URL:		http://git.infradead.org/users/dwmw2/openconnect.git
Source0:	ftp://ftp.infradead.org/pub/openconnect/openconnect-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:	openssl-devel
BuildRequires:	libxml2-devel
BuildRequires:	gtk2-devel
BuildRequires:	dbus-devel
BuildRequires:	libproxy-devel
BuildRequires:	p11-kit-devel
BuildRequires:	vpnc
Requires:	vpnc

%description
This package provides a client for Cisco's "AnyConnect" VPN, which uses
HTTPS and DTLS protocols.

%package devel
Summary: Development package for OpenConnect VPN authentication tools
Group: Applications/Internet
Provides: openconnect-devel-static = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: libproxy-devel
Requires: zlib-devel
Requires: openssl-devel
Requires: libxml2-devel

%description devel
This package provides the core HTTP and authentication support from
the OpenConnect VPN client, to be used by GUI authentication dialogs
for NetworkManager etc.

%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags} openconnect


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
install -m0644 openconnect.8 $RPM_BUILD_ROOT/%{_mandir}/man8

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%{_sbindir}/%{name}
%{_libdir}/libopenconnect.so.*
%{_docdir}/%{name}
%{_mandir}/man8/*
%doc TODO COPYING.LGPL

%files devel
%defattr(-,root,root,-)
%{_libdir}/libopenconnect.so
/usr/include/openconnect.h
%{_libdir}/pkgconfig/%{name}.pc


%changelog
* Fri Aug 17 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.06-1
- new upstream release
- add BuildRequires: p11-kit-devel, vpnc

* Wed May 04 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.02-1
- new upstream release

* Sun Mar 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.26-1
- new upstream release

* Tue May 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 	1.10-1
- initial build for Vine Linux

* Wed Apr  1 2009 David Woodhouse <David.Woodhouse@intel.com> - 1.10-1
- Update to 1.10.

* Wed Mar 18 2009 David Woodhouse <David.Woodhouse@intel.com> - 1.00-1
- Update to 1.00.

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 0.99-2
- rebuild with new openssl

* Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.99-1
- Update to 0.99.
- Fix BuildRequires

* Mon Nov 24 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.98-1
- Update to 0.98.

* Thu Nov 13 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.97-1
- Update to 0.97. Add man page, validate server certs.

* Tue Oct 28 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.96-1
- Update to 0.96. Handle split-includes, MacOS port, more capable SecurID.

* Thu Oct 09 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.95-1
- Update to 0.95. A few bug fixes.

* Thu Oct 09 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.94-3
- Include COPYING.LGPL file

* Mon Oct 07 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.94-2
- Fix auth-dialog crash

* Mon Oct 06 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.94-1
- Take cookie on stdin so it's not visible in ps.
- Support running 'script' and passing traffic to it via a socket
- Fix abort when fetching XML config fails

* Sun Oct 05 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.93-1
- Work around unexpected disconnection (probably OpenSSL bug)
- Handle host list and report errors in NM auth dialog

* Sun Oct 05 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.92-1
- Rename to 'openconnect'
- Include NetworkManager auth helper

* Thu Oct 02 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.91-1
- Update to 0.91

* Thu Oct 02 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.90-1
- First package
