From 7181da9e350b17eacc831277f3a04ae7dd60aba4 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 9 Sep 2024 11:32:46 +0000 Subject: [PATCH] Initial Commit --- pkg.info | 9 +++++++++ source.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 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..2b715c4 --- /dev/null +++ b/pkg.info @@ -0,0 +1,9 @@ +name: vim +description: A highly configurable text editor +version: 9.1.0041 +url: https://www.vim.org/ +license: custom +architecture: any +depends: ["acl","attr","glibc","python3","ncurses","tcl"] +make_depends: ["acl","attr","bash","binutils","coreutils","diffutils","gcc","glibc","grep","make","ncurses","sed"] +type: source diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..79fbc55 --- /dev/null +++ b/source.sh @@ -0,0 +1,36 @@ +# 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 + +DOWNLOAD="https://github.com/vim/vim/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h + ./configure --prefix=/usr + make +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + make test +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + mkdir -p "$BPM_OUTPUT"/usr/share/doc/ + ln -sfv ../vim/vim91/doc "$BPM_OUTPUT"/usr/share/doc/vim + install -Dm644 runtime/doc/uganda.txt "$BPM_OUTPUT"/usr/share/licenses/vim/license.txt +}