first commit

This commit is contained in:
ItzYanick 2023-05-12 18:55:42 +02:00
commit e5aa7ab72c
No known key found for this signature in database
GPG key ID: 0E3DB1F28A357B8A
5 changed files with 75 additions and 0 deletions

23
YAPMBUILD.toml Normal file
View file

@ -0,0 +1,23 @@
[package]
name = "glibc"
description = "GNU C Library"
version = "2.37"
subversion = "1"
authors = ["GNU Project"]
packagers = ["ItzYanick"]
[source]
script = "./download.sh"
[prepare]
script = "./prepare.sh"
[build]
script = "./build.sh"
[install]
script = "./install.sh"
[dependencies]
[dependencies.build]

9
build.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
cd build
echo "Building glibc..."
../glibc-$YAPM_PACKAGE_VERSION/configure --prefix=/usr --target=$YAPM_BUILD_TARGET
make -j$(nproc)

15
download.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e
# check if downloaded file exists
if [ -f glibc-$YAPM_PACKAGE_VERSION.tar.gz ]; then
echo "glibc-$YAPM_PACKAGE_VERSION.tar.gz already exists. Skipping download."
exit 0
fi
echo "Downloading glibc source code..."
# download glibc source code
wget https://ftp.gnu.org/gnu/glibc/glibc-$YAPM_PACKAGE_VERSION.tar.gz -O glibc-$YAPM_PACKAGE_VERSION.tar.gz
# ToDo: Verify checksum

21
install.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
set -e
cd build
echo "Installing glibc into install dir..."
make -j$(nproc) install DESTDIR=$YAPM_INSTALL_DIR
# strip recursivly
strip -g $YAPM_INSTALL_DIR/bin/* \
$YAPM_INSTALL_DIR/sbin/* \
$YAPM_INSTALL_DIR/lib/* \
$YAPM_INSTALL_DIR/lib64/* \
$YAPM_INSTALL_DIR/usr/bin/* \
$YAPM_INSTALL_DIR/usr/sbin/* \
$YAPM_INSTALL_DIR/usr/lib/* \
$YAPM_INSTALL_DIR/usr/lib64/* \
$YAPM_INSTALL_DIR/usr/lib64/*/* \
$YAPM_INSTALL_DIR/usr/libexec/* ||
true

7
prepare.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
set -e
tar -xf glibc-$YAPM_PACKAGE_VERSION.tar.gz
mkdir -p build