Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Set minimum dependencies for Debian packages. #6633

Merged
merged 3 commits into from
Jan 29, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions scripts/generate_deb.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,34 @@ fi

NAME="${PROJECT}_${VERSION_NO_SUFFIX}-${RELEASE}_amd64"

if [[ -f /etc/upstream-release/lsb-release ]]; then
source /etc/upstream-release/lsb-release
elif [[ -f /etc/lsb-release ]]; then
source /etc/lsb-release
else
echo "Unrecognized Debian derivative. Not generating .deb file."
exit 1
fi

if [ ${DISTRIB_RELEASE} = "16.04" ]; then
LIBSSL="libssl1.0.0"
elif [ ${DISTRIB_RELEASE} = "18.04" ]; then
LIBSSL="libssl1.1"
else
echo "Unrecognized Ubuntu version. Update generate_deb.sh. Not generating .deb file."
exit 1
fi

mkdir -p ${PROJECT}/DEBIAN
chmod 0755 ${PROJECT}/DEBIAN
echo "Package: ${PROJECT}
echo "Package: ${PROJECT}
Version: ${VERSION_NO_SUFFIX}-${RELEASE}
Section: devel
Priority: optional
Depends: libbz2-dev (>= 1.0), libssl-dev (>= 1.0), libgmp3-dev, build-essential, libicu-dev, zlib1g-dev, libtinfo5
Depends: libc6, libgcc1, ${LIBSSL}, libstdc++6, libtinfo5, zlib1g
Architecture: amd64
Homepage: ${URL}
Maintainer: ${EMAIL}
Homepage: ${URL}
Maintainer: ${EMAIL}
Description: ${DESC}" &> ${PROJECT}/DEBIAN/control

export PREFIX
Expand All @@ -32,8 +50,8 @@ export SSUBPREFIX

bash generate_tarball.sh ${NAME}.tar.gz

tar -xvzf ${NAME}.tar.gz -C ${PROJECT}
dpkg-deb --build ${PROJECT}
tar -xvzf ${NAME}.tar.gz -C ${PROJECT}
jgiszczak marked this conversation as resolved.
Show resolved Hide resolved
dpkg-deb --build ${PROJECT}
BUILDSTATUS=$?
mv ${PROJECT}.deb ${NAME}.deb
rm -r ${PROJECT}
Expand Down