upgpkg: peazip-10.6.1: rewrite PKGBUILD
This commit is contained in:
parent
0124509ce7
commit
e79af37819
2 changed files with 132 additions and 77 deletions
12
.SRCINFO
12
.SRCINFO
|
|
@ -1,19 +1,21 @@
|
||||||
pkgbase = peazip
|
pkgbase = peazip
|
||||||
pkgdesc = Cross-platform file and archive manager (Qt6)
|
pkgdesc = Cross-platform file and archive manager (Qt6)
|
||||||
pkgver = 10.3.0
|
pkgver = 10.6.1
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/peazip/PeaZip
|
url = https://github.com/peazip/PeaZip
|
||||||
arch = i686
|
arch = i686
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = LGPL-3.0-or-later
|
license = LGPL-3.0-or-later
|
||||||
|
makedepends = fpc
|
||||||
|
makedepends = fpc-src
|
||||||
makedepends = lazarus
|
makedepends = lazarus
|
||||||
makedepends = xmlstarlet
|
makedepends = xmlstarlet
|
||||||
depends = qt6pas
|
depends = qt6pas
|
||||||
optdepends = unace
|
optdepends = unace: Proprietary ace archives
|
||||||
optdepends = upx
|
optdepends = upx: Executable packer for several executable formats
|
||||||
options = !debug
|
options = !debug
|
||||||
source = peazip-10.3.0-17ecdd1.tar.gz::https://github.com/peazip/PeaZip/archive/17ecdd1cc0951a81823f26cc4c44d310464ae319.tar.gz
|
source = peazip-10.6.1.tar.gz::https://github.com/peazip/PeaZip/archive/10.6.1.tar.gz
|
||||||
sha256sums = SKIP
|
sha256sums = 93d5145d09279db1b168469251e4b3b64b59ea13b2cfb0f487e1fd26a5d40b6b
|
||||||
|
|
||||||
pkgname = peazip
|
pkgname = peazip
|
||||||
depends = qt6pas
|
depends = qt6pas
|
||||||
|
|
|
||||||
109
PKGBUILD
109
PKGBUILD
|
|
@ -1,8 +1,7 @@
|
||||||
# Maintainer:
|
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
|
||||||
|
|
||||||
## options
|
## options
|
||||||
: ${_widgets=qt6}
|
: "${_widgets=qt6}"
|
||||||
: ${_commit=17ecdd1cc0951a81823f26cc4c44d310464ae319}
|
|
||||||
|
|
||||||
_pkgname="peazip"
|
_pkgname="peazip"
|
||||||
pkgname="$_pkgname"
|
pkgname="$_pkgname"
|
||||||
|
|
@ -10,16 +9,22 @@ pkgver=10.6.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Cross-platform file and archive manager (${_widgets^})"
|
pkgdesc="Cross-platform file and archive manager (${_widgets^})"
|
||||||
url="https://github.com/peazip/PeaZip"
|
url="https://github.com/peazip/PeaZip"
|
||||||
license=('LGPL-3.0-or-later')
|
license=(
|
||||||
arch=('i686' 'x86_64')
|
LGPL-3.0-or-later
|
||||||
|
)
|
||||||
|
arch=(
|
||||||
|
i686
|
||||||
|
x86_64
|
||||||
|
)
|
||||||
makedepends=(
|
makedepends=(
|
||||||
'lazarus'
|
fpc
|
||||||
'xmlstarlet'
|
fpc-src
|
||||||
|
lazarus
|
||||||
|
xmlstarlet
|
||||||
)
|
)
|
||||||
optdepends=(
|
optdepends=(
|
||||||
'unace'
|
'unace: Proprietary ace archives'
|
||||||
'upx'
|
'upx: Executable packer for several executable formats'
|
||||||
)
|
)
|
||||||
|
|
||||||
case "${_widgets::1}" in
|
case "${_widgets::1}" in
|
||||||
|
|
@ -33,10 +38,12 @@ esac
|
||||||
|
|
||||||
options=('!debug')
|
options=('!debug')
|
||||||
|
|
||||||
_pkgsrc="PeaZip-$_commit"
|
_pkgsrc="PeaZip-$pkgver"
|
||||||
_pkgext="tar.gz"
|
_pkgext="tar.gz"
|
||||||
source=("$_pkgname-$pkgver-${_commit::7}.$_pkgext"::"https://github.com/peazip/PeaZip/archive/$_commit.$_pkgext")
|
source=(
|
||||||
sha256sums=('e46a390c9eb34803c3ab2c95dc075baa4895c042bf535b1a5de26f6cffa62f49')
|
"$_pkgname-$pkgver.$_pkgext::$url/archive/$pkgver.$_pkgext"
|
||||||
|
)
|
||||||
|
b2sums=('93d5145d09279db1b168469251e4b3b64b59ea13b2cfb0f487e1fd26a5d40b6b')
|
||||||
|
|
||||||
_packets=(
|
_packets=(
|
||||||
"$_pkgsrc"/peazip-sources/dev/metadarkstyle/metadarkstyle.lpk
|
"$_pkgsrc"/peazip-sources/dev/metadarkstyle/metadarkstyle.lpk
|
||||||
|
|
@ -55,10 +62,48 @@ prepare() {
|
||||||
-e 's&(\bHSHAREPATH\b\s*)=\s*'\'\'';&\1= '\'"/usr/share/$_pkgname/"\'';&' \
|
-e 's&(\bHSHAREPATH\b\s*)=\s*'\'\'';&\1= '\'"/usr/share/$_pkgname/"\'';&' \
|
||||||
-i "$_pkgsrc/peazip-sources/dev/peach.pas"
|
-i "$_pkgsrc/peazip-sources/dev/peach.pas"
|
||||||
|
|
||||||
|
# check for version mismatch
|
||||||
|
local PEAZIPVERSION PEAZIPREVISION
|
||||||
|
PEAZIPVERSION=$(grep -Po1 "(?<=PEAZIPVERSION\s?=\s?')([0-9.]+)(?=';)" "$_pkgsrc/peazip-sources/dev/peach.pas")
|
||||||
|
PEAZIPREVISION=$(grep -Po1 "(?<=PEAZIPREVISION\s?=\s?')([0-9.]+)(?=';)" "$_pkgsrc/peazip-sources/dev/peach.pas")
|
||||||
|
if [[ "$pkgver" != "${PEAZIPVERSION:-0.0}${PEAZIPREVISION:=.0}" ]]; then
|
||||||
|
printf "%s warning: %sversion mismatch.%s %s != %s\n" \
|
||||||
|
"$(
|
||||||
|
tput setaf 3
|
||||||
|
tput bold
|
||||||
|
)" \
|
||||||
|
"$(tput setaf 7)" \
|
||||||
|
"$(tput sgr0)" \
|
||||||
|
"$pkgver" \
|
||||||
|
"${PEAZIPVERSION:-0.0}${PEAZIPREVISION:=.0}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove buttons from about dialog
|
||||||
|
local _buttons=(
|
||||||
|
Form_peach.baboutbin
|
||||||
|
Form_peach.baboutchangelog
|
||||||
|
Form_peach.baboutfaq
|
||||||
|
Form_peach.baboutlocalhelp
|
||||||
|
Form_peach.baboutplugindir
|
||||||
|
Form_peach.baboutplugins
|
||||||
|
Form_peach.baboutremoveunace
|
||||||
|
Form_peach.baboutremoveunrar
|
||||||
|
Form_peach.baboutsupport
|
||||||
|
Form_peach.baboutthemes
|
||||||
|
Form_peach.babouttos
|
||||||
|
Form_peach.babouttracker
|
||||||
|
Form_peach.babouttranslations
|
||||||
|
Form_peach.baboutup
|
||||||
|
Form_peach.baboutweb
|
||||||
|
)
|
||||||
|
for i in "${_buttons[@]}"; do
|
||||||
|
sed -E -e "/^${i//./\\.}.Caption:=/s&^.*\$&${i}.Visible:=False;&" -i "$_pkgsrc/peazip-sources/dev/peach.pas"
|
||||||
|
done
|
||||||
|
|
||||||
# compiler/linker options
|
# compiler/linker options
|
||||||
for i in ${_packets[@]}; do
|
for i in "${_packets[@]}"; do
|
||||||
xmlstarlet edit --inplace --delete '//Other' "$i"
|
xmlstarlet edit --inplace --delete '//Other' "$i"
|
||||||
sed -E 's&(</CompilerOptions>)&<Other><CustomOptions Value='\''-O3 -Sa -CX -XX -k"--sort-common --as-needed -z relro -z now -z ibt -z shstk"'\''/></Other>\n\1&' \
|
sed -E 's&(</CompilerOptions>)&<Other><CustomOptions Value="-O3 -Sa -CX -XX -k--sort-common -k--as-needed -k-z -krelro -k-z -know -k-z -kibt -k-z -kshstk"/></Other>\n\1&' \
|
||||||
-i "$i"
|
-i "$i"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
@ -73,40 +118,48 @@ build() {
|
||||||
--widgetset="$_widgets"
|
--widgetset="$_widgets"
|
||||||
)
|
)
|
||||||
|
|
||||||
for i in ${_packets[@]}; do
|
for i in "${_packets[@]}"; do
|
||||||
lazbuild "${_laz_opts[@]}" "$i"
|
lazbuild "${_laz_opts[@]}" "$i"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
depends+=(
|
depends+=(
|
||||||
'7zip'
|
7zip
|
||||||
'brotli'
|
brotli
|
||||||
'zstd'
|
glibc
|
||||||
|
hicolor-icon-theme
|
||||||
|
libx11
|
||||||
|
zstd
|
||||||
)
|
)
|
||||||
depends+=('hicolor-icon-theme')
|
|
||||||
|
|
||||||
local _path_src
|
local _path_src
|
||||||
|
|
||||||
# binaries
|
# binaries
|
||||||
_path_src="$_pkgsrc/peazip-sources/dev"
|
_path_src="$_pkgsrc/peazip-sources/dev"
|
||||||
install -Dm755 "$_path_src/peazip" "$pkgdir/usr/bin/peazip"
|
install -Dm755 "$_path_src/peazip" \
|
||||||
install -Dm755 "$_path_src/pea" "$pkgdir/usr/bin/pea"
|
"$pkgdir/usr/bin/peazip"
|
||||||
|
install -Dm755 "$_path_src/pea" \
|
||||||
|
"$pkgdir/usr/bin/pea"
|
||||||
|
|
||||||
# icons
|
# icons
|
||||||
_path_src="$_pkgsrc/peazip-sources/res/share/icons"
|
_path_src="$_pkgsrc/peazip-sources/res/share/icons"
|
||||||
install -Dm644 "$_path_src"/peazip_{7z,rar,zip}.png -t "$pkgdir/usr/share/icons/hicolor/256x256/mimetypes"
|
install -Dm644 "$_path_src"/peazip_{7z,rar,zip}.png \
|
||||||
install -Dm644 "$_path_src"/peazip_{add,extract,browse,convert}.png -t "$pkgdir/usr/share/icons/hicolor/256x256/actions"
|
-t "$pkgdir/usr/share/icons/hicolor/256x256/mimetypes"
|
||||||
|
install -Dm644 "$_path_src"/peazip_{add,extract,browse,convert}.png \
|
||||||
|
-t "$pkgdir/usr/share/icons/hicolor/256x256/actions"
|
||||||
|
|
||||||
# launcher
|
# launcher
|
||||||
_path_src="$_pkgsrc/peazip-sources/res/share/batch/freedesktop_integration"
|
_path_src="$_pkgsrc/peazip-sources/res/share/batch/freedesktop_integration"
|
||||||
install -Dm644 "$_path_src"/peazip.png -t "${pkgdir}/usr/share/icons/hicolor/256x256/apps"
|
install -Dm644 "$_path_src"/peazip.png \
|
||||||
install -Dm644 "$_path_src"/peazip.desktop -t "$pkgdir/usr/share/applications"
|
-t "${pkgdir}/usr/share/icons/hicolor/256x256/apps"
|
||||||
|
install -Dm644 "$_path_src"/peazip.desktop \
|
||||||
|
-t "$pkgdir/usr/share/applications"
|
||||||
|
|
||||||
# res
|
# res
|
||||||
_path_src="$_pkgsrc/peazip-sources/res/share"
|
_path_src="$_pkgsrc/peazip-sources/res/share"
|
||||||
install -dm755 "$pkgdir/usr/share/$_pkgname"
|
mkdir -pm755 "$pkgdir/usr/share/$_pkgname"
|
||||||
cp --reflink=auto -a "$_path_src"/{icons,lang,themes} "$pkgdir/usr/share/$_pkgname/"
|
cp -a "$_path_src"/{icons,lang,themes} "$pkgdir/usr/share/$_pkgname/"
|
||||||
|
|
||||||
# permissions
|
# permissions
|
||||||
chmod -R u+rwX,go+rX,go-w "$pkgdir/"
|
chmod -R u+rwX,go+rX,go-w "$pkgdir/"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue