commit e48dc93adcd660fbea62cd615b611e01741e7103 Author: ItzYanick Date: Fri May 12 19:44:52 2023 +0200 first commit diff --git a/YAPMBUILD.toml b/YAPMBUILD.toml new file mode 100644 index 0000000..13b64bb --- /dev/null +++ b/YAPMBUILD.toml @@ -0,0 +1,23 @@ +[package] +name = "nano" +description = "a simple editor, inspired by Pico" +version = "7.2" +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] \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..bde3194 --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +cd build + +echo "Building glibc..." +../nano-$YAPM_PACKAGE_VERSION/configure --target=$YAPM_BUILD_TARGET +make -j$(nproc) diff --git a/download.sh b/download.sh new file mode 100755 index 0000000..bcec972 --- /dev/null +++ b/download.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# check if downloaded file exists +if [ -f nano-$YAPM_PACKAGE_VERSION.tar.gz ]; then + echo "nano-$YAPM_PACKAGE_VERSION.tar.gz already exists. Skipping download." + exit 0 +fi + +echo "Downloading nano source code..." +# download nano source code +wget https://www.nano-editor.org/dist/v7/nano-$YAPM_PACKAGE_VERSION.tar.gz -O nano-$YAPM_PACKAGE_VERSION.tar.gz + +# ToDo: Verify checksum diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..78e24fe --- /dev/null +++ b/install.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +cd build + +echo "Installing nano into install dir..." +make -j$(nproc) install DESTDIR=$YAPM_INSTALL_DIR diff --git a/prepare.sh b/prepare.sh new file mode 100755 index 0000000..a793cf4 --- /dev/null +++ b/prepare.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +tar -xf nano-$YAPM_PACKAGE_VERSION.tar.gz + +mkdir -p build