diff options
author | Jorge Pizarro-Callejas | 2021-10-31 02:08:26 -0300 |
---|---|---|
committer | Jorge Pizarro-Callejas | 2021-10-31 02:08:26 -0300 |
commit | c4218271f2d5caadc787cbac70b776aadaca5160 (patch) | |
tree | b037a9e7abb30dd51c15a6a3634fdacb603d0c6e | |
download | aur-vkquake3-git.tar.gz |
New package: vkquake3-git
-rw-r--r-- | .SRCINFO | 45 | ||||
-rw-r--r-- | PKGBUILD | 113 | ||||
-rw-r--r-- | quake3.desktop | 12 | ||||
-rw-r--r-- | quake3.install | 23 | ||||
-rw-r--r-- | quake3.png | bin | 0 -> 8410 bytes | |||
-rw-r--r-- | vkquake3-add-copy-vulkan-libs.patch | 16 |
6 files changed, 209 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c2b255eaf4e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,45 @@ +pkgbase = vkquake3-git + pkgdesc = A Quake 3 engine based on ioquake3 but with additional Vulkan API support + pkgver = 0.01.r50.gec8089b0 + pkgrel = 1 + url = https://github.com/suijingfeng/vkQuake3 + install = quake3.install + arch = i686 + arch = x86_64 + arch = aarch64 + license = GPL + makedepends = git + makedepends = vulkan-headers + depends = curl + depends = libjpeg + depends = libvorbis + depends = openal + depends = opus + depends = opusfile + depends = sdl2 + depends = vulkan-icd-loader + depends = vulkan-validation-layers + depends = zlib + optdepends = mumble: Mumble VoIP support + provides = vkquake3 + provides = quake3 + conflicts = quake3 + conflicts = quake3-icculus-svn + conflicts = quake3-svn + conflicts = ioquake3-svn + conflicts = ioquake3-git + replaces = quake3-icculus-svn + replaces = ioquake3-svn + replaces = ioquake3-git + source = quake3.desktop + source = quake3.png + source = vkquake3-add-copy-vulkan-libs.patch + source = http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run + source = vkquake3::git+https://github.com/suijingfeng/vkQuake3.git + md5sums = 798fa080743cd95e7935c15b4973a0fb + md5sums = 286d89ab18f164e919c409698bfed4f1 + md5sums = ed867c57b6c819329279214b22be5040 + md5sums = c71fdddccb20e8fc393d846e9c61d685 + md5sums = SKIP + +pkgname = vkquake3-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..52125d5056fb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,113 @@ +# Maintainer: Jorge Pizarro-Callejas <jpizarrocallejas@gmail.com> +pkgname=vkquake3-git +_pkgname=${pkgname%-git} +pkgver=0.01.r50.gec8089b0 +pkgrel=1 +pkgdesc="A Quake 3 engine based on ioquake3 but with additional Vulkan API support" +arch=('i686' 'x86_64' 'aarch64') +url="https://github.com/suijingfeng/vkQuake3" +license=('GPL') +depends=('curl' 'libjpeg' 'libvorbis' 'openal' 'opus' 'opusfile' 'sdl2' 'vulkan-icd-loader' 'vulkan-validation-layers' 'zlib') +makedepends=('git' 'vulkan-headers') +optdepends=('mumble: Mumble VoIP support') +provides=('vkquake3' 'quake3') +conflicts=('quake3' 'quake3-icculus-svn' 'quake3-svn' 'ioquake3-svn' 'ioquake3-git') +replaces=('quake3-icculus-svn' 'ioquake3-svn' 'ioquake3-git') +install=quake3.install +source=("quake3.desktop" "quake3.png" + "${_pkgname}-add-copy-vulkan-libs.patch" + "http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run" + "${_pkgname}::git+https://github.com/suijingfeng/vkQuake3.git") +md5sums=('798fa080743cd95e7935c15b4973a0fb' + '286d89ab18f164e919c409698bfed4f1' + 'ed867c57b6c819329279214b22be5040' + 'c71fdddccb20e8fc393d846e9c61d685' + 'SKIP') + +pkgver() { + cd "${srcdir}/${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}" + # Extract patch files + chmod +x "${srcdir}/linuxq3apoint-1.32b-3.x86.run" + "${srcdir}/linuxq3apoint-1.32b-3.x86.run" --tar xf + cd "${srcdir}/${_pkgname}" + patch -p1 < ../"${_pkgname}-add-copy-vulkan-libs.patch" +} + +q3make() { + # NOTE: Freetype support is kinda broken. + export CFLAGS+=" ${CPPFLAGS}" + + make $@ \ + BUILD_CLIENT=1 \ + BUILD_SERVER=1 \ + BUILD_BASEGAME=0 \ + BUILD_MISSIONPACK=0 \ + BUILD_GAME_SO=0 \ + BUILD_GAME_QVM=0 \ + BUILD_RENDERER_OPENGL2=1 \ + DEFAULT_BASEDIR="/opt/quake3" \ + FULLBINEXT='' \ + GENERATE_DEPENDENCIES=0 \ + OPTIMIZE='' \ + USE_OPENAL=1 \ + USE_OPENAL_DLOPEN=0 \ + USE_CURL=1 \ + USE_CURL_DLOPEN=0 \ + USE_CODEC_VORBIS=1 \ + USE_CODEC_OPUS=1 \ + USE_FREETYPE=0 \ + USE_MUMBLE=1 \ + USE_VOIP=1 \ + USE_INTERNAL_LIBS=0 +} + +build() { + cd "${srcdir}/${_pkgname}" + q3make +} + +package() { + cd "${srcdir}/${_pkgname}" + + # Create Destination Directories + install -d "${pkgdir}"/{usr/bin,/opt/quake3/{baseq3,missionpack,demoq3}} + + # Install Files + q3make COPYDIR="${pkgdir}/opt/quake3" copyfiles + + # Install Quake 3 Patch Files + install -m 644 "${srcdir}"/baseq3/*.pk3 \ + "${pkgdir}/opt/quake3/baseq3/" + + # Install Quake 3 Expansion Pack Patch Files + install -m 644 "${srcdir}"/missionpack/*.pk3 \ + "${pkgdir}/opt/quake3/missionpack/" + + # Link pk3 files to demoq3 + ln -sf /opt/quake3/baseq3/pak{1..8}.pk3 "${pkgdir}/opt/quake3/demoq3/" + + # Link Executables in /usr/bin + ln -sf "/opt/quake3/ioquake3" "${pkgdir}/usr/bin/quake3" + ln -sf "/opt/quake3/ioq3ded" "${pkgdir}/usr/bin/q3ded" + + # Install systemd service file + install -D -m 644 "${srcdir}/${_pkgname}/misc/linux/q3a.service" \ + "${pkgdir}/usr/lib/systemd/system/q3a.service" + + # Patch systemd service file + sed -i -e "s@/usr/local/games/quake3/ioq3ded.x86_64@/opt/quake3/q3ded@" \ + "${pkgdir}/usr/lib/systemd/system/q3a.service" + + # Install Desktop File + install -D -m 644 "${srcdir}/quake3.desktop" \ + "${pkgdir}/usr/share/applications/quake3.desktop" + + # Install Icon File + install -D -m 644 "${srcdir}/quake3.png" \ + "${pkgdir}/usr/share/pixmaps/quake3.png" +} diff --git a/quake3.desktop b/quake3.desktop new file mode 100644 index 000000000000..884c2656b90a --- /dev/null +++ b/quake3.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Quake III Arena +GenericName=Quake III +Comment=vkQuake3 - Quake III Open Source Engine with Vulkan API support +Exec=/usr/bin/quake3 +Icon=/usr/share/pixmaps/quake3.png +StartupNotify=true +Terminal=false +Type=Application +Categories=Qt;KDE;GNOME;Application;Game; + diff --git a/quake3.install b/quake3.install new file mode 100644 index 000000000000..72bc85a9bcfc --- /dev/null +++ b/quake3.install @@ -0,0 +1,23 @@ + +post_install() { + echo ">>>" + echo ">>> To play Q3 with the Retail Version:" + echo ">>> Move the pak0.pk3 file from the original game CD to:" + echo ">>> /opt/quake3/baseq3/" + echo ">>>" + echo ">>> To play Q3 with the Demo Version:" + echo ">>> Move the demoq3/pak0.pk3 from the demo installer to:" + echo ">>> /opt/quake3/demoq3/" + echo ">>>" + echo ">>> When you have the .pk3 file(s) installed, run the game:" + echo ">>> quake3" + echo ">>>" + echo ">>> Or for the Demo Version:" + echo ">>> quake3 +set fs_game demoq3" + echo ">>>" +} + +post_upgrade() { + post_install $1 +} + diff --git a/quake3.png b/quake3.png Binary files differnew file mode 100644 index 000000000000..5a288c29eb59 --- /dev/null +++ b/quake3.png diff --git a/vkquake3-add-copy-vulkan-libs.patch b/vkquake3-add-copy-vulkan-libs.patch new file mode 100644 index 000000000000..780ab726f3c8 --- /dev/null +++ b/vkquake3-add-copy-vulkan-libs.patch @@ -0,0 +1,16 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2021-10-31 01:51:16.877100614 -0300 ++++ b/Makefile 2021-10-31 01:52:53.360338314 -0300 +@@ -3040,10 +3040,12 @@ + $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl1_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl1_$(SHLIBNAME) + ifneq ($(BUILD_RENDERER_OPENGL2),0) + $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl2_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl2_$(SHLIBNAME) ++ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_vulkan_$(SHLIBNAME) $(COPYBINDIR)/renderer_vulkan_$(SHLIBNAME) + endif + else + ifneq ($(BUILD_RENDERER_OPENGL2),0) + $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_opengl2$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_opengl2$(FULLBINEXT) ++ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_vulkan$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_vulkan$(FULLBINEXT) + endif + endif + endif |