radare2/sys/debian.sh

28 lines
808 B
Bash
Raw Normal View History

#!/bin/sh
# run this from a debian system, docker is fine :)
2017-03-13 13:40:07 +00:00
if [ -z "${ARCH}" ]; then
ARCH=`uname -m`
fi
echo "[debian] preparing radare2 package..."
PKGDIR=sys/debian/radare2/root
DEVDIR=sys/debian/radare2-dev/root
rm -rf "${PKGDIR}" "${DEVDIR}"
make install DESTDIR="${PWD}/${PKGDIR}"
mkdir -p "${DEVDIR}/usr/include"
mv "${PKGDIR}/usr/include/"* "${DEVDIR}/usr/include"
mkdir -p "${DEVDIR}/usr/lib"
mv "${PKGDIR}/usr/lib/"lib*a "${DEVDIR}/usr/lib"
mv "${PKGDIR}/usr/lib/pkgconfig" "${DEVDIR}/usr/lib"
for a in ${PKGDIR}/usr/bin/* ; do
2017-03-13 13:40:07 +00:00
echo "[debian] strip $a"
strip -s "$a" 2> /dev/null || strip "$a" 2>/dev/null
done
echo "[debian] building radare2 package..."
2017-03-13 13:40:07 +00:00
make -C sys/debian/radare2 ARCH=${ARCH}
echo "[debian] building radare2-dev package..."
2017-03-13 13:40:07 +00:00
make -C sys/debian/radare2-dev ARCH=${ARCH}