Hi, Mike!

* Mike Kelly <[email protected]> [2009-10-28 19:50]:
> http://www.cmake.org/pipermail/cmake/2009-May/029262.html

Thanks for the hint. But that doesn't help at all compiling.
I still can't get a static build.

Please, PLEASE, can one of the developers give their opinion? Or at
least someone who knows a little about the libs used by awesome and
statical linking? I'm not getting further.

As for now, I made some dirty hack which I don't like at all, but it
worked when I tried it today. I compiled awesome dynamically linked on one
machine, then used custom LD_-variables and `ldd' to get the libraries
linked in, and created a tar ball with both the libraries (even
system-wide ones), the lua libraries required by awesome and themes
etc and the binary into on tar ball.

Then, you can download the tar ball, extract it and run awesome from
.xsession or .xinitrc, by setting two environment variables to custom
settings (the script will output these values). You'll find the script
attached. (It should work when you ./configure'd all libraries with
--prefix=$HOME and installed awesome the same way. If you change the
variables at the top, you can probably package the debian unstable
version of awesome with this, I guess. Haven't tried it.)

Greetings,
Julius
#!/bin/zsh

AWESOME_BIN=${1:-$HOME/bin/awesome}
AWESOME_SHARE=${AWESOME_SHARE:-$HOME/share/awesome}
LIBS=${LIBS:-$HOME/lib}
INSTALL=${INSTALL:-.aw+libs}

WDIR=`mktemp -d /tmp/awesome.XXXXXX`
[[ ! -d "$WDIR" ]] && echo failed to create temp dir && exit 1
mkdir $WDIR/$INSTALL || (echo failed to create install dir && exit 1)
AWESOME_LIBS=$WDIR/$INSTALL/lib
mkdir $AWESOME_LIBS || (echo failed to create libs dir && exit 1)

# find shared libs used by binary
for lib in $( env LD_LIBRARY_PATH="$LIBS" \
    ldd $AWESOME_BIN | fgrep '=>' | cut -d' ' -f3); do
    cp $lib $AWESOME_LIBS
done

# copy ELF
mkdir $WDIR/$INSTALL/bin || (echo failed to create bin dir && exit 1)
cp $AWESOME_BIN $WDIR/$INSTALL/bin

mkdir $WDIR/$INSTALL/share || exit 42
cp -r $AWESOME_SHARE $WDIR/$INSTALL/share

# packing everything together...
ARCHIVE="aw+libs-$(date +%F).tar.gz"
(cd $WDIR && tar cfz $ARCHIVE $INSTALL)

# move archive home
mv $WDIR/$ARCHIVE $PWD
# clean up
rm -r $WDIR

echo "copy \`./$ARCHIVE' to another machine, unpack it in the home directory"
echo "(or any other directory) and add the following call to .xsession/.xinitrc 
file:"
echo
echo "\tLD_LIBRARY_PATH=$HOME/.aw+libs/lib \\"
echo 
"\t\tLUA_PATH=\"\$HOME/$INSTALL/share/awesome/lib/?.lua;\$HOME/$INSTALL/share/awesome/lib/?/init.lua;;\"
 \\"
echo "\t\t\$HOME/$INSTALL/bin/awesome"

Reply via email to