#!/usr/bin/env bash
#
# $Id: fmd-package,v 1.3 2025/04/07 00:45:52 snw Exp $
# Prepare a binary package for the current platform
#
#
# Author: Serena Willis <snw@coherent-logic.com>
# Copyright (C) 2025 Coherent Logic Development LLC
#
#
# This file is part of FreeM.
#
# FreeM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FreeM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with FreeM. If not, see <https://www.gnu.org/licenses/>.
#
# $Log: fmd-package,v $
# Revision 1.3 2025/04/07 00:45:52 snw
# Enhance fmd-pkg-dpkg to auto-generate the debian/changelog file from the FreeM ChangeLog
#
# Revision 1.2 2025/04/06 05:01:21 snw
# Initial working implementation of fmd package for dpkg
#
# Revision 1.1 2025/04/06 03:38:05 snw
# Prepare for adding packaging functionality to fmd
#
#
# SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
# SPDX-License-Identifier: AGPL-3.0-or-later
#
PGM=$(basename $0)
SCRIPT_DIR=$(dirname "$0")
function usage() {
echo
echo "Builds a binary package of the current FreeM code"
echo
echo "usage:"
echo
echo " fmd package"
echo
echo "NOTE: You cannot build a package for a different"
echo " platform. That is, if you're running on a"
echo " Solaris system, you can only build a Solaris"
echo " package."
echo
exit 0
}
if [[ $1 == "help" ]]
then
usage
fi
if [[ $# != 1 ]]
then
echo "package: must be run from 'fmd package'"
exit 1
fi
if [[ ${_fmd_can_package} == 0 ]]
then
echo "package: FreeM does not yet support binary packages on ${_fmd_distribution} ${_fmd_kernel}"
exit 1
else
echo "package: building ${_fmd_pkg_mechanism} package on ${_fmd_distribution} ${_fmd_kernel}"
fi
CMDSCRIPT="${SCRIPT_DIR}/fmd-pkg-${_fmd_pkg_mechanism}"
if [[ -f "${CMDSCRIPT}" ]]
then
${CMDSCRIPT} $1 $2
else
echo "package: ${CMDSCRIPT} not found"
fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>