version 1.1.1.1, 2025/03/13 23:42:41
|
version 1.3, 2025/03/14 00:28:10
|
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.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 |
# Revision 1.1.1.1 2025/03/13 23:42:41 snw |
# Initial commit |
# Initial commit |
# |
# |
Line 37
|
Line 43
|
PGM=$(basename $0) |
PGM=$(basename $0) |
|
|
function usage() { |
function usage() { |
echo "usage: ${PGM} <freem-version>" |
echo "usage: ${PGM} <freem-version> <package-version>" |
exit 1 |
exit 1 |
} |
} |
|
|
if [[ $# != 1 ]] |
if [[ $# != 2 ]] |
then |
then |
usage |
usage |
fi |
fi |
|
|
FREEM_VERSION=$1 |
FREEM_VERSION=$1 |
|
FDPKG_VERSION=$2 |
|
|
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}.orig.tar.gz" |
TARDIR="${TMPDIR}/freem-${FREEM_VERSION}" |
TARDIR="${TMPDIR}/freem-${FREEM_VERSION}" |
|
|
URL="https://freem.coherent-logic.com/downloads/freem-${FREEM_VERSION}.tar.gz" |
URL="https://freem.coherent-logic.com/downloads/freem-${FREEM_VERSION}.tar.gz" |
Line 75 else
|
Line 82 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 92 else
|
exit 1 |
exit 1 |
fi |
fi |
|
|
|
sed -i "s/FREEM_VERSION/${FREEM_VERSION}-${FDPKG_VERSION}/g" "${TARDIR}/debian/changelog" |
|
|
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 |