%global debug_package %{nil}

Summary:    Perl/Gtk approach to connections managing.
Name:       pac
Version:    4.5.5.7
Release:    5%{?dist}
License:    GPLv3
Group:      Applications/Internet
URL:        https://github.com/perseo22/pacmanager
Source0:    pac-%{version}-all.tar.gz
Patch0:     pac-%{version}-vte.patch

Requires:   perl(YAML), perl(Gtk2::Ex::Simple::List)
Requires:   perl(Gtk2::GladeXML) perl(Gnome2::Vte) perl(Gnome2::GConf)
Requires:   perl(Crypt::Blowfish), perl(IO::Stty) perl(Net::ARP)
Requires:   perl(Crypt::CBC) perl(Gtk2::Unique) perl(Crypt::Rijndael)
Requires:   perl(Net::Ping) perl(Digest::SHA)
Requires:   perl(FindBin) perl(File::Copy) perl(Sys::Hostname)
Requires:   perl(Expect)
Requires:   uuid-perl, perl-Socket6

%description
PAC is a Perl/GTK Gnome replacement for SecureCRT/Putty/etc... It provides
a GUI to configure SSH/Telnet connections: users, passwords, EXPECT regular
expressions, macros, etc.

%prep
# Whats the point of creating a source release with the version in the archive but not in the
# actual folder it extracts to... 
%autosetup -n %{name} -p1

%build
# Remove bundled Gnome2::Vte
%{__rm} -f res/libgnome2-vte-perl*
%{__rm} -r lib/ex/vte32
%{__rm} -r lib/ex/vte64
%{__rm} -r lib/ex/vteARM*
%{__rm} -r lib/ex/vtePPC*

%install
install -D -m 0644 res/%{name}.1 $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}.1
install -D -m 0644 res/%{name}.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
install -D -m 0644 res/%{name}64x64.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/pac.png
install -D -m 0755 %{name} $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{name}
%{__cp} -r lib res $RPM_BUILD_ROOT/%{_datadir}/%{name}/

%{__mkdir} -p $RPM_BUILD_ROOT/%{_bindir}
pushd $RPM_BUILD_ROOT/%{_bindir}
  ln -s %{_datadir}/%{name}/%{name} %{name}
popd

%files
%defattr(-,root,root)
%license LICENSE
%doc README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}*
%{_datadir}/%{name}/*

%changelog
* Fri Nov 20 2020 Greg Wildman <greg@techno.co.za> 4.5.5.7-5
- Update dependencies.

* Sun Aug 26 2018 Greg Wildman <greg@techno.co.za> 4.5.5.7-4
- Rebuilt.
- Update license and dependencies.

* Thu Jun 30 2016 Greg Wildman <greg@techno.co.za> 4.5.5.7-1
- Updated to new version.

* Tue Jul  7 2015 Greg Wildman <greg@techno.co.za> 4.5.5.5-1
- Updated to new version.

* Mon Apr 13 2015 Greg Wildman <greg@techno.co.za> 4.5.5-1
- Updated to new version.

* Wed Apr 09 2014 Greg Wildman <greg@techno.co.za> 4.5.3.8.1-1
- Updated to new version.

* Tue Mar 11 2014 Greg Wildman <greg@techno.co.za> 4.5.3.5-1
- Updated to new version.

* Thu Nov 14 2013 Greg Wildman <greg@techno.co.za> 4.5.3.2-1
- Updated to new version.

* Fri Jul 05 2013 Greg Wildman <greg@techno.co.za> 4.5.2.3-1
- Updated to new version.

* Fri Nov 30 2012 Greg Wildman <greg@techno.co.za> 4.5-1
- Updated to new version.

* Tue Oct 16 2012 Greg Wildman <greg@techno.co.za> 4.4-1
- Updated to new version.

* Fri Sep 28 2012 Greg Wildman <greg@techno.co.za> 4.3.1.2-1
- Updated to new version.

* Fri Sep 14 2012 Greg Wildman <greg@techno.co.za> 4.3-1
- Updated to new version. Fingers crossed for the lotto...

* Tue Aug 21 2012 Greg Wildman <greg@techno.co.za> 4.2.3.2-1
- Updated to new version.

* Thu Jul 05 2012 Greg Wildman <greg@techno.co.za> 4.2.2-1
- Updated to new version.

* Wed Jun 06 2012 Greg Wildman <greg@techno.co.za> 4.2-1
- Updated to new version.

* Fri Jun 01 2012 Greg Wildman <greg@techno.co.za> 4.1.2.3-1
- Updated to new version.

* Wed Apr 25 2012 Greg Wildman <greg@techno.co.za> 4.0.1-1
- Updated to new version.

* Mon Apr 16 2012 Greg Wildman <greg@techno.co.za> 4-1
- Updated to new version.

* Fri Dec 09 2011 Greg Wildman <greg@techno.co.za> 3.3.9.3-4
- Updated to new version.
- Removed the bundled Gnome2::Vte

* Wed Sep 14 2011 Greg Wildman <greg@techno.co.za> 3.2.1
- Updated to new version.

* Thu Sep 08 2011 Greg Wildman <greg@techno.co.za> 3.1.3.4-3
- Removed unneeded files from package.

* Thu Sep 08 2011 Greg Wildman <greg@techno.co.za> 3.1.3.4-2
- Removed dependencies that are no longer needed
- Gnome2::Vte

* Thu Sep 08 2011 Greg Wildman <greg@techno.co.za> 3.1.3.4-1
- Updated to version 3.1.3.4

* Thu Sep 01 2011 Greg Wildman <greg@techno.co.za> 3.1.3.2-1
- Updated to version 3.1.3.2
- Yay! spring time.

* Fri Jul 29 2011 Greg Wildman <greg@techno.co.za> 3.1.0.1-1
- Updated to version 3.1.0.1

* Tue Jul 05 2011 Greg Wildman <greg@techno.co.za> 3.0-1
- Updated to version 3.0

* Thu Apr 07 2011 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.5.10

* Fri Mar 18 2011 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.5.8.
- Can't complain about this project not being actively maintained.

* Thu Mar 17 2011 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.5.7.

* Fri Mar 11 2011 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.5.6.

* Mon Feb 28 2011 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.5.5.

* Mon Dec 13 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.4.

* Fri Nov 19 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.3.

* Mon Nov 15 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.2 on my birthday...
- Added perl(Net::ARP) as a dependancy

* Thu Oct 07 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.5.1

* Thu Oct 07 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.4.1.5

* Thu Sep 09 2010 Greg Wildman <greg@techno.co.za>
- Updated to version 2.4.1.3

* Fri Jun 11 2010 Greg Wildman <greg@techno.co.za>
- Initial spec file.
- 2010 World cup starts today and I am packaging.