Switch to new download format and update package scripts

This commit is contained in:
2026-04-03 20:04:53 +03:00
parent a73994431d
commit 0f4e89c26b
6 changed files with 107 additions and 28 deletions
+15 -13
View File
@@ -2,14 +2,11 @@
# 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://sourceforge.net/projects/zsh/files/zsh/${BPM_PKG_VERSION}/zsh-${BPM_PKG_VERSION}.tar.xz/download"
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
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
cd "$BPM_SOURCE"
patch -Np1 -i "$BPM_WORKDIR"/avoid-incompatible-pointer-types.patch
}
# The build function is executed in the source directory
@@ -28,19 +25,24 @@ build() {
# 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 check
HOME="$BPM_WORKDIR" make check
}
# 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/{info,doc/zs
# Install package documentation
make DESTDIR="$BPM_OUTPUT" infodir=/usr/share/info install.info
make DESTDIR="$BPM_OUTPUT" htmldir=/usr/share/doc/zsh/html install.html
mkdir -p "$BPM_OUTPUT"/usr/share/doc/zsh/
install -v -m644 zsh.{html,txt} Etc/FAQ "$BPM_OUTPUT"/usr/share/doc/zsh
install -Dm 644 ../zprofile "$BPM_OUTPUT"/etc/zsh/zprofile
install -Dm 644 ../zshrc "$BPM_OUTPUT"/etc/zsh/zshrc
install -Dm 644 LICENCE "$BPM_OUTPUT"/usr/share/licenses/zsh/COPYING
install -m644 zsh.{html,txt} Etc/FAQ -t "$BPM_OUTPUT"/usr/share/doc/zsh
# Install default zsh config files
install -d "$BPM_OUTPUT"/etc/zsh
install -m644 "$BPM_WORKDIR"/zprofile "$BPM_OUTPUT"/etc/zsh/zprofile
install -m644 "$BPM_WORKDIR"/zshrc "$BPM_OUTPUT"/etc/zsh/zshrc
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENCE "$BPM_OUTPUT"/usr/share/licenses/zsh/COPYING
}