make better pkgbuild

thx strz
This commit is contained in:
komaruworld committed 2026-08-12 13:31:15 +03:00
1 parent ca760f111b
commit 36733cfb75
5 files changed
+27 -28

No files matched your search

+1 -4
View File
@@ -10,6 +10,7 @@ pkgbase = mocktail-git
makedepends = ninja
makedepends = nlohmann-json
makedepends = pkgconf
makedepends = vulkan-headers
depends = capstone
depends = curl
depends = fontconfig
@@ -38,10 +39,6 @@ pkgbase = mocktail-git
conflicts = mocktail-bin
options = !debug
source = mocktail::git+https://github.com/komaruworld/mocktail.git#branch=main
source = libjnivm::git+https://github.com/ChristopherHX/libjnivm.git
source = vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
pkgname = mocktail-git
+5 -9
View File
@@ -37,6 +37,7 @@ makedepends=(
'ninja'
'nlohmann-json'
'pkgconf'
'vulkan-headers'
)
optdepends=('gamemode: Feral GameMode integration')
provides=('mocktail')
@@ -44,13 +45,9 @@ conflicts=('mocktail' 'mocktail-bin')
options=('!debug')
source=(
'mocktail::git+https://github.com/komaruworld/mocktail.git#branch=main'
'libjnivm::git+https://github.com/ChristopherHX/libjnivm.git'
'vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git'
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
)
pkgver() {
@@ -69,11 +66,9 @@ pkgver() {
prepare() {
cd mocktail
git submodule init
git config submodule.third_party/libjnivm.url "${srcdir}/libjnivm"
git config submodule.third_party/Vulkan-Headers.url \
"${srcdir}/vulkan-headers"
git -c protocol.file.allow=always submodule update
sed -i \
's|add_subdirectory(third_party/Vulkan-Headers EXCLUDE_FROM_ALL)|find_package(VulkanHeaders CONFIG REQUIRED)|' \
CMakeLists.txt
}
build() {
@@ -83,6 +78,7 @@ build() {
-DCMAKE_INSTALL_LIBDIR=lib \
-DMOCKTAIL_DEFAULT_COMPATIBILITY_MANIFEST=/usr/share/mocktail/metadata/roblox_compatibility.json \
-DMOCKTAIL_DEFAULT_SIGNING_TRUST_MANIFEST=/usr/share/mocktail/metadata/roblox_signing_certificates.json \
-DMOCKTAIL_ENABLE_UPSTREAM_JNIVM=OFF \
-DBUILD_TESTING=OFF
cmake --build build
}
+2 -5
View File
@@ -1,7 +1,7 @@
pkgbase = mocktail
pkgdesc = Android x86-64 Roblox compatibility runtime for Linux
pkgver = 0.1.0
pkgrel = 1
pkgrel = 2
url = https://github.com/komaruworld/mocktail
arch = x86_64
license = Apache-2.0
@@ -10,6 +10,7 @@ pkgbase = mocktail
makedepends = ninja
makedepends = nlohmann-json
makedepends = pkgconf
makedepends = vulkan-headers
depends = capstone
depends = curl
depends = fontconfig
@@ -37,10 +38,6 @@ pkgbase = mocktail
conflicts = mocktail-git
options = !debug
source = mocktail::git+https://github.com/komaruworld/mocktail.git#tag=0.1.0
source = libjnivm::git+https://github.com/ChristopherHX/libjnivm.git
source = vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
pkgname = mocktail
+6 -10
View File
@@ -2,7 +2,7 @@
pkgname=mocktail
pkgver=0.1.0
pkgrel=1
pkgrel=2
pkgdesc='Android x86-64 Roblox compatibility runtime for Linux'
arch=('x86_64')
url='https://github.com/komaruworld/mocktail'
@@ -37,29 +37,24 @@ makedepends=(
'ninja'
'nlohmann-json'
'pkgconf'
'vulkan-headers'
)
optdepends=('gamemode: Feral GameMode integration')
conflicts=('mocktail-bin' 'mocktail-git')
options=('!debug')
source=(
"mocktail::git+https://github.com/komaruworld/mocktail.git#tag=${pkgver}"
'libjnivm::git+https://github.com/ChristopherHX/libjnivm.git'
'vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git'
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
)
prepare() {
cd mocktail
git submodule init
git config submodule.third_party/libjnivm.url "${srcdir}/libjnivm"
git config submodule.third_party/Vulkan-Headers.url \
"${srcdir}/vulkan-headers"
git -c protocol.file.allow=always submodule update
sed -i \
's|add_subdirectory(third_party/Vulkan-Headers EXCLUDE_FROM_ALL)|find_package(VulkanHeaders CONFIG REQUIRED)|' \
CMakeLists.txt
}
build() {
@@ -69,6 +64,7 @@ build() {
-DCMAKE_INSTALL_LIBDIR=lib \
-DMOCKTAIL_DEFAULT_COMPATIBILITY_MANIFEST=/usr/share/mocktail/metadata/roblox_compatibility.json \
-DMOCKTAIL_DEFAULT_SIGNING_TRUST_MANIFEST=/usr/share/mocktail/metadata/roblox_signing_certificates.json \
-DMOCKTAIL_ENABLE_UPSTREAM_JNIVM=OFF \
-DBUILD_TESTING=OFF
cmake --build build
}
+13
View File
@@ -46,6 +46,8 @@ grep -Fq 'pkgname=mocktail' "${AUR_STABLE_PKGBUILD}" ||
Fail 'AUR source package name is not stable'
grep -Fq '#tag=${pkgver}' "${AUR_STABLE_PKGBUILD}" ||
Fail 'AUR source package does not pin its Git tag'
grep -Fq "'vulkan-headers'" "${AUR_STABLE_PKGBUILD}" ||
Fail 'AUR source package does not use the packaged Vulkan headers'
grep -Fq 'pkgbase = mocktail' "${AUR_STABLE_SRCINFO}" ||
Fail 'AUR source package has no generated .SRCINFO metadata'
grep -Fq 'pkgname=mocktail-bin' "${AUR_BIN_PKGBUILD}" ||
@@ -58,6 +60,17 @@ grep -Fq -- \
Fail 'AUR package does not build from the upstream Git repository'
grep -Fq "provides=('mocktail')" "${AUR_PKGBUILD}" ||
Fail 'AUR VCS package does not provide the stable package name'
grep -Fq "'vulkan-headers'" "${AUR_PKGBUILD}" ||
Fail 'AUR VCS package does not use the packaged Vulkan headers'
for aur_pkgbuild in "${AUR_STABLE_PKGBUILD}" "${AUR_PKGBUILD}"; do
if grep -Eq \
'libjnivm::git\+|vulkan-headers::git\+|git submodule (init|update)' \
"${aur_pkgbuild}"; then
Fail "AUR package downloads build-only submodules: ${aur_pkgbuild}"
fi
grep -Fq -- '-DMOCKTAIL_ENABLE_UPSTREAM_JNIVM=OFF' "${aur_pkgbuild}" ||
Fail "AUR package enables the unused upstream JNI test library: ${aur_pkgbuild}"
done
grep -Fq -- \
'-DMOCKTAIL_DEFAULT_COMPATIBILITY_MANIFEST=/usr/share/mocktail/metadata/' \
"${AUR_PKGBUILD}" ||