PAC Manager Code
Brought to you by:
perseo22
# Variables
$src_basedir=/opt/david/pac/pac
$src_libdir=${src_basedir}/lib
$src_resdir=${src_basedir}/res
$src_utilsdir=${src_basedir}/utils
$src_methoddir=${src_libdir}/method
$src_editdir=${src_libdir}/edit
$host_bindir=/usr/bin
$host_mandir=/usr/share/man/man1
$dest_basedir=/opt/pac
$dest_libdir=/opt/pac/lib
$dest_resdir=/opt/pac/res
$dest_utilsdir=/opt/pac/utils
$dest_methoddir=${dest_libdir}/method
$dest_editdir=${dest_libdir}/edit
$menudir=/usr/share/applications
$icondir=/usr/share/pixmaps
# Common header
%product PAC Perl Auto Connector
%copyright 2010-2015 by David Torrejón Vaquerizas, released under the GNU GPLv3 license
%vendor David Torrejón Vaquerizas (david.tv@gmail.com)
%license ${src_basedir}/LICENSE
%readme ${src_basedir}/README
%description .
%description Gnome's SecureCRT/Putty/blah blah... equivalent (on steroids!) written in Perl/GTK.
%description .
%description PAC is a telnet/ssh/rsh/etc connection manager/automator written in Perl GTK
%description aimed at making both administrators and switchers (from Windoze) live easier.
%description This is free software, licensed under GNU's GLPv3 version
%description If possible, use the next repository to update/install PAC:
%description .
%description deb http://archive.getdeb.net/ubuntu <your_distrib_name_here>-getdeb apps
%description .
%description (Or visit: http://www.getdeb.net to get further info and software)
%version 4.5.5.8
%requires perl
%requires gtk2-engines-pixbuf
%requires libvte9
%requires libcairo-perl
%requires libgtk2-perl
%requires libglib-perl
%requires libpango-perl
%requires libgnome2-gconf-perl
%requires libsocket6-perl
%requires libexpect-perl
%requires libnet-proxy-perl
%requires libyaml-perl
%requires libcrypt-cbc-perl
%requires libcrypt-blowfish-perl
%requires libgtk2-perl
%requires libgtk2-gladexml-perl
%requires libgtk2-ex-simple-list-perl
%requires libnet-arp-perl
%requires libossp-uuid-perl
%requires openssh-client
%requires telnet
%requires ftp
%requires libcrypt-rijndael-perl
%requires libxml-parser-perl
%requires libgtk2-unique-perl
#%requires libgtk2-appindicator-perl
#%requires xtightvncviewer
#%requires rdesktop
#%requires libgtk2-sourceview2-perl
#%requires remote-tty
#%requires cu
#%requires autossh
# Project files
f 755 root root ${dest_basedir}/pac ${src_basedir}/pac nostrip()
l 755 root root ${host_bindir}/pac ${dest_basedir}/pac nostrip()
f 755 root root ${dest_basedir}/LICENSE ${src_basedir}/LICENSE nostrip()
f 755 root root ${dest_basedir}/README ${src_basedir}/README nostrip()
f 644 root root ${dest_libdir}/PACScripts.pm ${src_libdir}/PACScripts.pm nostrip()
f 644 root root ${dest_libdir}/PACPipe.pm ${src_libdir}/PACPipe.pm nostrip()
f 644 root root ${dest_libdir}/PACCluster.pm ${src_libdir}/PACCluster.pm nostrip()
f 644 root root ${dest_libdir}/PACPCC.pm ${src_libdir}/PACPCC.pm nostrip()
f 644 root root ${dest_libdir}/PACConfig.pm ${src_libdir}/PACConfig.pm nostrip()
f 755 root root ${dest_libdir}/pac_conn ${src_libdir}/pac_conn nostrip()
f 644 root root ${dest_libdir}/PACEdit.pm ${src_libdir}/PACEdit.pm nostrip()
f 644 root root ${dest_libdir}/PACGlobalVarEntry.pm ${src_libdir}/PACGlobalVarEntry.pm nostrip()
f 644 root root ${dest_libdir}/PACMain.pm ${src_libdir}/PACMain.pm nostrip()
f 644 root root ${dest_libdir}/PACScreenshots.pm ${src_libdir}/PACScreenshots.pm nostrip()
f 644 root root ${dest_libdir}/PACTerminal.pm ${src_libdir}/PACTerminal.pm nostrip()
f 644 root root ${dest_libdir}/PACTray.pm ${src_libdir}/PACTray.pm nostrip()
f 644 root root ${dest_libdir}/PACTrayUnity.pm ${src_libdir}/PACTrayUnity.pm nostrip()
f 644 root root ${dest_libdir}/PACUtils.pm ${src_libdir}/PACUtils.pm nostrip()
f 644 root root ${dest_libdir}/PACStatistics.pm ${src_libdir}/PACStatistics.pm nostrip()
f 644 root root ${dest_libdir}/PACKeePass.pm ${src_libdir}/PACKeePass.pm nostrip()
f 644 root root ${dest_libdir}/ex/KeePass.pm ${src_libdir}/ex/KeePass.pm nostrip()
f 644 root root ${dest_libdir}/ex/PACTree.pm ${src_libdir}/ex/PACTree.pm nostrip()
f 644 root root ${dest_libdir}/ex/TiedTree.pm ${src_libdir}/ex/TiedTree.pm nostrip()
f 644 root root ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.000 ${src_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.000 nostrip()
f 644 root root ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.014 ${src_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.014 nostrip()
f 644 root root ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.016 ${src_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.016 nostrip()
f 644 root root ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.018 ${src_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.018 nostrip()
f 644 root root ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.020 ${src_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_5.020 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.000 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.000 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.014 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.014 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.016 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.016 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.018 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.018 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.020 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.020 nostrip()
f 644 root root ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.022 ${src_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_5.022 nostrip()
f 644 root root ${dest_libdir}/ex/vteARM/auto/Gnome2/Vte/Vte.o ${src_libdir}/ex/vteARM/auto/Gnome2/Vte/Vte.o nostrip()
f 644 root root ${dest_libdir}/ex/vteARMV7L/auto/Gnome2/Vte/Vte.o ${src_libdir}/ex/vteARMV7L/auto/Gnome2/Vte/Vte.o nostrip()
f 644 root root ${dest_libdir}/ex/vtePPC64/auto/Gnome2/Vte/Vte.so ${src_libdir}/ex/vtePPC64/auto/Gnome2/Vte/Vte.so nostrip()
f 644 root root ${dest_editdir}/PACExecEntry.pm ${src_editdir}/PACExecEntry.pm nostrip()
f 644 root root ${dest_editdir}/PACExpectEntry.pm ${src_editdir}/PACExpectEntry.pm nostrip()
f 644 root root ${dest_editdir}/PACMethod.pm ${src_editdir}/PACMethod.pm nostrip()
f 644 root root ${dest_editdir}/PACPrePostEntry.pm ${src_editdir}/PACPrePostEntry.pm nostrip()
f 644 root root ${dest_editdir}/PACTermOpts.pm ${src_editdir}/PACTermOpts.pm nostrip()
f 644 root root ${dest_editdir}/PACVarEntry.pm ${src_editdir}/PACVarEntry.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_cadaver.pm ${src_methoddir}/PACMethod_cadaver.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_mosh.pm ${src_methoddir}/PACMethod_mosh.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_cu.pm ${src_methoddir}/PACMethod_cu.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_ftp.pm ${src_methoddir}/PACMethod_ftp.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_generic.pm ${src_methoddir}/PACMethod_generic.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_rdesktop.pm ${src_methoddir}/PACMethod_rdesktop.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_xfreerdp.pm ${src_methoddir}/PACMethod_xfreerdp.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_remote_tty.pm ${src_methoddir}/PACMethod_remote_tty.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_sftp.pm ${src_methoddir}/PACMethod_sftp.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_ssh.pm ${src_methoddir}/PACMethod_ssh.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_telnet.pm ${src_methoddir}/PACMethod_telnet.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_vncviewer.pm ${src_methoddir}/PACMethod_vncviewer.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_tigervnc.pm ${src_methoddir}/PACMethod_tigervnc.pm nostrip()
f 644 root root ${dest_methoddir}/PACMethod_3270.pm ${src_methoddir}/PACMethod_3270.pm nostrip()
f 644 root root ${dest_resdir}/pac.yml ${src_resdir}/pac.yml nostrip()
f 644 root root ${dest_resdir}/pac.glade ${src_resdir}/pac.glade nostrip()
f 644 root root /etc/bash_completion.d/pac ${src_resdir}/pac_bash_completion nostrip()
f 644 root root ${dest_resdir}/pac_tray.png ${src_resdir}/pac_tray.png nostrip()
f 644 root root ${dest_resdir}/pac_tray_bw.png ${src_resdir}/pac_tray_bw.png nostrip()
f 644 root root ${dest_resdir}/pac_tray_bw.png.2 ${src_resdir}/pac_tray_bw.png.2 nostrip()
f 644 root root ${dest_resdir}/pac_tab.png ${src_resdir}/pac_tab.png nostrip()
f 644 root root ${dest_resdir}/pac24x24.png ${src_resdir}/pac24x24.png nostrip()
f 644 root root ${dest_resdir}/pac64x64.png ${src_resdir}/pac64x64.png nostrip()
f 644 root root ${dest_resdir}/pac256x256.jpg ${src_resdir}/pac256x256.jpg nostrip()
f 644 root root ${dest_resdir}/pac_terminal16x16.png ${src_resdir}/pac_terminal16x16.png nostrip()
f 644 root root ${dest_resdir}/pac_terminal_x16x16.png ${src_resdir}/pac_terminal_x16x16.png nostrip()
f 644 root root ${icondir}/pac.png ${src_resdir}/pac64x64.png nostrip()
f 644 root root ${dest_resdir}/pac_terminal64x64.png ${src_resdir}/pac_terminal64x64.png nostrip()
f 644 root root ${dest_resdir}/pac_terminal_x64x64.png ${src_resdir}/pac_terminal_x64x64.png nostrip()
f 644 root root ${dest_resdir}/pac_method_cadaver.png ${src_resdir}/pac_method_cadaver.png nostrip()
f 644 root root ${dest_resdir}/pac_method_cu.jpg ${src_resdir}/pac_method_cu.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_mosh.png ${src_resdir}/pac_method_mosh.png nostrip()
f 644 root root ${dest_resdir}/pac_method_ftp.jpg ${src_resdir}/pac_method_ftp.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_rdesktop.jpg ${src_resdir}/pac_method_rdesktop.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_remote-tty.jpg ${src_resdir}/pac_method_remote-tty.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_sftp.jpg ${src_resdir}/pac_method_sftp.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_ssh.jpg ${src_resdir}/pac_method_ssh.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_telnet.jpg ${src_resdir}/pac_method_telnet.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_vncviewer.jpg ${src_resdir}/pac_method_vncviewer.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_generic.jpg ${src_resdir}/pac_method_generic.jpg nostrip()
f 644 root root ${dest_resdir}/pac_method_3270.jpg ${src_resdir}/pac_method_3270.jpg nostrip()
f 644 root root ${dest_resdir}/pac_drag_terminal32x32.png ${src_resdir}/pac_drag_terminal32x32.png nostrip()
f 644 root root ${dest_resdir}/pac_group_add_16x16.png ${src_resdir}/pac_group_add_16x16.png nostrip()
f 644 root root ${dest_resdir}/pac_group_closed_16x16.png ${src_resdir}/pac_group_closed_16x16.png nostrip()
f 644 root root ${dest_resdir}/pac_group_open_16x16.png ${src_resdir}/pac_group_open_16x16.png nostrip()
f 644 root root ${dest_resdir}/pac_group.png ${src_resdir}/pac_group.png nostrip()
f 644 root root ${dest_resdir}/pac_node_add_16x16.png ${src_resdir}/pac_node_add_16x16.png nostrip()
f 644 root root ${dest_resdir}/pac_cluster_auto.png ${src_resdir}/pac_cluster_auto.png nostrip()
f 644 root root ${dest_resdir}/pac_cluster_manager.png ${src_resdir}/pac_cluster_manager.png nostrip()
f 644 root root ${dest_resdir}/pac_cluster_manager2.png ${src_resdir}/pac_cluster_manager2.png nostrip()
f 644 root root ${dest_resdir}/pac_cluster_manager_off.png ${src_resdir}/pac_cluster_manager_off.png nostrip()
f 644 root root ${dest_resdir}/pac_shell.png ${src_resdir}/pac_shell.png nostrip()
f 644 root root ${dest_resdir}/pac_wol.png ${src_resdir}/pac_wol.png nostrip()
f 644 root root ${dest_resdir}/pac_prompt.png ${src_resdir}/pac_prompt.png nostrip()
f 644 root root ${dest_resdir}/pac_protected.png ${src_resdir}/pac_protected.png nostrip()
f 644 root root ${dest_resdir}/pac_unprotected.png ${src_resdir}/pac_unprotected.png nostrip()
f 644 root root ${dest_resdir}/pac_script.png ${src_resdir}/pac_script.png nostrip()
f 644 root root ${dest_resdir}/pac_treelist.png ${src_resdir}/pac_treelist.png nostrip()
f 644 root root ${dest_resdir}/pac_chain.png ${src_resdir}/pac_chain.png nostrip()
f 644 root root ${dest_resdir}/pac_history.png ${src_resdir}/pac_history.png nostrip()
f 644 root root ${dest_resdir}/pac_favourite_on.png ${src_resdir}/pac_favourite_on.png nostrip()
f 644 root root ${dest_resdir}/pac_favourite_off.png ${src_resdir}/pac_favourite_off.png nostrip()
f 644 root root ${dest_resdir}/pac_quick_connect.png ${src_resdir}/pac_quick_connect.png nostrip()
f 644 root root ${dest_resdir}/pac_banner_cluster.png ${src_resdir}/pac_banner_cluster.png nostrip()
f 644 root root ${dest_resdir}/pac_banner_scripts.png ${src_resdir}/pac_banner_scripts.png nostrip()
f 644 root root ${dest_resdir}/pac_banner_preferences.png ${src_resdir}/pac_banner_preferences.png nostrip()
f 644 root root ${dest_resdir}/pac_banner_edit.png ${src_resdir}/pac_banner_edit.png nostrip()
f 644 root root ${dest_resdir}/pac_banner_wol.png ${src_resdir}/pac_banner_wol.png nostrip()
f 644 root root ${dest_resdir}/pac_keepass.png ${src_resdir}/pac_keepass.png nostrip()
f 644 root root ${dest_resdir}/pac_dumb_guy.svg ${src_resdir}/pac_dumb_guy.svg nostrip()
f 644 root root ${dest_resdir}/termcap ${src_resdir}/termcap nostrip()
f 644 root root ${dest_resdir}/sample1.pl ${src_resdir}/sample1.pl nostrip()
f 644 root root ${dest_resdir}/sample2.pl ${src_resdir}/sample2.pl nostrip()
f 644 root root ${dest_resdir}/sample3.pl ${src_resdir}/sample3.pl nostrip()
f 644 root root ${dest_resdir}/sample4.pl ${src_resdir}/sample4.pl nostrip()
f 755 root root ${dest_utilsdir}/pac_from_mcm.pl ${src_utilsdir}/pac_from_mcm.pl nostrip()
f 644 root root ${menudir}/pac.desktop ${src_resdir}/pac.desktop nostrip()
f 644 root root ${host_mandir}/pac.1 ${src_resdir}/pac.1 nostrip()
%postinstall <<EOF
set -e
if [ "$$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi
if [ ! -f /etc/termcap ]; then cp ${dest_resdir}/termcap /etc/termcap ; fi
rm -f ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so
rm -f ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so
if [ $$(perl -e "print ( $$] ge '5.022' ? '1' : '0' );") -eq "1" ]; then
ver="5.022"
elif [ $$(perl -e "print ( $$] ge '5.020' ? '1' : '0' );") -eq "1" ]; then
ver="5.020"
elif [ $$(perl -e "print ( $$] ge '5.018' ? '1' : '0' );") -eq "1" ]; then
ver="5.018"
elif [ $$(perl -e "print ( $$] ge '5.016' ? '1' : '0' );") -eq "1" ]; then
ver="5.016"
elif [ $$(perl -e "print ( $$] ge '5.014' ? '1' : '0' );") -eq "1" ]; then
ver="5.014"
else
ver="5.000"
fi
ln -s ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so_32_$$ver ${dest_libdir}/ex/vte32/auto/Gnome2/Vte/Vte.so
ln -s ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so_64_$$ver ${dest_libdir}/ex/vte64/auto/Gnome2/Vte/Vte.so
EOF
%postremove <<EOF
set -e
if [ "$$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi
EOF