Initial commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# Exclude bpm archives
|
||||||
|
*.bpm
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
URL="https://www.7-zip.org/history.txt"
|
||||||
|
|
||||||
|
# Get version number from tag name
|
||||||
|
VERSION=$(curl -s -L "$URL" | grep -B1 '\-------------------------' | head -n1 | grep -o -E '(([0-9]*)\.([0-9]*))')
|
||||||
|
|
||||||
|
echo "$VERSION"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
name: 7zip
|
||||||
|
description: File archiver with a high compression ratio
|
||||||
|
version: 25.00
|
||||||
|
url: https://www.7-zip.org/
|
||||||
|
license: LGPL-2.1-or-later,BSD-3-Clause,unRar
|
||||||
|
architecture: any
|
||||||
|
depends: ["gcc","glibc"]
|
||||||
|
type: source
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# 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://7-zip.org/a/7z${BPM_PKG_VERSION//./}-src.tar.xz"
|
||||||
|
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" -C "$BPM_SOURCE"
|
||||||
|
}
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
build() {
|
||||||
|
export CFLAGS="$CFLAGS -Wno-error=unused-macros"
|
||||||
|
export CPPFLAGS="$CPPFLAGS -Wno-error=unused-macros"
|
||||||
|
for i in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do
|
||||||
|
make -C CPP/7zip/$i -f ../../cmpl_gcc.mak \
|
||||||
|
LFLAGS_STRIP= \
|
||||||
|
CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \
|
||||||
|
CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# The package function is executed in the source directory
|
||||||
|
# This function is used to move the compiled files into the output directory
|
||||||
|
package() {
|
||||||
|
install -Dm755 CPP/7zip/Bundles/Alone{/b/g/7za,7z/b/g/7zr} \
|
||||||
|
CPP/7zip/Bundles/Format7zF/b/g/7z.so \
|
||||||
|
CPP/7zip/UI/Console/b/g/7z \
|
||||||
|
-t "$BPM_OUTPUT"/usr/lib/7zip/
|
||||||
|
|
||||||
|
install -Dm755 CPP/7zip/Bundles/SFXCon/b/g/7zCon "$BPM_OUTPUT"/usr/lib/7zip/7zCon.sfx
|
||||||
|
|
||||||
|
for _prog in 7za 7zr 7z; do
|
||||||
|
printf '#!/bin/sh\nexec /usr/lib/7zip/%s "$@"\n' "$_prog" | install -D /dev/stdin "$BPM_OUTPUT"/usr/bin/"$_prog"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
|
install -Dm644 "$BPM_SOURCE"/DOC/License.txt "$BPM_OUTPUT"/usr/share/licenses/7zip/License.txt
|
||||||
|
install -Dm644 "$BPM_SOURCE"/DOC/unRarLicense.txt "$BPM_OUTPUT"/usr/share/licenses/7zip/unRarLicense.txt
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user