For Squeeze
all need to be performed in a chroot, i.e. run
cowbuilder --update --basepath /var/cache/pbuilder/base.squeeze.amd64.cow/
# prepare environment
apt-get -y install xorg-dev procps rsync build-essential nfs-common
mkdir -p /opt/matlab
mount repo:/opt/matlab /opt/matlab
export LM_LICENSE_FILE=/opt/matlab/default/etc/license.dat
export PATH=${PATH}:/opt/matlab/default/bin
# remember how the file system looked before we did anything
cd /
find bin boot etc home lib sbin srv tmp usr var > filelist.orig
mkdir /root/tmp
cd /root/tmp
wget http://www.ldas-sw.ligo.caltech.edu/ligotools/ligotools_init/ligotools_init_2.4.tar
tar xmf ligotools_init_2.4.tar
echo -e "/usr\n\n\n\n\n\n\n" | ./ligotools_init
eval `/usr/bin/use_ligotools`
# this was patched by us, so don't get it from caltech
wget http://repo/misc/tclexe_8.4.7_SOURCE.tar.gz
echo y | ligotools_install tclexe_8.4.7_SOURCE.tar.gz
echo -e "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\nyes\n" | ligotools_update
# now we need to package it
mkdir -p /ligotools/opt/lscsoft
cd /ligotools
rsync -a /opt/lscsoft/ligotools opt/lscsoft
mkdir -p etc/profile.d/
cat <<EOF > etc/profile.d/ligotools.sh
eval \`/opt/lscsoft/ligotools/bin/use_ligotools\`
EOF
cp etc/profile.d/ligotools.sh etc/profile.d/ligotools.csh
mkdir DEBIAN
export TODAY=$( date +%Y%m%d )
export ARCH=$( dpkg-architecture -qDEB_BUILD_ARCH )
export VER=${TODAY}-1
cat <<EOF > DEBIAN/control
Package: ligotools
Architecture: $ARCH
Section: lscsoft
Version: $VER
Maintainer: Carsten Aulbert <carsten.aulbert@aei.mpg.de>
Priority: Extra
Depends: libx11-6, libxau6, libxdmcp6, libc6, libxcb-xlib0, libxcb1
Description: LIGOtools - auxilliary programs for analyzing GW data
This package contains the latest LIGOtools program distribution
EOF
find etc opt -type f -exec md5sum {} \; > DEBIAN/md5sums
cd ..
tar cz -C ligotools/DEBIAN -f control.tar.gz .
tar cz -C ligotools/DEBIAN -f control.tar.gz .
tar cz --exclude=DEBIAN -C ligotools -f data.tar.gz .
echo 2.0 > debian-binary
ar rcu ligotools_${VER}_${ARCH}.deb debian-binary control.tar.gz data.tar.gz
To find shared libraries:
for i in `find . -type f -executable | xargs ldd| awk '/0x/ {print $1}'|sort | uniq`; do echo -e "**** $i *********"; apt-file search $i; done
--
CarstenAulbert - 07 Jul 2009