version 1.1, 2025/03/13 23:42:41
|
version 1.6, 2025/04/04 02:50:44
|
Line 26
|
Line 26
|
# along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
# along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
# |
# |
# $Log$ |
# $Log$ |
# Revision 1.1 2025/03/13 23:42:41 snw |
# Revision 1.6 2025/04/04 02:50:44 snw |
# Initial revision |
# Prepare build scripts for 0.63.0 |
|
# |
|
# Revision 1.5 2025/04/03 03:52:38 snw |
|
# Prepare Debian packaging infra for 0.63 series |
|
# |
|
# 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 |
# SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC |
Line 37
|
Line 52
|
PGM=$(basename $0) |
PGM=$(basename $0) |
|
|
function usage() { |
function usage() { |
echo "usage: ${PGM} <freem-version>" |
echo "usage: ${PGM} <freem-version> <package-version> <ssh-server>" |
exit 1 |
exit 1 |
} |
} |
|
|
if [[ $# != 1 ]] |
if [[ $# != 3 ]] |
then |
then |
usage |
usage |
fi |
fi |
|
|
FREEM_VERSION=$1 |
FREEM_VERSION=$1 |
|
FREEM_VERSION_MOD=$(echo "${FREEM_VERSION}" | sed 's/-/./g') |
|
FDPKG_VERSION=$2 |
|
FDSSH=$3 |
|
|
SRCDIR=$(pwd) |
SRCDIR=$(pwd) |
TMPDIR=$(mktemp -d) |
TMPDIR=$(mktemp -d) |
INFILE="freem-${FREEM_VERSION}.tar.gz" |
INFILE="freem-${FREEM_VERSION}.tar.gz" |
OUTFILE="${TMPDIR}/freem_${FREEM_VERSION}.tar.gz" |
OUTFILE="${TMPDIR}/freem_${FREEM_VERSION_MOD}.orig.tar.gz" |
TARDIR="${TMPDIR}/freem-${FREEM_VERSION}" |
TARDIR="${TMPDIR}/freem-${FREEM_VERSION_MOD}" |
|
|
URL="https://freem.coherent-logic.com/downloads/freem-${FREEM_VERSION}.tar.gz" |
URL="https://freem.coherent-logic.com/downloads/freem-${FREEM_VERSION}.tar.gz" |
echo -n "${PGM}: downloading ${URL} to ${OUTFILE}..." |
echo -n "${PGM}: downloading ${URL} to ${OUTFILE}..." |
Line 67 fi
|
Line 85 fi
|
|
|
echo -n "${PGM}: extracting ${OUTFILE} to ${TARDIR}..." |
echo -n "${PGM}: extracting ${OUTFILE} to ${TARDIR}..." |
tar zxf "${OUTFILE}" -C "${TMPDIR}" |
tar zxf "${OUTFILE}" -C "${TMPDIR}" |
|
if [[ "${FREEM_VERSION}" != "${FREEM_VERSION_MOD}" ]] |
|
then |
|
mv "${TMPDIR}/freem-${FREEM_VERSION}" "${TMPDIR}/freem-${FREEM_VERSION_MOD}" |
|
fi |
if [[ $? == 0 ]] |
if [[ $? == 0 ]] |
then |
then |
echo "[OK]" |
echo "[OK]" |
Line 75 else
|
Line 97 else
|
exit 1 |
exit 1 |
fi |
fi |
|
|
sed -i "s/FREEM_VERSION/${FREEM_VERSION}/g" debian/changelog |
|
|
|
echo -n "${PGM}: copying Debian packaging control info to ${TARDIR}..." |
echo -n "${PGM}: copying Debian packaging control info to ${TARDIR}..." |
cp -r debian "${TARDIR}/" |
cp -r debian "${TARDIR}/" |
if [[ $? == 0 ]] |
if [[ $? == 0 ]] |
Line 87 else
|
Line 107 else
|
exit 1 |
exit 1 |
fi |
fi |
|
|
|
sed -i "s/FREEM_VERSION/${FREEM_VERSION_MOD}-${FDPKG_VERSION}/g" "${TARDIR}/debian/changelog" |
|
sed -i "s/FREEM_VERSION/${FREEM_VERSION}-${FDPKG_VERSION}/g" "${TARDIR}/debian/control" |
|
|
echo "${PGM}: building the package..." |
echo "${PGM}: building the package..." |
cd "${TARDIR}" |
cd "${TARDIR}" |
|
export DEB_BUILD_MAINT_OPTIONS=hardening=-fortify,-format,-stackprotector,-stackprotectorstrong |
debuild -us -uc |
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/" |