Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Narrat/4478bf952cda91f71131ae6a56d1d086 to your computer and use it in GitHub Desktop.
Save Narrat/4478bf952cda91f71131ae6a56d1d086 to your computer and use it in GitHub Desktop.
From 2224ad8db4b1c73b47514de0a887ede5e42dbba6 Mon Sep 17 00:00:00 2001
From: Raphael Costa <raphael_costa94@outlook.com>
Date: Tue, 6 Feb 2018 09:57:40 -0200
Subject: [PATCH] Always use latest sources
edited by Narrat
---
01_openssl102.patch | 4 ++--
02_freetype.patch | 4 ++--
PKGBUILD | 16 +++++++++++-----
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/01_openssl102.patch b/01_openssl102.patch
index 32b109f..da2cd55 100644
--- a/01_openssl102.patch
+++ b/01_openssl102.patch
@@ -1,5 +1,5 @@
---- tibia-11.57.6239/start-tibia.sh
-+++ tibia-11.57.6239/start-tibia.sh
+--- start-tibia.sh
++++ start-tibia.sh
@@ -7,4 +7,4 @@
PATH=$(dirname "$SCRIPT")
BIN_PATH="$PATH/bin"
diff --git a/02_freetype.patch b/02_freetype.patch
index a844767..19a858d 100644
--- a/02_freetype.patch
+++ b/02_freetype.patch
@@ -1,5 +1,5 @@
---- tibia-11.57.6239/start-tibia.sh
-+++ tibia-11.57.6239/start-tibia.sh
+--- start-tibia.sh
++++ start-tibia.sh
@@ -6,5 +6,6 @@
SCRIPT=$(readlink -f "$0")
PATH=$(dirname "$SCRIPT")
diff --git a/PKGBUILD b/PKGBUILD
index f272822..60d4925 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Ricardo Cabral <ricardo.arturo.cabral@gmail.com>
pkgname=tibia
-pkgver=11.57.6239
+pkgver=11.58.6239
pkgrel=1
pkgdesc="fast-paced free massively multiplayer online role-playing game"
arch=('x86_64')
@@ -10,26 +10,32 @@ license=('custom')
depends=('glu' 'libgl' 'libice' 'libxext' 'openssl-1.0' 'pcre' 'qt5-base' 'qt5-declarative')
makedepends=('gendesk' 'python-html2text')
-source=("${pkgname}-${pkgver}.tar.gz::http://static.tibia.com/download/tibia.x64.tar.gz"
+source=("${pkgname}.tar.gz::http://static.tibia.com/download/tibia.x64.tar.gz"
"${pkgname}-agreement.php::http://www.tibia.com/support/agreement.php"
"01_openssl102.patch"
"02_freetype.patch")
-sha256sums=('ebbd21d4a4c88ca51e16ed7d8a3bf655943d0263db7c975ab7f1709714eb8875'
+sha256sums=('SKIP'
'965edf1cf67698f9dcfcbced495e0e96a666207a9a0b91fb769ed386a5f1efe5'
- 'ad1d236ac5d75f053be3d0bfd94e340e098a063487c6f57593a4bffb67fdc67c'
- '6a4431cafa196fa76d7c7da9bc082a8e43becb9f20fc28db3952359623bbe636')
+ '3d55ac564bb2edc8fe7e826743a774b2191d29a1905bb35e9d9b26528c7a0fe6'
+ '554748e5e81ab9c693d118d6e6e28408062cdd2a1efc3a1a60a4f13edbcc91a6')
prepare() {
gendesk -f -n
html2text "${pkgname}-agreement.php" > LICENSE
+ # Patching
+ cd -- $(find . -maxdepth 1 -type d -iname tibia-\* -print -quit)
# Tibia relies on openssl 1.0.x
patch -Np0 -i "${srcdir}/01_openssl102.patch"
# Tibia relies on specific freetype version
patch -Np0 -i "${srcdir}/02_freetype.patch"
}
+pkgver() {
+ find . -maxdepth 1 -type d -iname tibia-\* -print -quit | sed 's/\.\/tibia-\(.*\)/\1/'
+}
+
package() {
mkdir -p "${pkgdir}/opt/Tibia"
cp -drv --no-preserve=ownership ${pkgname}-${pkgver}/* "${pkgdir}/opt/Tibia"
--
2.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment