From 67f45eace9f1487300b99354ce07b794f25e894c Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 Date: Sun, 16 Aug 2020 01:33:25 +0800 Subject: [PATCH 1/6] update rules --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8fdd514..269f4f7 100644 --- a/debian/control +++ b/debian/control @@ -6,9 +6,10 @@ Uploaders: Xiao sheng wen , xiao sheng wen , Build-Depends: debhelper-compat (= 13), libxpm-dev, + libncursesw5-dev, Homepage: https://www.atzlinux.com Rules-Requires-Root: no -Standards-Version: 4.5.0 +Standards-Version: 2.0.7 Vcs-Browser: https://gitee.com/atzlinux/netmaj/ Vcs-Git: https://gitee.com/atzlinux/netmaj.git -- Gitee From 71aa89a66f0b58be3ec36d63690064ae626f4f94 Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 Date: Sun, 16 Aug 2020 02:05:26 +0800 Subject: [PATCH 2/6] recovery original makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 450f279..73f7163 100644 --- a/Makefile +++ b/Makefile @@ -180,9 +180,9 @@ player_info: player_info.in Makefile install: netmaj player_info -if test ! -d ${DESTDIR}${BINDIR}; then \ - mkdir -p ${DESTDIR}${BINDIR}; fi + mkdir ${DESTDIR}${BINDIR}; fi -if test ! -d ${DESTDIR}${LIBDIR}; then \ - mkdir -p ${DESTDIR}${LIBDIR}; fi + mkdir ${DESTDIR}${LIBDIR}; fi -./server_kill cp server client auto server_kill player_info ${DESTDIR}$(LIBDIR) cp proxyserver inputserver proxyclient ${DESTDIR}$(LIBDIR) -- Gitee From 5e4b136b8ed2531b6923e36daacbc36a64a700af Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 Date: Sun, 16 Aug 2020 02:06:06 +0800 Subject: [PATCH 3/6] add fix-getline --- debian/patches/fix-getline | 48 ++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 49 insertions(+) create mode 100644 debian/patches/fix-getline diff --git a/debian/patches/fix-getline b/debian/patches/fix-getline new file mode 100644 index 0000000..300e9d1 --- /dev/null +++ b/debian/patches/fix-getline @@ -0,0 +1,48 @@ +Index: netmaj/xui/src/xui/decl.h +=================================================================== +--- netmaj.orig/xui/src/xui/decl.h ++++ netmaj/xui/src/xui/decl.h +@@ -202,7 +202,7 @@ char *stringF P_((integer_t i)); + integer_t numberofF P_((void)); + integer_t div_into_fields P_((char *s, integer_t buflen)); + char **pointerF P_((void)); +-integer_t getline P_((FILE *fp)); ++integer_t _getline P_((FILE *fp)); + + #undef P_ + #if __STDC__ || ANSIC +Index: netmaj/xui/src/xui/getline.c +=================================================================== +--- netmaj.orig/xui/src/xui/getline.c ++++ netmaj/xui/src/xui/getline.c +@@ -167,7 +167,7 @@ pointerF () + static char readbuffer[BUFFERSIZE * 2]; + + integer_t +-getline (fp) ++_getline (fp) + FILE *fp; + { + if (!fp) +Index: netmaj/xui/src/xui/pfinfo.c +=================================================================== +--- netmaj.orig/xui/src/xui/pfinfo.c ++++ netmaj/xui/src/xui/pfinfo.c +@@ -114,7 +114,7 @@ read_player_info_file (fullpfname, name) + memset (&playerinfo, 0, sizeof (playerinfo)); + xbasename (name, playerinfo.name, ".pf"); + +- while (getline (fp)) ++ while (_getline (fp)) + { + if (sscanf((char *) stringF (0), "param: name = %s",playerinfo.rname)==1) + {} +@@ -179,7 +179,7 @@ _read_player_info_last (fullpfname, name + memset (&playerinfo, 0, sizeof (playerinfo)); + xbasename (name, playerinfo.name, ".pf"); + +- while (getline (fp)) ++ while (_getline (fp)) + { + if (!strncmp ((char *) stringF (0), "result: ", 8)) + { diff --git a/debian/patches/series b/debian/patches/series index 5b1c0a4..4d3a84f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ Makefile.patch +fix-getline -- Gitee From ba041411beb4db1e98ddda22dd1c8e0f1d93a451 Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 Date: Sun, 16 Aug 2020 02:17:48 +0800 Subject: [PATCH 4/6] add var-list patch --- debian/patches/fix-var-list | 38 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 debian/patches/fix-var-list diff --git a/debian/patches/fix-var-list b/debian/patches/fix-var-list new file mode 100644 index 0000000..49d926d --- /dev/null +++ b/debian/patches/fix-var-list @@ -0,0 +1,38 @@ +Index: netmaj/xui/src/int/interror.c +=================================================================== +--- netmaj.orig/xui/src/int/interror.c ++++ netmaj/xui/src/int/interror.c +@@ -96,11 +96,10 @@ xop_string (op) + /* static FILE *outfp = stderr; */ + + static char * +-message (msg, argp) +- char *msg; +- va_list *argp; ++message (char* msg, ...) + { +- va_list args = *argp; ++ va_list args; ++ va_start(args, msg); + char *start; + + for (;;) +Index: netmaj/xui/src/util/error.c +=================================================================== +--- netmaj.orig/xui/src/util/error.c ++++ netmaj/xui/src/util/error.c +@@ -55,11 +55,10 @@ typedef long integer_t; + /* static FILE *outfp = stderr; */ + + static char * +-message (msg, argp) +- char *msg; +- va_list *argp; ++message (char* msg, ...) + { +- va_list args = *argp; ++ va_list args; ++ va_start(args, msg); + char *start; + + for (;;) diff --git a/debian/patches/series b/debian/patches/series index 4d3a84f..f728702 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ Makefile.patch fix-getline +fix-var-list -- Gitee From a8642dd24cfd2485c61a793d361a008b7017dbb3 Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 Date: Sun, 16 Aug 2020 12:59:55 +0800 Subject: [PATCH 5/6] revert version change --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 269f4f7..266f3dd 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build-Depends: debhelper-compat (= 13), libncursesw5-dev, Homepage: https://www.atzlinux.com Rules-Requires-Root: no -Standards-Version: 2.0.7 +Standards-Version: 4.5.0 Vcs-Browser: https://gitee.com/atzlinux/netmaj/ Vcs-Git: https://gitee.com/atzlinux/netmaj.git -- Gitee From a80578a51815afa1f0e93da2b249024788ccd064 Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 <616545598@qq.com> Date: Sun, 16 Aug 2020 14:26:13 +0800 Subject: [PATCH 6/6] fix missing install file for xui --- debian/rules | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/rules b/debian/rules index 0953f71..e68cbeb 100755 --- a/debian/rules +++ b/debian/rules @@ -31,6 +31,15 @@ clean: dh_clean install: install-stamp +override_dh_auto_install: + # distable auto install + $(MAKE) install DESTDIR=`pwd`/debian/tmp \ + XUI_DESTDIR=`pwd`/debian/netmaj-xui + $(MAKE) install-pf DESTDIR=`pwd`/debian/tmp \ + XUI_DESTDIR=`pwd`/debian/netmaj-xui + chmod -x `pwd`/debian/tmp/usr/lib/games/netmaj/auto.pf \ + `pwd`/debian/netmaj-xui/usr/lib/games/netmaj/\.*.pf + install-stamp: build-stamp dh_testdir dh_testroot @@ -38,12 +47,7 @@ install-stamp: build-stamp dh_installdirs # Add here commands to install the package into debian/tmp. - $(MAKE) install DESTDIR=`pwd`/debian/tmp \ - XUI_DESTDIR=`pwd`/debian/netmaj-xui - $(MAKE) install-pf DESTDIR=`pwd`/debian/tmp \ - XUI_DESTDIR=`pwd`/debian/netmaj-xui - chmod -x `pwd`/debian/tmp/usr/lib/games/netmaj/auto.pf \ - `pwd`/debian/netmaj-xui/usr/lib/games/netmaj/\.*.pf + touch install-stamp -- Gitee