From ca1eddb22ddc74171cbdf7cdc6f4940ff0f0f950 Mon Sep 17 00:00:00 2001 From: Gordon M <35108003+gordboy@users.noreply.github.com> Date: Fri, 20 Sep 2019 11:25:26 +0100 Subject: [PATCH] Debian package fixes (#15081) ##build * Use xz instead of gzip --- sys/debian.sh | 12 +++++++++++- sys/debian/arch.mk | 4 ---- sys/debian/deb_hand.mak | 8 ++++---- sys/debian/radare2-dev/CONFIG | 1 - sys/debian/radare2/CONFIG | 1 - 5 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 sys/debian/arch.mk diff --git a/sys/debian.sh b/sys/debian.sh index 78eee9973e..d45461f5ab 100755 --- a/sys/debian.sh +++ b/sys/debian.sh @@ -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 @@ -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..." diff --git a/sys/debian/arch.mk b/sys/debian/arch.mk deleted file mode 100644 index 38ac8dba09..0000000000 --- a/sys/debian/arch.mk +++ /dev/null @@ -1,4 +0,0 @@ -ARCH=$(shell uname -m) -ifeq ($(ARCH),x86_64) -ARCH=amd64 -endif diff --git a/sys/debian/deb_hand.mak b/sys/debian/deb_hand.mak index 9a6c5969ac..abdf63b530 100644 --- a/sys/debian/deb_hand.mak +++ b/sys/debian/deb_hand.mak @@ -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: @@ -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 $@ $ $@fail #rm -f $@tmp #mv $@fail $@ diff --git a/sys/debian/radare2-dev/CONFIG b/sys/debian/radare2-dev/CONFIG index 4ebe3df69e..9b5b3bf424 100644 --- a/sys/debian/radare2-dev/CONFIG +++ b/sys/debian/radare2-dev/CONFIG @@ -4,4 +4,3 @@ PRIORITY=optional MAINTAINER=pancake include ../../../config-user.mk -include ../arch.mk diff --git a/sys/debian/radare2/CONFIG b/sys/debian/radare2/CONFIG index ebbc35a233..d121d2cd68 100644 --- a/sys/debian/radare2/CONFIG +++ b/sys/debian/radare2/CONFIG @@ -4,4 +4,3 @@ PRIORITY=optional MAINTAINER=pancake include ../../../config-user.mk -include ../arch.mk