%define nm_version          1.0.8
%define dbus_version        1.4.14
%define gtk3_version        3.0.0
%define vpnc_version        0.4
%define shared_mime_version 0.16-3

%define svn_snapshot %{nil}

Summary:   NetworkManager VPN plugin for vpnc
Summary(ja): NetworkManager の vpnc 用 VPN プラグイン
Name:      NetworkManager-vpnc
Version:   1.0.8
Release:   1%{?_dist_release}
License:   GPLv2+
Group:     System Environment/Base
URL:       http://www.gnome.org/projects/NetworkManager/
Source:    %{name}-%{version}%{svn_snapshot}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: gtk3-devel             >= %{gtk3_version}
BuildRequires: dbus-devel             >= %{dbus_version}
BuildRequires: NetworkManager-devel   >= %{nm_version}
BuildRequires: NetworkManager-glib-devel >= %{nm_version}
BuildRequires: libnm-gtk-devel >= %{nm_version}
BuildRequires: GConf2-devel
BuildRequires: libgnome-keyring-devel
BuildRequires: libglade2-devel
BuildRequires: libsecret-devel
BuildRequires: intltool gettext

Requires: NetworkManager  
Requires: vpnc            
Requires: shared-mime-info
Requires: libgnome-keyring
Requires(post):   /sbin/ldconfig
Requires(postun): /sbin/ldconfig

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke


%description
This package contains software for integrating the vpnc VPN software
with NetworkManager and the GNOME desktop

%prep
%setup -q


%build
%configure --enable-more-warnings=yes
make %{?_smp_mflags}

%install

make install DESTDIR=$RPM_BUILD_ROOT

rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.la
rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.a

%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
/usr/bin/update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
      %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%postun
/sbin/ldconfig
/usr/bin/update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
      %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files -f %{name}.lang
%defattr(-, root, root)

%doc AUTHORS ChangeLog
%{_libdir}/NetworkManager/lib*.so*
%{_libexecdir}/nm-vpnc-auth-dialog
%{_sysconfdir}/dbus-1/system.d/nm-vpnc-service.conf
%{_sysconfdir}/NetworkManager/VPN/nm-vpnc-service.name
%{_libexecdir}/nm-vpnc-service
%{_libexecdir}/nm-vpnc-service-vpnc-helper
%{_datadir}/applications/nm-vpnc-auth-dialog.desktop
%{_datadir}/gnome-vpn-properties/vpnc/nm-vpnc-dialog.ui
%{_datadir}/icons/hicolor/48x48/apps/gnome-mime-application-x-cisco-vpn-settings.png
%dir %{_datadir}/gnome-vpn-properties/vpnc

%changelog
* Wed Nov 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1
- new upstream release

* Sun Apr 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.10.2-1
- new upstream release
- add BuildRequires: libnm-gtk-devel, libsecret-devel

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.8.2-2
- rebuild with VineSeed environment

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.8.2-1
- new upstream release

* Fri Aug 17 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.6.0-1
- new upstream release

* Wed Nov 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.2.0-1
- new upstream release

* Tue Aug 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.0-1
- new upstream release

* Thu Aug 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.999-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel

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

* Sat Jan 01 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.2-1
- new upstream release
- change BuildRequires: libgnome-keyring-devel instead of gnome-keyring-devel
- change Requires: libgnome-keyring instead of gnome-keyring

* Tue May 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8-1
- new upstream release

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

* Thu Mar  5 2009 Dan Williams <dcbw@redhat.com> 1:0.7.0.99-1
- Update to 0.7.1rc3

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.7.0.97-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Feb 19 2009 Dan Williams <dcbw@redhat.com> 1:0.7.0.97-1
- Update to 0.7.1rc1
- Handle import/export of "EnableNat", "DHGroup", "SaveUserPassword", and "EnableLocalLAN"

