Annotation of freem/scripts/fmd-package, revision 1.3
1.1 snw 1: #!/usr/bin/env bash
2:
3: #
1.3 ! snw 4: # $Id: fmd-package,v 1.2 2025/04/06 05:01:21 snw Exp $
1.1 snw 5: # Prepare a binary package for the current platform
6: #
7: #
8: # Author: Serena Willis <snw@coherent-logic.com>
9: # Copyright (C) 2025 Coherent Logic Development LLC
10: #
11: #
12: # This file is part of FreeM.
13: #
14: # FreeM is free software: you can redistribute it and/or modify
15: # it under the terms of the GNU Affero Public License as published by
16: # the Free Software Foundation, either version 3 of the License, or
17: # (at your option) any later version.
18: #
19: # FreeM is distributed in the hope that it will be useful,
20: # but WITHOUT ANY WARRANTY; without even the implied warranty of
21: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22: # GNU Affero Public License for more details.
23: #
24: # You should have received a copy of the GNU Affero Public License
25: # along with FreeM. If not, see <https://www.gnu.org/licenses/>.
26: #
1.2 snw 27: # $Log: fmd-package,v $
1.3 ! snw 28: # Revision 1.2 2025/04/06 05:01:21 snw
! 29: # Initial working implementation of fmd package for dpkg
! 30: #
1.2 snw 31: # Revision 1.1 2025/04/06 03:38:05 snw
32: # Prepare for adding packaging functionality to fmd
33: #
1.1 snw 34: #
35: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
36: # SPDX-License-Identifier: AGPL-3.0-or-later
37: #
38:
39: PGM=$(basename $0)
40: SCRIPT_DIR=$(dirname "$0")
41:
42: function usage() {
43: echo
44: echo "Builds a binary package of the current FreeM code"
45: echo
46: echo "usage:"
47: echo
48: echo " fmd package"
49: echo
50: echo "NOTE: You cannot build a package for a different"
51: echo " platform. That is, if you're running on a"
52: echo " Solaris system, you can only build a Solaris"
53: echo " package."
54: echo
55: exit 0
56: }
57:
58: if [[ $1 == "help" ]]
59: then
60: usage
61: fi
62:
1.3 ! snw 63: if [[ $# != 1 ]]
1.1 snw 64: then
65: echo "package: must be run from 'fmd package'"
66: exit 1
67: fi
68:
69: if [[ ${_fmd_can_package} == 0 ]]
70: then
1.2 snw 71: echo "package: FreeM does not yet support binary packages on ${_fmd_distribution} ${_fmd_kernel}"
1.1 snw 72: exit 1
73: else
1.2 snw 74: echo "package: building ${_fmd_pkg_mechanism} package on ${_fmd_distribution} ${_fmd_kernel}"
1.1 snw 75: fi
76:
1.2 snw 77: CMDSCRIPT="${SCRIPT_DIR}/fmd-pkg-${_fmd_pkg_mechanism}"
78:
79: if [[ -f "${CMDSCRIPT}" ]]
80: then
81: ${CMDSCRIPT} $1 $2
82: else
83: echo "package: ${CMDSCRIPT} not found"
84: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>