Skip to content

Instantly share code, notes, and snippets.

@wcasanova
Forked from merikz/make.sh
Created June 27, 2017 19:31
Show Gist options
  • Save wcasanova/7cb72d27b4c07ea1019d020d2d19426e to your computer and use it in GitHub Desktop.
Save wcasanova/7cb72d27b4c07ea1019d020d2d19426e to your computer and use it in GitHub Desktop.
new build script for merikz/pacmanager
#!/bin/bash
if [ $(whoami) != "root" ]
then
echo "*******************************"
echo "You must run $0 as user 'root'"
echo "*******************************"
exit 1;
fi
if [ ! -r pac.list ]
then
echo "*******************************"
echo "You are not in a pac source directory"
echo "*******************************"
exit 1
fi
#Use variables ($src_basedir) from pac.list
. <(perl -nle'print $1 if /^\$([^\s=]+?=\S+$)/;exit if /Common header/' pac.list)
fileowner=magnus
fileownergroup=magnus
build_dir=${src_basedir%/*}
#parent of src_basedir from pac.list will be recursively deleted and re-created, used as a build directory
if [ -z "$build_dir" -o ${PWD#$build_dir} != ${PWD} ]
then
echo "*******************************"
echo "Invalid src_basedir in pac.list"
echo "(or you're in src_basedir)"
echo "*******************************"
exit 1
fi
#preserve old builds
[ -d $build_dir/dist ] && mv $build_dir/dist $build_dir/.dist
rm -rf $build_dir/*
[ -d $build_dir/.dist ] && mv $build_dir/.dist $build_dir/dist
mkdir -p $build_dir/{pac,dist}
cp -r * $src_basedir/
cd $build_dir
find $src_basedir -name "*.svn" -o -name "*.git" -o -name "*~" -print0 | xargs -0 rm -rf
if [ -f pac.pl ] ; then #dev environment stuff. eclipse and debugger likes .pl better. Restore it.
[ -e pac ] && rm pac # debugger doesn't work with a soft link, and git doesn't preserve hard links
mv pac.pl pac # so renaming is only option
[ -L lib/pac_conn.pl ] && rm lib/pac_conn.pl
fi
# Get version from PACUtils.pm module
V=$(grep "our \$APPVERSION" pac/lib/PACUtils.pm | awk -F"'" '{print $2;}')
echo "**********************************"
echo "**********************************"
echo "Creating packages for PAC ${V}..."
echo "**********************************"
echo "**********************************"
echo ""
rm -rf meta
# First of all, change %version in pac.list
echo "----------------------------------------------"
echo " - Changing version in 'pac.list' to ${V}..."
echo "----------------------------------------------"
echo ""
sed "s/%version .*/%version $V/g" pac/pac.list > pac.list
ret=$?
if [ $ret -ne 0 ];
then
echo " *********** ERROR ************"
exit $ret
fi
cp pac.list pac/
chown -R $fileowner:$fileownergroup pac/
# .tar.gz
echo "----------------------------------------------"
echo " - Creating '.tar.gz' package for PAC ${V}..."
echo "----------------------------------------------"
echo ""
tar -czf pac-${V}-all.tar.gz pac
chown $fileowner:$fileownergroup pac-${V}-all.tar.gz
mv pac-${V}-all.tar.gz dist/
# DEB
echo "----------------------------------------------"
echo " - Creating '.deb' package for PAC ${V}..."
echo "----------------------------------------------"
echo ""
epm -vv --keep-files -f deb pac -m meta
ret=$?
if [ $ret -ne 0 ]; then
echo " *********** ERROR ************"
exit $ret
fi
sed 's/Architecture:.*/Architecture: all/g' meta/pac-${V}-meta/DEBIAN/control > meta/pac-${V}-meta/DEBIAN/control.new
mv meta/pac-${V}-meta/DEBIAN/control.new meta/pac-${V}-meta/DEBIAN/control
echo "Recommends: libgtk2-sourceview2-perl, rdesktop, xtightvncviewer, remote-tty, cu" >> meta/pac-${V}-meta/DEBIAN/control
echo "Section: networking" >> meta/pac-${V}-meta/DEBIAN/control
echo "Installed-Size: 3000" >> meta/pac-${V}-meta/DEBIAN/control
echo "Homepage: http://sourceforge.net/projects/pacmanager/" >> meta/pac-${V}-meta/DEBIAN/control
echo "Provides: pac-manager" >> meta/pac-${V}-meta/DEBIAN/control
echo "Priority: optional" >> meta/pac-${V}-meta/DEBIAN/control
dpkg -D1 -b meta/pac-${V}-meta pac-${V}-all.deb
chown $fileowner:$fileownergroup pac-${V}-all.deb
mv pac-${V}-all.deb dist/
# -orig.tar.gz
echo "----------------------------------------------"
echo " - Creating '-orig.tar.gz' package for PAC ${V}..."
echo "----------------------------------------------"
echo ""
cd meta/pac-${V}-meta
tar -czf ../../dist/pac-${V}-orig.tar.gz *
cd -
#rm -rf meta
# RPM
if [ -x "`which alien`" ]; then
echo "----------------------------------------------"
echo " - Creating 32/64 bit '.rpm' package for PAC ${V}..."
echo "----------------------------------------------"
echo ""
alien -g -r --scripts dist/pac-${V}-all.deb
ret=$?
if [ $ret -ne 0 ]; then
echo " *********** ERROR ************"
exit $ret
fi
#sed "s/^Group:.*/Group: Converted\/networking\nRequires: perl perl-Crypt-Blowfish rdesktop tightvnc cunit remtty/g" pac-${V}/pac-${V}-2.spec > pac-${V}/pac-${V}-2.spec.new
sed "s/^Group:.*/Group: Converted\/networking\nRequires: perl vte ftp telnet perl-IO-Stty perl-Crypt-Blowfish rdesktop tigervnc/g" pac-${V}/pac-${V}-2.spec > pac-${V}/pac-${V}-2.spec.new
mv pac-${V}/pac-${V}-2.spec.new pac-${V}/pac-${V}-2.spec
cp -r pac-${V} pac-${V}.64
echo ""
echo " ------ Creating 32 bit '.rpm' package for PAC ${V}..."
rpmbuild --quiet -bb --buildroot $(pwd)/pac-${V} --target i386 pac-${V}/pac-${V}-2.spec
mv pac-${V}.64 pac-${V}
echo " ------ Creating 64 bit '.rpm' package for PAC ${V}..."
rpmbuild --quiet -bb --clean --buildroot $(pwd)/pac-${V} --target x86_64 pac-${V}/pac-${V}-2.spec
mv ../pac-${V}-2.*.rpm dist/
else
echo "----------------------------------------------"
echo "- Alien not installed. rpm package not created."
echo "----------------------------------------------"
echo ""
fi
echo ""
echo "--------------------------"
echo "- List of generated files:"
echo "--------------------------"
find $build_dir/dist -newer $src_basedir -type f -print0 | xargs -0 ls -lF
# Empty temp dir
rm -rf meta
rm -rf /home/$fileowner/rpmbuild
rm -rf $src_basedir
# Variables
$src_basedir=/var/tmp/pacbuild/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-2014 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.6
%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/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.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment