|
|
| version 1.1, 2025/03/08 02:12:22 | version 1.7, 2025/03/10 15:13:18 |
|---|---|
| Line 1 | Line 1 |
| #!/usr/bin/bash | #!/usr/bin/bash |
| PKGTMP="/tmp/CLDWfreem" | # |
| # $Id$ | |
| # Solaris package builder | |
| # | |
| # | |
| # Author: Serena Willis <snw@coherent-logic.com> | |
| # Copyright (C) 1998 MUG Deutschland | |
| # Copyright (C) 2023, 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$ | |
| # Revision 1.7 2025/03/10 15:13:18 snw | |
| # Enhance mk-solaris-package script to validate arguments | |
| # | |
| # Revision 1.6 2025/03/09 19:14:24 snw | |
| # First phase of REUSE compliance and header reformat | |
| # | |
| # | |
| # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| # | |
| OLDDIR=$(pwd) | PGM=$(basename $0) |
| DISTROOT="../../../../" | |
| rm -rf "${PKGTMP}" | if [[ $# != 2 ]] |
| then | |
| echo "usage: ${PGM} <architecture> <os>" | |
| echo " <architecture> should be sparc, sparcv9, i386, or amd64" | |
| echo " <os> should be solaris or openindiana" | |
| exit 1 | |
| fi | |
| cd "${DISTROOT}" | |
| ./configure --prefix=${PKGTMP} | PKG=CLDfreem |
| make clean | ARCH=$1 |
| make | OS=$2 |
| make install | VERS=$(cat sem.ver) |
| ./configure --prefix=/usr/local | SOLVER=$(uname -a | cut -d' ' -f3) |
| make clean | PKGFILE=${PKG}-${VERS}-${OS}${SOLVER}-${ARCH}.pkg |
| make | |
| cp src/freem ${PKGTMP}/bin/ | cat <<EOF > pkginfo |
| cp src/fmadm ${PKGTMP}/bin/ | PKG=${PKG} |
| cd "${OLDDIR}" | NAME=Coherent Logic Development FreeM programming language and database. |
| ARCH=${ARCH} | |
| cat <<EOF > "${PKGTMP}/pkginfo" | VERSION=${VERS} |
| PKG=CLDWfreem | |
| NAME=FreeM programming language and database. | |
| ARCH=sparcv9 | |
| VERSION=$(cat ../../../../sem.ver) | |
| CATEGORY=application | CATEGORY=application |
| BASEDIR=/usr/local | BASEDIR=/usr/local |
| EOF | EOF |
| pkgmk -o -d /tmp -a ${ARCH} | |
| touch ${PKGFILE} | |
| pkgtrans -s /tmp ${PKGFILE} ${PKG} | |
| rm -r /tmp/${PKG} |