* Sat Jan  3 2009 Dan Williams <dcbw@redhat.com> 1:0.7.0-1
- Rebuild for updated NetworkManager
- Better handling of passwords that shouldn't be saved
- Fix some specfile issues (rh #477151)

* Fri Nov 21 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-0.11.svn4326
- Rebuild for updated NetworkManager

* Tue Nov 18 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-0.11.svn4296
- Rebuild for updated NetworkManager

* Mon Nov 17 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-0.11.svn4293
- Ensure errors are shown when connection fails (rh #331141)
- Fix failures to ask for passwords on connect (rh #429287)
- Fix routing when concentrator specifies routes (rh #449283)
- Pull in upstream support for tokens and not saving passwords

* Mon Oct 27 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-0.11.svn4229
- Rebuild for updated NetworkManager

* Tue Oct 14 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-11.svn4175
- Fix password issue with configurations that don't save the user password
	in the keyring (rh #466864)

* Sun Oct 12 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn4175
- Rebuild for updated NetworkManager
- Allow changing passwords from the connection editor

* Fri Aug 29 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn4024
- Fix regression where username radio buttons were mistakenly shown in the
	auth dialog
- Fix regression where the auth dialog would segfault when cancel was clicked

* Wed Aug 27 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn4022
- Rebuild for updated NetworkManager

* Mon Aug 11 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn3928
- Rebuild for updated NetworkManager

* Thu Jul 24 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn3846
- Rebuild for updated NetworkManager

* Fri Jul 18 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn3832
- Update for NM netmask -> prefix changes

* Wed Jul 02 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-10.svn3801
- Update for moving VPN editing into connection manager
- Add option to disable Dead Peer Detection
- Add option to select NAT Traversal mode

* Thu May 01 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-7.7.svn3627
- Update for compat with new NM bits

* Wed Apr 09 2008 Dan Williams <dcbw@redhat.com> 1:0.7.0-6.7.svn3549
- Update for compat with new NM bits

* Tue Mar 25 2008 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.6.7.svn3502
- Send suggested MTU to NetworkManager

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:0.7.0-0.7.7.svn3204
- Autorebuild for GCC 4.3

* Fri Jan  4 2008 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.6.7.svn3204
- Support new vpnc 0.4 Cisco UDP Encapsulation option
- Fix another crash in the properties applet
- Remove upstreamed pcfimport patch

* Mon Nov 26 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.6.3.svn3109
- Rebuild for updated NetworkManager

* Tue Nov 13 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.6.2.svn3083
- Rebuild for updated NetworkManager

* Sat Oct 27 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.4.svn3030
- Fix a crash when editing VPN properties a second time

* Tue Oct 23 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.3.svn3014
- Rebuild

* Wed Oct 17 2007 Bill Nottingham <notting@redhat.com> - 1:0.7.0-0.3.svn2970
- rebuild (#336261)

* Wed Oct 10 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.2.svn2970
- Fix default username

* Fri Sep 28 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.1.svn2914
- Fix .name file on 64-bit systems

* Fri Sep 28 2007 Jesse Keating <jkeating@redhat.com> - 1:0.7.0-0.2.svn2910
- BuildRequire NetworkManager-glib-devel

* Thu Sep 27 2007 Dan Williams <dcbw@redhat.com> - 1:0.7.0-0.1.svn2910
- New snapshot; ported to NM 0.7 API

* Fri Aug 17 2007 Denis Leroy <denis@poolshark.org> - 1:0.6.4-4
- Updated License tag
- Added patch to make properties multilib friendly (#243535)

* Thu Mar 22 2007 Denis Leroy <denis@poolshark.org> - 1:0.6.4-3
- Added patch to improve configuration GUI, add NAT traversal and single DES options

* Sun Feb 18 2007 Denis Leroy <denis@poolshark.org> - 1:0.6.4-2
- Readded NAT-keepalive support patch from SVN branch

* Wed Feb 14 2007 Denis Leroy <denis@poolshark.org> - 1:0.6.4-1
- Downgrading to 1:0.6.4 to keep par with core NM version

* Mon Dec  4 2006 Dan Williams <dcbw@redhat.com> - 0.7.0-0.cvs20061204
- Allow "NAT-Keepalive packet interval" config option

* Sat Oct 21 2006 Denis Leroy <denis@poolshark.org> - 0.7.0-0.cvs20060929.3
- Added patch to support saving group password only

* Thu Oct  5 2006 Denis Leroy <denis@poolshark.org> - 0.7.0-0.cvs20060929.2
- Leave .so link alone, needed by nm

* Fri Sep 29 2006 Denis Leroy <denis@poolshark.org> - 0.7.0-0.cvs20060929.1
- Update to CVS snapshot 060929
- Some rpmlint cleanups

* Fri Sep 29 2006 Denis Leroy <denis@poolshark.org> - 0.7.0-0.cvs20060529.4
- Added XML::Parser BR

* Fri Sep 29 2006 Denis Leroy <denis@poolshark.org> - 0.7.0-0.cvs20060529.3
- Added gettext BR

* Wed Sep 27 2006 Warren Togami <wtogami@redhat.com> - 0.7.0-0.cvs20060529.2
- rebuild for FC6

* Thu Jul 20 2006 Warren Togami <wtogami@redhat.com> - 0.7.0-0.cvs20060529.1
- rebuild for new dbus

* Mon May 29 2006 Dan Williams <dcbw@redhat.com> - 0.7.0-0.cvs20060529
- Gnome.org #336913: HIG tweaks for vpn properties pages

* Sun May 21 2006 Dan Williams <dcbw@redhat.com> 0.7.0-0.cvs20060521
- Update to CVS snapshot
- Honor user-specified rekeying intervals

* Mon May 15 2006 Dan Williams <dcbw@redhat.com> 0.6.2-1
- New release for NM 0.6.2 compat

* Fri Apr 21 2006 Dan Williams <dcbw@redhat.com> 0.6.0-3
- Add dist tag to RPM release

* Wed Apr 12 2006 Christopher Aillon <caillon@redhat.com> 0.6.0-2
- Rekey every 2 hours

* Tue Mar 14 2006 Dan Williams <dcbw@redhat.com> - 0.6.0-1
- Update to CVS snapshot of 0.6 for NM compatibility

* Fri Jan 27 2006 Dan Williams <dcbw@redhat.com> - 0.5.0-1
- CVS snapshot for compatibility new NetworkManager

* Tue Dec  6 2005 Jeremy Katz <katzj@redhat.com> - 0.3-3
- rebuild for new dbus

* Mon Oct 17 2005 Dan Williams <dcbw@redhat.com> 0.3-2
- Rebuild to test new Extras buildsystem

* Thu Aug 18 2005 David Zeuthen <davidz@redhat.com> 0.3-1
- New upstream release
- Bump some versions for deps

* Fri Jul  1 2005 David Zeuthen <davidz@redhat.com> 0.2-2
- Add missing changelog entry for last commit
- Temporarily BuildReq libpng-devel as it is not pulled in by gtk2-devel
  (should be fixed in Core shortly)
- Pull in latest D-BUS (which features automatic reloading of policy files)
  so users do not have to restart the messagebus after installing this package

* Thu Jun 30 2005 David Zeuthen <davidz@redhat.com> 0.2-1
- New upsteam version
- Add the new gnome-mime-application-x-cisco-vpn-settings.png icon and call
  gtk-update-icon-cache as appropriate

* Fri Jun 17 2005 David Zeuthen <davidz@redhat.com> 0.1-2.cvs20050617
- Add Prereq: /usr/bin/update-desktop-database
- Nuke .la and .a files
- Use find_lang macro to handle locale files properly
- Add Requires for suitable version of shared-mime-info since our desktop
  file depends on the application/x-cisco-vpn-settings MIME-type

* Fri Jun 17 2005 David Zeuthen <davidz@redhat.com> 0.1-1.cvs20050617
- Latest CVS snapshot

* Thu Jun 16 2005 David Zeuthen <davidz@redhat.com> 0.1-1
- Initial build
