diff options
| -rwxr-xr-x | bootstrap.sh | 26 | ||||
| -rw-r--r-- | sources/make/make.spec | 30 | ||||
| -rwxr-xr-x | treetap | 35 |
3 files changed, 70 insertions, 21 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 8011690..9543c82 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -17,6 +17,8 @@ export CXXFLAGS=$CFLAGS export RANLIB=llvm-ranlib export LD=ld.lld export LDFLAGS="--sysroot=$BOOTSTRAP/root" +export TREETAP=$(pwd)/treetap +export TT_DIR=$(pwd)/.treetap export TT_SYSROOT=$BOOTSTRAP/root export TT_TARGET=$TARGET @@ -24,7 +26,6 @@ export TT_TARGET=$TARGET ./treetap fetch sources/busybox/busybox.spec ./treetap fetch sources/linux/linux.spec ./treetap fetch sources/llvm/llvm.spec -./treetap fetch sources/make/make.spec ./treetap fetch sources/musl/musl.spec # Make sure both clang-tblgen and llvm-tblgen are in the PATH. ~ahill @@ -234,25 +235,10 @@ make -O -j $PROCS install CONFIG_PREFIX=$BOOTSTRAP/root cd .. # Build Make -MAKE_VERSION=$(sed -En "s/SRC_VERSION=\"?(.+)\"/\1/p" $SPEC/make/make.spec) -tar xf $SOURCES/make/$MAKE_VERSION/make-*.tar* -cd make-*/ -./configure \ - --bindir=/bin \ - --datarootdir=/usr/share \ - --enable-year2038 \ - --host=$TARGET \ - --includedir=/usr/include \ - --libdir=/lib \ - --libexecdir=/lib \ - --localstatedir=/var \ - --prefix=/ \ - --runstatedir=/run \ - --sbindir=/bin \ - --sysconfdir=/etc -make -O -j $PROCS -make -O -j $PROCS install DESTDIR=$BOOTSTRAP/root -cd .. +$TREETAP fetch $SPEC/make/make.spec +$TREETAP build $SPEC/make/make.spec +$TREETAP package $SPEC/make/make.spec +$TREETAP install .treetap/packages/$TARGET/make-*.cpio.xz $BOOTSTRAP/root # Install Treetap cp $BOOTSTRAP/../treetap $BOOTSTRAP/root/bin/
\ No newline at end of file diff --git a/sources/make/make.spec b/sources/make/make.spec index b8ac35c..99a0d08 100644 --- a/sources/make/make.spec +++ b/sources/make/make.spec @@ -2,4 +2,32 @@ SRC_HASH="dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3" SRC_NAME="make" SRC_URL="https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz" -SRC_VERSION="4.4.1"
\ No newline at end of file +SRC_VERSION="4.4.1" + +build() { + tar xf ../$SRC_FILENAME + cd make-*/ + ./configure \ + --bindir=$TT_BINDIR \ + --build=$TT_BUILD \ + --datarootdir=/usr/share \ + --enable-year2038 \ + --host=$TT_TARGET \ + --includedir=$TT_INCLUDEDIR \ + --libdir=$TT_LIBDIR \ + --libexecdir=$TT_LIBDIR \ + --localstatedir=/var \ + --prefix=$TT_PREFIX \ + --runstatedir=/run \ + --sbindir=$TT_BINDIR \ + --sysconfdir=$TT_CONFDIR + make -O -j $TT_PROCS +} + +clean() { + rm -rf make-*/ +} + +package() { + make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR +}
\ No newline at end of file @@ -34,6 +34,41 @@ # November 9, 2025 (1.0.0) # * Initial release [ahill] +######################## +# .spec File Reference # +######################## + +# For everyone trying to build .spec files (including myself), this is the list +# of useful variables to take advantage of. ~ahill + +# Specification Functions: +# build - Builds the package +# clean - Cleans $TT_BUILDDIR for the next build +# package - Installs the package contents to $TT_INSTALLDIR + +# Specification Variables: +# SRC_FILENAME - The name of the tarball to extract (optional) +# SRC_HASH - The hash of the tarball for verification purposes (required) +# SRC_NAME - The name of the package being built (required) +# SRC_URL - The URL of the tarball to be downloaded (required) +# SRC_VERSION - The version of the package being built (required) + +# Treetap Variables: +# TT_BINDIR - The desired path for binaries [scope: source] [default: /bin] +# TT_BUILD - The target triple of the build system [scope: source] +# TT_BUILDDIR - The path to the build directory [scope: source] +# TT_CONFDIR - The desired path for configuration files [scope: source] [default: /etc] +# TT_DIR - The path to the treetap directory [scope: global] +# TT_INCLUDEDIR - The desired path for header files [scope: source] [default: /usr/include] +# TT_INSTALLDIR - The path to the install directory [scope: source] +# TT_LIBDIR - The desired path for libraries [scope: source] [default: /lib] +# TT_PKGDIR - The path to the package directory [scope: global] +# TT_PREFIX - The desired prefix for the package [scope: source] [default: /] +# TT_PROCS - The number of processors on the build system [scope: source] +# TT_SYSROOT - The sysroot of the target system [scope: global] +# TT_TARGET - The target triple of the target system [scope: source] +# TT_VERSION - The version of treetap being used [scope: global] + #################### # Global Variables # #################### |
