Skip to content

Commit

Permalink
Debian package fixes (#15081) ##build
Browse files Browse the repository at this point in the history
* Use xz instead of gzip
  • Loading branch information
gordboy authored and radare committed Sep 20, 2019
1 parent cc4af98 commit ca1eddb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
12 changes: 11 additions & 1 deletion sys/debian.sh
Expand Up @@ -5,6 +5,10 @@ if [ -z "${ARCH}" ]; then
ARCH=`uname -m`
fi

if [ "${ARCH}" = "x86_64" ]; then
ARCH=amd64
fi

echo "[debian] preparing radare2 package..."
PKGDIR=sys/debian/radare2/root
DEVDIR=sys/debian/radare2-dev/root
Expand All @@ -15,9 +19,15 @@ 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
echo "[debian] strip $a"
strip -s "$a" 2> /dev/null || strip "$a" 2>/dev/null
strip --strip-all "$a" 2> /dev/null || true
done

for a in ${PKGDIR}/usr/lib/libr*.so.* ; do
echo "[debian] strip $a"
strip --strip-unneeded "$a" 2> /dev/null || true
done

echo "[debian] building radare2 package..."
Expand Down
4 changes: 0 additions & 4 deletions sys/debian/arch.mk

This file was deleted.

8 changes: 4 additions & 4 deletions sys/debian/deb_hand.mak
Expand Up @@ -79,7 +79,7 @@ endif
#endif
# Make md5sums.
cd ${PACKAGE_DIR}/data && find . -type f -exec ${MD5SUM} {} \; \
| sed -e 's| \./||' \
| sed -e 's| \./| |' \
> $@/md5sums

${PACKAGE_DIR}/debian-binary:
Expand All @@ -93,16 +93,16 @@ ${PACKAGE_DIR}/build: ${PACKAGE_DIR}/debian-binary ${PACKAGE_DIR}/control \
rm -rf $@
mkdir $@
cp ${PACKAGE_DIR}/debian-binary $@/
cd ${PACKAGE_DIR}/control && tar czvf $@/control.tar.gz *
cd ${PACKAGE_DIR}/control && tar cJvf $@/control.tar.xz *
cd ${PACKAGE_DIR}/data && \
COPY_EXTENDED_ATTRIBUTES_DISABLE=true \
COPYFILE_DISABLE=true \
tar cpzvf $@/data.tar.gz ./*
tar cpJvf $@/data.tar.xz ./*

# Convert GNU ar to BSD ar that debian requires.
# Note: Order of files within ar archive is important!
${PACKAGE_DIR}/${PACKAGE}_${VERSION}_${ARCH}.deb: ${PACKAGE_DIR}/build
ar -rc $@ $</debian-binary $</control.tar.gz $</data.tar.gz
ar -rc $@ $</debian-binary $</control.tar.xz $</data.tar.xz
#sed -e 's|^\([^/]\+\)/ \(.*\)|\1 \2|g' $@tmp > $@fail
#rm -f $@tmp
#mv $@fail $@
Expand Down
1 change: 0 additions & 1 deletion sys/debian/radare2-dev/CONFIG
Expand Up @@ -4,4 +4,3 @@ PRIORITY=optional
MAINTAINER=pancake <pancake@nopcode.org>

include ../../../config-user.mk
include ../arch.mk
1 change: 0 additions & 1 deletion sys/debian/radare2/CONFIG
Expand Up @@ -4,4 +4,3 @@ PRIORITY=optional
MAINTAINER=pancake <pancake@nopcode.org>

include ../../../config-user.mk
include ../arch.mk

0 comments on commit ca1eddb

Please sign in to comment.