Re-work how DIST_* is used. Fix broken PKG_STORE handling.
This commit is contained in:
parent
b1b88f656a
commit
9f58cf020e
2 changed files with 7 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# Version: 0.2.4
|
# Version: 0.2.5
|
||||||
# Package description syntax:
|
# Package description syntax:
|
||||||
# * There must be exactly 11 lines which begin with the package name and ':'.
|
# * There must be exactly 11 lines which begin with the package name and ':'.
|
||||||
# * Line up the first '|' of the ruler with the ':' following the package name.
|
# * Line up the first '|' of the ruler with the ':' following the package name.
|
||||||
|
|
@ -16,4 +16,4 @@
|
||||||
%PKG_NAME%:
|
%PKG_NAME%:
|
||||||
%PKG_NAME%: Warning: This package does not contain any configuration files.
|
%PKG_NAME%: Warning: This package does not contain any configuration files.
|
||||||
%PKG_NAME%:
|
%PKG_NAME%:
|
||||||
%PKG_NAME%: Packaged by: Darren 'Tadgy' Austin. Built for: %DIST_OS_ID%%BUILD_LIBDIRSUFFIX%-%DIST_OS_VERSION_ID%.
|
%PKG_NAME%: Packaged by: Darren 'Tadgy' Austin. Built for: %DIST_OS_ID%-%DIST_OS_VERSION_ID%.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Version: 0.6.1
|
# Version: 0.6.3
|
||||||
# Copyright (c) 2005-2022:
|
# Copyright (c) 2005-2022:
|
||||||
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
||||||
# Licensed under the terms of the GNU General Public License version 3.
|
# Licensed under the terms of the GNU General Public License version 3.
|
||||||
|
|
@ -46,7 +46,7 @@ cd "$(cd "${BASH_SOURCE[0]%/*}"; pwd -P)"
|
||||||
# Package storage path.
|
# Package storage path.
|
||||||
# Be safe and leave it in /tmp by default (can be overridden).
|
# Be safe and leave it in /tmp by default (can be overridden).
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
PKG_STORE='${PKG_STORE:-/tmp/pkg-store/$DIST_OS_ID$BUILD_LIBDIRSUFFIX-$DIST_OS_VERSION_ID}'
|
[[ -z "$PKG_STORE" ]] && PKG_STORE='/tmp/pkg-store/$DIST_OS_ID-$DIST_OS_VERSION_ID'
|
||||||
|
|
||||||
# Parse command line options.
|
# Parse command line options.
|
||||||
while (( $# > 0 )); do
|
while (( $# > 0 )); do
|
||||||
|
|
@ -111,6 +111,7 @@ case "${BUILD_ARCH:=$(uname -m)}" in
|
||||||
PKG_ARCH="${PKG_ARCH:-$BUILD_ARCH}"
|
PKG_ARCH="${PKG_ARCH:-$BUILD_ARCH}"
|
||||||
;;
|
;;
|
||||||
x86_64|x86-64)
|
x86_64|x86-64)
|
||||||
|
DIST_OS_ID="slackware64"
|
||||||
BUILD_CFLAGS="${BUILD_CFLAGS:--march=x86-64-v2 -mtune=ivybridge -O2 -fPIC}"
|
BUILD_CFLAGS="${BUILD_CFLAGS:--march=x86-64-v2 -mtune=ivybridge -O2 -fPIC}"
|
||||||
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
||||||
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
||||||
|
|
@ -119,21 +120,21 @@ case "${BUILD_ARCH:=$(uname -m)}" in
|
||||||
PKG_ARCH="${PKG_ARCH:-x86_64}"
|
PKG_ARCH="${PKG_ARCH:-x86_64}"
|
||||||
;;
|
;;
|
||||||
aarch64)
|
aarch64)
|
||||||
|
DIST_OS_ID="slackwareaarch64"
|
||||||
BUILD_CFLAGS="${BUILD_CFLAGS:-O2 -fPIC}"
|
BUILD_CFLAGS="${BUILD_CFLAGS:-O2 -fPIC}"
|
||||||
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
||||||
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
||||||
BUILD_MAKEFLAGS=( "${BUILD_MAKEFLAGS[@]}" )
|
BUILD_MAKEFLAGS=( "${BUILD_MAKEFLAGS[@]}" )
|
||||||
BUILD_LIBDIRSUFFIX="64"
|
BUILD_LIBDIRSUFFIX="64"
|
||||||
PKG_ARCH="${PKG_ARCH:-aarch64}"
|
PKG_ARCH="${PKG_ARCH:-aarch64}"
|
||||||
DIST_OS_VERSION_ID="slackwareaarch"
|
|
||||||
;;
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
|
DIST_OS_ID="slackwarearm"
|
||||||
BUILD_CFLAGS="${BUILD_CFLAGS:-O2}"
|
BUILD_CFLAGS="${BUILD_CFLAGS:-O2}"
|
||||||
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
BUILD_CXXFLAGS="${BUILD_CXXFLAGS:-$BUILD_CFLAGS}"
|
||||||
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
BUILD_LDFLAGS="${BUILD_LDFLAGS:-}"
|
||||||
BUILD_MAKEFLAGS=( "${BUILD_MAKEFLAGS[@]}" )
|
BUILD_MAKEFLAGS=( "${BUILD_MAKEFLAGS[@]}" )
|
||||||
PKG_ARCH="${PKG_ARCH:-arm}"
|
PKG_ARCH="${PKG_ARCH:-arm}"
|
||||||
DIST_OS_VERSION_ID="slackwarearm"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "Unsupported build architecture: $BUILD_ARCH"
|
die "Unsupported build architecture: $BUILD_ARCH"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue