From 3e5389a9d68445286c3bb3b7f68193d9616bc7b7 Mon Sep 17 00:00:00 2001 From: CapCreeperGR Date: Thu, 4 Jul 2024 16:46:09 +0300 Subject: [PATCH] Initial Commit --- pkg.info | 7 +++++++ source.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pkg.info create mode 100644 source.sh diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..ab8fd9f --- /dev/null +++ b/pkg.info @@ -0,0 +1,7 @@ +name: nano +description: A simple text editor +version: 7.2 +url: https://www.nano-editor.org/ +license: GPL3 +architecture: any +type: source diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..9a89e37 --- /dev/null +++ b/source.sh @@ -0,0 +1,26 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The prepare function is executed in the root of the temp directory +prepare() { + wget https://www.nano-editor.org/dist/v"${BPM_PKG_VERSION%%.*}"/nano-"${BPM_PKG_VERSION}".tar.xz + tar -xvf nano-"${BPM_PKG_VERSION}".tar.xz --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +build() { + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --enable-utf8 \ + --docdir=/usr/share/doc/nano + make +} + +# The package function is executed in the source directory +package() { + make DESTDIR="$BPM_OUTPUT" install + install -v -m644 doc/{nano.html,sample.nanorc} "$BPM_OUTPUT"/usr/share/doc/nano + install -d -m755 "$BPM_OUTPUT"/usr/share/licenses/nano + install -v -m644 COPYING "$BPM_OUTPUT"/usr/share/licenses/nano/COPYING +}