diff --git a/Makefile b/Makefile index 450f279a3439679946719c56850d1efc66201eb7..73f71636dc1bfb8a5bbb681378e389d23e34a179 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) diff --git a/debian/control b/debian/control index 8fdd514e7feebd39dfdf9c3e69e7ef2a91c64f1d..266f3dd1fe39cceff31313965c519d7b0358dba5 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ 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 diff --git a/debian/patches/fix-getline b/debian/patches/fix-getline new file mode 100644 index 0000000000000000000000000000000000000000..300e9d1e3a2d54bf6e0c4e24bd8b3496ff3bdfe2 --- /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/fix-var-list b/debian/patches/fix-var-list new file mode 100644 index 0000000000000000000000000000000000000000..49d926d435597b1d30bbdbaff8d81733228046fa --- /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 5b1c0a4fba147af4d2ea100c5704f5429901dc2b..f728702a4b78d80bb36550df65a22e14b0a4905a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ Makefile.patch +fix-getline +fix-var-list diff --git a/debian/rules b/debian/rules index 0953f71c1db6d67cc4ec4cf95c1ea345623ee514..e68cbeb9be3962bac5ae83e060dbdcee63d643a2 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