blob: d3b1c1ce8466a47c0dd25e422437e48ca814638c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
pkgname=nzportable-bin
pkgver=2.0.0indev20250102072057
pkgrel=2
scriptver=1.0.6.1
pkgdesc='Nazi Zombies: Portable, a Call of Duty: Zombies "de-make" powered by various enhanced forks of the Quake engine'
arch=('x86_64' 'i686' 'aarch64' 'armv7l')
url="https://gitlab.com/linuxbombay/nzp"
license=('GPL2')
depends=('sdl2' 'yad')
makedepends=('unzip')
sha256sums=('1e12a4017f50ef12c7bf7b5e9603c7608b83fd3690ede4b88bf62d4ef85bd1c2')
source=("https://gitlab.com/linuxbombay/nzp/nzp-packaging/-/archive/$scriptver/nzp-packaging-$scriptver.tar.bz2")
package() {
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/usr/share/pixmaps"
install -dm755 "$pkgdir/usr/share/games/NZP"
install -dm755 "$pkgdir/usr/share/applications"
cd "$srcdir"
echo "$pkgver" > "$srcdir/version.txt"
echo "$CARCH"
if [[ "$CARCH" == "x86_64" ]]; then
filename="nzportable-linux64.zip"
url="https://gitlab.com/linuxbombay/nzp/binaries/$pkgver/-/raw/main/$filename"
elif [[ "$CARCH" == "aarch64" ]]; then
filename="nzportable-linuxarm64.zip"
url="https://gitlab.com/linuxbombay/nzp/binaries/$pkgver/-/raw/main/$filename"
elif [[ "$CARCH" == "armv7l" ]]; then
filename="nzportable-linuxarmhf.zip"
url="https://gitlab.com/linuxbombay/nzp/binaries/$pkgver/-/raw/main/$filename"
elif [[ "$CARCH" == "i686" ]]; then
filename="nzportable-linux32.zip"
url="https://gitlab.com/linuxbombay/nzp/binaries/$pkgver/-/raw/main/$filename"
else
echo "Unknown architecture: $CARCH"
exit 1
fi
# Check if the file already exists before downloading
if [[ -f "$srcdir/$filename" ]]; then
echo "$filename already exists in $srcdir, skipping download."
else
# File doesn't exist, proceed with download
echo "Downloading $filename for $CARCH architecture."
wget "$url" -P "$srcdir"
fi
cp -r "$srcdir/version.txt" "$pkgdir/usr/share/games/NZP"
cp -r $srcdir/*nzportable-*.zip "$pkgdir/usr/share/games/NZP"
cp -r "$srcdir/nzp-packaging-$scriptver/nzp.svg" "$pkgdir/usr/share/pixmaps"
cp -r "$srcdir/nzp-packaging-$scriptver/nzp-title.png" "$pkgdir/usr/share/games/NZP"
# Link to binary
install -Dm755 "$srcdir/nzp-packaging-$scriptver/nzp.sh" "$pkgdir/usr/bin/nzp"
# Desktop Entry
install -Dm644 "$srcdir/nzp-packaging-$scriptver/nzp.desktop" \
"$pkgdir/usr/share/applications/nzp.desktop"
sed -i s%/usr/share%/opt% "$pkgdir/usr/share/applications/nzp.desktop"
}
|