summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD20
-rw-r--r--SettingManager.cpp.patch37
-rw-r--r--install15
-rw-r--r--sysusers1
-rw-r--r--tmpfiles1
6 files changed, 64 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d2eb56d7a22..b98e993bd14c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Jul 17 03:25:58 UTC 2017
+# Mon Oct 21 03:43:05 UTC 2019
pkgbase = ptokax
pkgdesc = PtokaX Direct Connect Hub is a multi-platform server application for Neo-Modus Direct Connect Peer-To-Peer sharing network.
pkgver = 0.5.2.2
- pkgrel = 2
+ pkgrel = 3
url = http://www.PtokaX.org
install = install
arch = x86_64
@@ -18,10 +18,14 @@ pkgbase = ptokax
optdepends = mariadb
source = http://www.PtokaX.org/files/0.5.2.2-nix-src.tgz
source = service
- source = tmpfiles.d
+ source = sysusers
+ source = SettingManager.cpp.patch
+ source = tmpfiles
source = Settings.pxt
md5sums = 0d5ca7ae81be69eb351fadfd1a498217
md5sums = fa9ba9566428af9603297aea1343ced2
+ md5sums = 2df6b09b987a6b6e1e96ef6bc8a7a19e
+ md5sums = 5f50852f8b1f490391e6593a51028590
md5sums = 6a20c3ddfb3c625cca55f7480e609e1e
md5sums = 25b7201edc7c31fd6b14a0d61ee0e1cc
diff --git a/PKGBUILD b/PKGBUILD
index eb7cc8cc0856..4539aa141e7c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,14 @@
-# Maintainer: Alexandr Boiko <4le34n at gmail dot com>
+# Maintainer: Aleksandr <contact at via dot aur>
pkgname=ptokax
_pkgname=PtokaX
pkgver=0.5.2.2
-pkgrel=2
+pkgrel=3
pkgdesc="PtokaX Direct Connect Hub is a multi-platform server application for Neo-Modus Direct Connect Peer-To-Peer sharing network."
arch=('x86_64')
url="http://www.PtokaX.org"
license=('GPL')
+makedepends=('dos2unix')
depends=('lua' 'tinyxml' 'zlib')
makedepends=('make' 'gcc')
optdepends=('postgresql-libs'
@@ -17,9 +18,17 @@ install=install
changelog=
source=("$url/files/$pkgver-nix-src.tgz"
'service'
- 'tmpfiles.d'
+ 'sysusers'
+ 'SettingManager.cpp.patch'
+ 'tmpfiles'
'Settings.pxt')
+prepare() {
+ cd "$srcdir/$_pkgname/core"
+ dos2unix -f SettingManager.cpp
+ patch --binary -p0 -i ../../SettingManager.cpp.patch
+}
+
build() {
cd "$_pkgname"
# Compile PtokaX without database support
@@ -41,7 +50,8 @@ package() {
install -dm0755 "$pkgdir/var/lib/$pkgname/cfg"
install -Dm0755 PtokaX "$pkgdir/usr/bin/$pkgname"
install -Dm0644 "$srcdir/service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
- install -Dm0644 "$srcdir/tmpfiles.d" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+ install -Dm0644 "$srcdir/tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+ install -Dm0644 "$srcdir/sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -Dm0644 "$srcdir"/Settings.pxt "$pkgdir/var/lib/$pkgname/cfg/Settings.pxt"
install -Dm0644 License.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm0644 Changelog.txt "$pkgdir/usr/share/doc/$pkgname/CHANGELOG"
@@ -50,5 +60,7 @@ package() {
md5sums=('0d5ca7ae81be69eb351fadfd1a498217'
'fa9ba9566428af9603297aea1343ced2'
+ '2df6b09b987a6b6e1e96ef6bc8a7a19e'
+ '5f50852f8b1f490391e6593a51028590'
'6a20c3ddfb3c625cca55f7480e609e1e'
'25b7201edc7c31fd6b14a0d61ee0e1cc')
diff --git a/SettingManager.cpp.patch b/SettingManager.cpp.patch
new file mode 100644
index 000000000000..e07ed33a1034
--- /dev/null
+++ b/SettingManager.cpp.patch
@@ -0,0 +1,37 @@
+--- SettingManager.cpp.orig 2019-10-08 12:54:54.907755146 +1100
++++ SettingManager.cpp 2019-10-08 12:54:20.807846426 +1100
+@@ -504,7 +504,7 @@
+
+ for(size_t szi = 0; szi < SETBOOL_IDS_END; szi++) {
+ // Don't save empty hint
+- if(SetBoolCom[szi] != '\0') {
++ if(SetBoolCom[szi][0] != '\0') {
+ fputs(SetBoolCom[szi], fSettingsFile);
+ }
+
+@@ -527,7 +527,7 @@
+
+ for(size_t szi = 0; szi < SETSHORT_IDS_END; szi++) {
+ // Don't save empty hint
+- if(SetShortCom[szi] != '\0') {
++ if(SetShortCom[szi][0] != '\0') {
+ fputs(SetShortCom[szi], fSettingsFile);
+ }
+
+@@ -550,7 +550,7 @@
+
+ for(size_t szi = 0; szi < SETTXT_IDS_END; szi++) {
+ // Don't save empty hint
+- if(SetTxtCom[szi] != '\0') {
++ if(SetTxtCom[szi][0] != '\0') {
+ fputs(SetTxtCom[szi], fSettingsFile);
+ }
+
+@@ -1112,6 +1112,7 @@
+ if(szLen == 0 || szLen > 64 || strpbrk(sTxt, " $|") != NULL) {
+ return;
+ }
++ break;
+ case SETTXT_TCP_PORTS:
+ if(szLen == 0 || szLen > 64) {
+ return;
diff --git a/install b/install
index bbb4359c2134..77a40ed8e923 100644
--- a/install
+++ b/install
@@ -1,15 +1,4 @@
-post_install() {
- getent group ptokax &>/dev/null || groupadd -r -g 411 ptokax >/dev/null
- getent passwd ptokax &>/dev/null || useradd -r -u 411 -g ptokax -d /var/lib/ptokax -s /bin/false ptokax>/dev/null
- chown -R ptokax:ptokax /var/lib/ptokax
- usr/bin/systemd-tmpfiles --create ptokax.conf || true
-}
-post_upgrade() {
- post_install
-}
-
post_remove() {
- getent passwd ptokax &>/dev/null && userdel ptokax >/dev/null
- getent group ptokax &>/dev/null && groupdel ptokax >/dev/null
- true
+ getent passwd ptokax &>/dev/null && userdel ptokax >/dev/null
+ true
}
diff --git a/sysusers b/sysusers
new file mode 100644
index 000000000000..38ef8e6fa072
--- /dev/null
+++ b/sysusers
@@ -0,0 +1 @@
+u ptokax - "ptokax user" /var/lib/ptokax /bin/false
diff --git a/tmpfiles b/tmpfiles
new file mode 100644
index 000000000000..75e552ad07ab
--- /dev/null
+++ b/tmpfiles
@@ -0,0 +1 @@
+d /run/ptokax 0755 ptokax ptokax