first commit

This commit is contained in:
ItzYanick 2023-05-12 19:44:52 +02:00
commit e48dc93adc
No known key found for this signature in database
GPG key ID: 0E3DB1F28A357B8A
5 changed files with 62 additions and 0 deletions

23
YAPMBUILD.toml Normal file
View file

@ -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]

9
build.sh Executable file
View file

@ -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)

15
download.sh Executable file
View file

@ -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

8
install.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
set -e
cd build
echo "Installing nano into install dir..."
make -j$(nproc) install DESTDIR=$YAPM_INSTALL_DIR

7
prepare.sh Executable file
View file

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