--- freem-mk-debian-package/mk-debian-package 2025/03/13 23:42:41 1.1
+++ freem-mk-debian-package/mk-debian-package 2025/03/14 00:58:44 1.4
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
-# $Id: mk-debian-package,v 1.1 2025/03/13 23:42:41 snw Exp $
+# $Id: mk-debian-package,v 1.4 2025/03/14 00:58:44 snw Exp $
# Creates a Debian package for a specific FreeM version
#
#
@@ -26,8 +26,17 @@
# along with FreeM. If not, see .
#
# $Log: mk-debian-package,v $
-# Revision 1.1 2025/03/13 23:42:41 snw
-# Initial revision
+# Revision 1.4 2025/03/14 00:58:44 snw
+# Remove dbgsym package from upload
+#
+# Revision 1.3 2025/03/14 00:28:10 snw
+# Support Debian-specific version number
+#
+# Revision 1.2 2025/03/14 00:13:41 snw
+# Add copyright file
+#
+# Revision 1.1.1.1 2025/03/13 23:42:41 snw
+# Initial commit
#
#
# SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
@@ -37,21 +46,23 @@
PGM=$(basename $0)
function usage() {
- echo "usage: ${PGM} "
+ echo "usage: ${PGM} "
exit 1
}
-if [[ $# != 1 ]]
+if [[ $# != 3 ]]
then
usage
fi
FREEM_VERSION=$1
+FDPKG_VERSION=$2
+FDSSH=$3
SRCDIR=$(pwd)
TMPDIR=$(mktemp -d)
INFILE="freem-${FREEM_VERSION}.tar.gz"
-OUTFILE="${TMPDIR}/freem_${FREEM_VERSION}.tar.gz"
+OUTFILE="${TMPDIR}/freem_${FREEM_VERSION}.orig.tar.gz"
TARDIR="${TMPDIR}/freem-${FREEM_VERSION}"
URL="https://freem.coherent-logic.com/downloads/freem-${FREEM_VERSION}.tar.gz"
@@ -75,8 +86,6 @@ else
exit 1
fi
-sed -i "s/FREEM_VERSION/${FREEM_VERSION}/g" debian/changelog
-
echo -n "${PGM}: copying Debian packaging control info to ${TARDIR}..."
cp -r debian "${TARDIR}/"
if [[ $? == 0 ]]
@@ -87,6 +96,14 @@ else
exit 1
fi
+sed -i "s/FREEM_VERSION/${FREEM_VERSION}-${FDPKG_VERSION}/g" "${TARDIR}/debian/changelog"
+
echo "${PGM}: building the package..."
cd "${TARDIR}"
+export DEB_BUILD_MAINT_OPTIONS=hardening=-fortify,-format,-stackprotector,-stackprotectorstrong
debuild -us -uc
+
+echo "${PGM}: the package is in ${TMPDIR}"
+
+rm -f ${TMPDIR}/*dbgsym*
+scp ${TMPDIR}/*.deb "${FDSSH}://var/www/freem.coherent-logic.com/downloads/binaries/debian/"