You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB

set -e
set -x
if [ -z "$VERSION" ]; then
echo "varible VERSION must be set!"
exit 1
CPU_COUNT=$(grep "processor" -c /proc/cpuinfo)
# we compiled emacs with runpath set to '$ORIGIN/../lib' ($ORIGIN is a
# special token so we can specify a location relative to the
# executable
# Same as running
# $ patchelf --set-rpath '$ORIGIN/../lib' $PREFIX/bin/emacs
# copying some lib files
cp /lib/x86_64-linux-gnu/ $EMACSROOT/lib/
cp /lib/x86_64-linux-gnu/ $EMACSROOT/lib/
cp /usr/lib/x86_64-linux-gnu/ $EMACSROOT/lib/
# in the output we see that the binary is dynamically linking the
# files we copied
ldd $PREFIX/bin/emacs
mkdir -p $BUILDS
# make a tarball
rm $BUILDS/emacs-${VERSION}.tar.gz || true
tar czf $BUILDS/emacs-${VERSION}.tar.gz *
# make a .deb with fpm
# set dependencies (check with apt)
fpm -t deb -v $VERSION -n emacs -s dir $PREFIX/=/usr
cp *.deb $BUILDS
exit 0