tags 912125 patch
user debian-rele...@lists.debian.org
usertags 912125 + bsp-2019-02-de-bonn
thanks

Dear maintainer,

find attached the fix for netkit-ftp.

This goes beyond the usual scope of an NMU but it seemed wise to brush
up the entire build system so it is robust for any forseeable changes
to the Debian toolchain.

For a full explanation, see
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911154#44

Upload to DELAYED+3 will follow in a few hours, I'd like to give
myself a moment to settle down, then ultimately revisit the
changes done. Feel free to tell me if I should wait a little longer.

Packaging could still take a lot of love.

It might be an idea to drop netkit-ftp in favour of netkit-ftp-ssl,
however netkit-ftp has patches that might be worth preserving.

Regards,

    Christoph

diff -Nru netkit-ftp-0.17/debian/changelog netkit-ftp-0.17/debian/changelog
--- netkit-ftp-0.17/debian/changelog    2016-12-06 16:23:57.000000000 +0100
+++ netkit-ftp-0.17/debian/changelog    2019-02-24 14:39:21.000000000 +0100
@@ -1,3 +1,10 @@
+netkit-ftp (0.17-34.1) unstable; urgency=high
+
+  * Non-maintainer upload
+  * Use cmake as build system. Closes: #912125
+
+ -- Christoph Biedl <debian.a...@manchmal.in-ulm.de>  Sun, 24 Feb 2019 
14:39:21 +0100
+
 netkit-ftp (0.17-34) unstable; urgency=low
 
   * Increase Standards to 3.9.8, no changes.
diff -Nru netkit-ftp-0.17/debian/compat netkit-ftp-0.17/debian/compat
--- netkit-ftp-0.17/debian/compat       2016-12-02 16:04:37.000000000 +0100
+++ netkit-ftp-0.17/debian/compat       2018-12-09 23:52:23.000000000 +0100
@@ -1 +1 @@
-9
+10
diff -Nru netkit-ftp-0.17/debian/control netkit-ftp-0.17/debian/control
--- netkit-ftp-0.17/debian/control      2016-12-02 16:24:22.000000000 +0100
+++ netkit-ftp-0.17/debian/control      2018-12-09 23:52:23.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: standard
 Maintainer: Mats Erik Andersson <mats.anders...@gisladisker.se>
 Uploaders: Alberto Gonzalez Iniesta <a...@inittab.org>
-Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.15.7), libreadline-dev
+Build-Depends: debhelper (>= 10~), dpkg-dev (>= 1.15.7), libreadline-dev, cmake
 Standards-Version: 3.9.8
 
 Package: ftp
diff -Nru netkit-ftp-0.17/debian/dirs netkit-ftp-0.17/debian/dirs
--- netkit-ftp-0.17/debian/dirs 2016-12-02 16:04:37.000000000 +0100
+++ netkit-ftp-0.17/debian/dirs 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-usr/bin
-usr/share/man/man1
-usr/share/man/man5
diff -Nru netkit-ftp-0.17/debian/ftp.install netkit-ftp-0.17/debian/ftp.install
--- netkit-ftp-0.17/debian/ftp.install  1970-01-01 01:00:00.000000000 +0100
+++ netkit-ftp-0.17/debian/ftp.install  2018-12-09 23:52:23.000000000 +0100
@@ -0,0 +1,2 @@
+
+usr/bin/netkit-ftp
diff -Nru netkit-ftp-0.17/debian/ftp.manpages 
netkit-ftp-0.17/debian/ftp.manpages
--- netkit-ftp-0.17/debian/ftp.manpages 1970-01-01 01:00:00.000000000 +0100
+++ netkit-ftp-0.17/debian/ftp.manpages 2018-12-09 23:52:23.000000000 +0100
@@ -0,0 +1,3 @@
+
+debian/tmp/usr/share/man/man1/netkit-ftp.1
+debian/tmp/usr/share/man/man5/netkit-netrc.5
diff -Nru netkit-ftp-0.17/debian/patches/010_patches_in_sarge.diff 
netkit-ftp-0.17/debian/patches/010_patches_in_sarge.diff
--- netkit-ftp-0.17/debian/patches/010_patches_in_sarge.diff    2016-12-02 
16:04:37.000000000 +0100
+++ netkit-ftp-0.17/debian/patches/010_patches_in_sarge.diff    2018-12-09 
23:53:19.000000000 +0100
@@ -4,19 +4,8 @@
 Author: Herbert Xu <herb...@debian.org>
 Forwarded: no
 Last-Update: 2003-06-29
---- netkit-ftp-0.17.orig/ftp/Makefile
-+++ netkit-ftp-0.17/ftp/Makefile
-@@ -8,7 +8,7 @@
- LIBS += -lreadline $(LIBTERMCAP)
- endif
- 
--ftp: cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o
-+ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o
-       $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
- 
- domacro.o ftp.o glob.o main.o ruserpass.o: ftp_var.h pathnames.h
---- netkit-ftp-0.17.orig/ftp/cmds.c
-+++ netkit-ftp-0.17/ftp/cmds.c
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -50,6 +50,7 @@
  
  #include <signal.h>
@@ -955,8 +944,8 @@
 +#warning "Unix auto-mode code skipped"
 +#endif /* unix */
 +}
---- netkit-ftp-0.17.orig/ftp/cmds.h
-+++ netkit-ftp-0.17/ftp/cmds.h
+--- a/ftp/cmds.h
++++ b/ftp/cmds.h
 @@ -42,6 +42,7 @@
  void makedir(int argc, char *argv[]);
  void removedir(int argc, char *argv[]);
@@ -965,8 +954,8 @@
  void account(int argc, char *argv[]);
  void doproxy(int argc, char *argv[]);
  void reset(void);
---- netkit-ftp-0.17.orig/ftp/cmdtab.c
-+++ netkit-ftp-0.17/ftp/cmdtab.c
+--- a/ftp/cmdtab.c
++++ b/ftp/cmdtab.c
 @@ -56,6 +56,7 @@
  const char chmodhelp[] =   "change file permissions of remote file";
  const char connecthelp[] = "connect to remote ftp";
@@ -983,8 +972,8 @@
        { "sendport",   porthelp,       0, 0, 0, NULL, setport, NULL },
        { "put",        sendhelp,       1, 1, 1, put, NULL, NULL },
        { "pwd",        pwdhelp,        0, 1, 1, NULL, pwd, NULL },
---- netkit-ftp-0.17.orig/ftp/domacro.c
-+++ netkit-ftp-0.17/ftp/domacro.c
+--- a/ftp/domacro.c
++++ b/ftp/domacro.c
 @@ -40,9 +40,21 @@
  #include <errno.h>
  #include <ctype.h>
@@ -1094,8 +1083,8 @@
        }
 +      line = line2;
  }
---- netkit-ftp-0.17.orig/ftp/ftp.1
-+++ netkit-ftp-0.17/ftp/ftp.1
+--- a/ftp/ftp.1
++++ b/ftp/ftp.1
 @@ -43,10 +43,10 @@
  .Sh SYNOPSIS
  .Nm ftp
@@ -1150,8 +1139,8 @@
  RFC 959
  .Sh HISTORY
  The
---- netkit-ftp-0.17.orig/ftp/ftp.c
-+++ netkit-ftp-0.17/ftp/ftp.c
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -50,6 +50,7 @@
  #include <arpa/inet.h>
  #include <arpa/telnet.h>
@@ -2527,8 +2516,8 @@
 +      printf("\rBytes transferred: %jd", (intmax_t) bytes);
 +      fflush(stdout);
 +}
---- netkit-ftp-0.17.orig/ftp/ftp_var.h
-+++ netkit-ftp-0.17/ftp/ftp_var.h
+--- a/ftp/ftp_var.h
++++ b/ftp/ftp_var.h
 @@ -76,6 +76,7 @@
  Extern int    mapflag;        /* use mapin mapout templates on file names */
  Extern int    code;           /* return/reply code for ftp command */
@@ -2552,8 +2541,8 @@
  Extern char   *argbase;       /* current storage point in arg buffer */
  Extern int    cpend;          /* flag: if != 0, then pending server reply */
  Extern int    mflag;          /* flag: if != 0, then active multi command */
---- netkit-ftp-0.17.orig/ftp/main.c
-+++ netkit-ftp-0.17/ftp/main.c
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -60,6 +60,7 @@
  #include <ctype.h>
  #include <netdb.h>
@@ -2850,8 +2839,8 @@
 +      obstack_free(stack, 0);
 +      obstack_init(stack);
 +}
---- netkit-ftp-0.17.orig/ftp/netrc.5
-+++ netkit-ftp-0.17/ftp/netrc.5
+--- a/ftp/netrc.5
++++ b/ftp/netrc.5
 @@ -37,8 +37,10 @@
  .Dt NETRC 5
  .Os "Linux NetKit (0.17)"
@@ -2864,8 +2853,8 @@
  .Sh DESCRIPTION
  This file contains configuration and autologin information for the 
  File Transfer Protocol client 
---- netkit-ftp-0.17.orig/ftp/ruserpass.c
-+++ netkit-ftp-0.17/ftp/ruserpass.c
+--- a/ftp/ruserpass.c
++++ b/ftp/ruserpass.c
 @@ -46,6 +46,7 @@
  #include <string.h>
  #include <unistd.h>
@@ -2904,8 +2893,8 @@
                        }
                        break;
                case MACDEF:
---- netkit-ftp-0.17.orig/ftp/main.h
-+++ netkit-ftp-0.17/ftp/main.h
+--- /dev/null
++++ b/ftp/main.h
 @@ -0,0 +1,20 @@
 +#include <obstack.h>
 +#include <signal.h>
diff -Nru netkit-ftp-0.17/debian/patches/020_optional_stripping.diff 
netkit-ftp-0.17/debian/patches/020_optional_stripping.diff
--- netkit-ftp-0.17/debian/patches/020_optional_stripping.diff  2016-12-02 
16:04:37.000000000 +0100
+++ netkit-ftp-0.17/debian/patches/020_optional_stripping.diff  1970-01-01 
01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-Description: Hard coded stripping behaviour.
- Remove explicit stripping from makefile target.
-X-Closes: #437615
-X-Comment: debdiff netkit-ftp_0.17-{12,16}.dsc
-Author: Alberto Gonzalez Iniesta <a...@inittab.org>
-Forwarded: no
-Last-Update: 2008-03-21
-diff -u netkit-ftp-0.17/ftp/Makefile netkit-ftp-0.17/ftp/Makefile
---- netkit-ftp-0.17/ftp/Makefile
-+++ netkit-ftp-0.17/ftp/Makefile
-@@ -16,7 +16,7 @@
- cmds.o glob.o: glob.h
- 
- install: ftp
--      install -s -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
-+      install $(INSTALL_OPTS) -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
-       ln -sf ftp $(INSTALLROOT)$(BINDIR)/pftp
-       install -m$(MANMODE) ftp.1 $(INSTALLROOT)$(MANDIR)/man1
-       ln -sf ftp.1 $(INSTALLROOT)$(MANDIR)/man1/pftp.1
diff -Nru netkit-ftp-0.17/debian/patches/052_no_termcap_linking.diff 
netkit-ftp-0.17/debian/patches/052_no_termcap_linking.diff
--- netkit-ftp-0.17/debian/patches/052_no_termcap_linking.diff  2016-12-02 
16:04:37.000000000 +0100
+++ netkit-ftp-0.17/debian/patches/052_no_termcap_linking.diff  1970-01-01 
01:00:00.000000000 +0100
@@ -1,158 +0,0 @@
-Description: Remove explicit termcap linking.
- Present day libreadline includes all needed
- linking with libtinfo, so no explicit linking
- either with libncurses or libtermcap is needed.
-Author: Mats Erik Andersson <deb...@gisladisker.se>
-Forwarded: no
-Last-Update: 2012-03-26
-
-diff -Naurp netkit-ftp-0.17.debian/configure netkit-ftp-0.17/configure
---- netkit-ftp-0.17.debian/configure
-+++ netkit-ftp-0.17/configure
-@@ -187,61 +187,61 @@ rm -f __conftest*
- 
- ##################################################
- 
--echo -n 'Checking for ncurses... '
--cat <<EOF >__conftest.c
--#include <stdio.h>
--#include <curses.h>
--#ifndef KEY_DOWN
--syntax error. /* not ncurses */
--#endif
--int main() {
--    endwin();
--    return 0;
--}
--
--EOF
--if (
--      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
--   ) >/dev/null 2>&1; then
--    echo 'yes'
--    NCURSES=1
--else
--    if (
--          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o 
__conftest || exit 1
--       ) >/dev/null 2>&1; then
--        echo '-I/usr/include/ncurses'
--        CFLAGS="$CFLAGS -I/usr/include/ncurses"
--        NCURSES=1
--    else
--        echo 'no'
--    fi
--fi
--
--if [ x$NCURSES != x ]; then
--    LIBTERMCAP=-lncurses
--else
--    echo -n 'Checking for traditional termcap... '
--cat <<EOF >__conftest.c
--#include <stdio.h>
--#include <termcap.h>
--int main() {
--    tgetent(NULL, NULL); return 0;
--}
--
--EOF
--    if (
--          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
--       ) >/dev/null 2>&1; then
--        echo '-ltermcap'
--        LIBTERMCAP=-ltermcap
--    else
--        echo 'not found'
--        echo 'This package needs termcap to run.'
--        rm -f __conftest*
--        exit
--    fi
--fi
--rm -f __conftest*
-+#echo -n 'Checking for ncurses... '
-+#cat <<EOF >__conftest.c
-+##include <stdio.h>
-+##include <curses.h>
-+##ifndef KEY_DOWN
-+#syntax error. /* not ncurses */
-+##endif
-+#int main() {
-+#    endwin();
-+#    return 0;
-+#}
-+#
-+#EOF
-+#if (
-+#      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
-+#   ) >/dev/null 2>&1; then
-+#    echo 'yes'
-+#    NCURSES=1
-+#else
-+#    if (
-+#          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o 
__conftest || exit 1
-+#       ) >/dev/null 2>&1; then
-+#        echo '-I/usr/include/ncurses'
-+#        CFLAGS="$CFLAGS -I/usr/include/ncurses"
-+#        NCURSES=1
-+#    else
-+#        echo 'no'
-+#    fi
-+#fi
-+#
-+#if [ x$NCURSES != x ]; then
-+#    LIBTERMCAP=-lncurses
-+#else
-+#    echo -n 'Checking for traditional termcap... '
-+#cat <<EOF >__conftest.c
-+##include <stdio.h>
-+##include <termcap.h>
-+#int main() {
-+#    tgetent(NULL, NULL); return 0;
-+#}
-+#
-+#EOF
-+#    if (
-+#          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
-+#       ) >/dev/null 2>&1; then
-+#        echo '-ltermcap'
-+#        LIBTERMCAP=-ltermcap
-+#    else
-+#        echo 'not found'
-+#        echo 'This package needs termcap to run.'
-+#        rm -f __conftest*
-+#        exit
-+#    fi
-+#fi
-+#rm -f __conftest*
- 
- ##################################################
- 
-@@ -278,7 +278,7 @@ int main() { readline("foo"); return 0;
- 
- EOF
- if (
--      $CC $CFLAGS  __conftest.c -lreadline $LIBTERMCAP -o __conftest || exit 1
-+      $CC $CFLAGS  __conftest.c -lreadline -o __conftest || exit 1
-    ) >/dev/null 2>&1; then
-         echo 'yes'
-         USE_READLINE=1
-@@ -436,7 +436,7 @@ echo 'Generating MCONFIG...'
-     echo "LDFLAGS=$LDFLAGS" | sed 's/= */=/'
-     echo "LIBS=$LIBS" | sed 's/= */=/'
- 
--    echo "LIBTERMCAP=$LIBTERMCAP"
-+    #echo "LIBTERMCAP=$LIBTERMCAP"
-     echo "USE_GLIBC=$USE_GLIBC"
-     echo "USE_READLINE=$USE_READLINE"
- ) > MCONFIG
-diff -Naurp netkit-ftp-0.17.debian/ftp/Makefile netkit-ftp-0.17/ftp/Makefile
---- netkit-ftp-0.17.debian/ftp/Makefile        2012-03-26 11:50:15.000000000 
+0200
-+++ netkit-ftp-0.17/ftp/Makefile       2012-03-26 11:53:02.000000000 +0200
-@@ -5,7 +5,7 @@ include ../MRULES
- 
- ifeq ($(USE_READLINE),1)
- CFLAGS += -D__USE_READLINE__
--LIBS += -lreadline $(LIBTERMCAP)
-+LIBS += -lreadline
- endif
- 
- ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o
diff -Nru netkit-ftp-0.17/debian/patches/series 
netkit-ftp-0.17/debian/patches/series
--- netkit-ftp-0.17/debian/patches/series       2016-12-02 16:04:37.000000000 
+0100
+++ netkit-ftp-0.17/debian/patches/series       2018-12-09 23:54:19.000000000 
+0100
@@ -1,5 +1,4 @@
 010_patches_in_sarge.diff
-020_optional_stripping.diff
 025_long_cmd_overflow.diff
 030_argv_handling.diff
 035_lintian_pedantic.diff
@@ -7,6 +6,7 @@
 041_user_address_commands.diff
 043_tune_non_autologin.diff
 050_support_gnu_hurd.diff
-052_no_termcap_linking.diff
 060_full_offset_range.diff
 070_hash_increments.diff
+use-cmake-as-buildsystem.patch
+use-cmake-as-buildsystem-debian-extras.patch
diff -Nru 
netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 
netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
--- netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 
1970-01-01 01:00:00.000000000 +0100
+++ netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 
2019-02-24 14:27:52.000000000 +0100
@@ -0,0 +1,58 @@
+Description: Adjust install paths and file names for Debian
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Forwarded: not-needed
+Last-Update: 2019-02-24
+
+--- a/ftp/CMakeLists.txt
++++ b/ftp/CMakeLists.txt
+@@ -1,6 +1,11 @@
+ 
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
++if(USE_READLINE)
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__USE_READLINE__")
++endif()
++
+ add_executable(
+-    ftp
++    netkit-ftp
+     cmds.c
+     cmdtab.c
+     domacro.c
+@@ -9,28 +14,23 @@
+     ruserpass.c
+ )
+ install(
+-    TARGETS ftp
++    TARGETS netkit-ftp
+     DESTINATION ${BIN_DIR}
+ )
+-install(
+-    CODE "execute_process( \
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
+-    )"
+-)
+-
++if(USE_READLINE)
++    target_link_libraries(
++        netkit-ftp
++        readline
++    )
++endif()
+ install(
+     FILES ftp.1
+     DESTINATION ${MAN_DIR}/man1/
+-)
+-install(
+-    CODE "execute_process( \
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-        pftp.1 \$ENV{DESTDIR}${MAN_DIR}/pftp.1 \
+-    )"
++    RENAME netkit-ftp.1
+ )
+ 
+ install(
+     FILES netrc.5
+     DESTINATION ${MAN_DIR}/man5/
++    RENAME netkit-netrc.5
+ )
diff -Nru netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem.patch 
netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem.patch
--- netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem.patch       
1970-01-01 01:00:00.000000000 +0100
+++ netkit-ftp-0.17/debian/patches/use-cmake-as-buildsystem.patch       
2019-02-24 14:27:52.000000000 +0100
@@ -0,0 +1,57 @@
+Description: Use cmake as build system
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Bug-Debian: https://bugs.debian.org/912125
+Last-Update: 2019-02-24
+
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,10 @@
++cmake_minimum_required(VERSION 3.7)
++project(netkit-ftp)
++
++set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
++
++find_library(USE_READLINE readline)
++find_library(USE_CRYPT crypt REQUIRED)
++
++add_subdirectory(ftp)
+--- /dev/null
++++ b/ftp/CMakeLists.txt
+@@ -0,0 +1,36 @@
++
++add_executable(
++    ftp
++    cmds.c
++    cmdtab.c
++    domacro.c
++    ftp.c
++    main.c
++    ruserpass.c
++)
++install(
++    TARGETS ftp
++    DESTINATION ${BIN_DIR}
++)
++install(
++    CODE "execute_process( \
++        COMMAND ${CMAKE_COMMAND} -E create_symlink \
++        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
++    )"
++)
++
++install(
++    FILES ftp.1
++    DESTINATION ${MAN_DIR}/man1/
++)
++install(
++    CODE "execute_process( \
++        COMMAND ${CMAKE_COMMAND} -E create_symlink \
++        pftp.1 \$ENV{DESTDIR}${MAN_DIR}/pftp.1 \
++    )"
++)
++
++install(
++    FILES netrc.5
++    DESTINATION ${MAN_DIR}/man5/
++)
diff -Nru netkit-ftp-0.17/debian/rules netkit-ftp-0.17/debian/rules
--- netkit-ftp-0.17/debian/rules        2016-12-02 16:18:17.000000000 +0100
+++ netkit-ftp-0.17/debian/rules        2018-12-09 23:52:22.000000000 +0100
@@ -1,97 +1,7 @@
 #!/usr/bin/make -f
-# $Id: rules,v 1.9 2001/12/11 09:03:39 herbert Exp $
-# Adapted for netkit-ftp.  Copyright 1999 by Herbert Xu.
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-DEFS := -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+%:
+       dh $@ --buildsystem=cmake
 
-CFLAGS += $(shell dpkg-buildflags --get CFLAGS) -fPIE -pie
-CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
-LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,now
-
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-       CROSS :=
-else
-       CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
-endif
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
-       dh_testdir
-
-       if [ ! -f MCONFIG ]; then \
-               ./configure; \
-               sed -e 's;^CFLAGS=\(.*\)$$;CFLAGS= -g $(DEFS) 
-fno-strict-aliasing $(CFLAGS) $(CPPFLAGS) \1;' \
-                   -e 's;^LDFLAGS=\(.*\)$$;& $(LDFLAGS);' \
-                   MCONFIG > MCONFIG.new; \
-               mv MCONFIG.new MCONFIG; \
-       fi
-       $(MAKE) $(CROSS)
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp install-stamp
-
-       [ ! -f MCONFIG ] || $(MAKE) distclean
-
-       dh_clean
-
-install: install-stamp
-install-stamp: build-stamp
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs
-
-       $(MAKE) INSTALLROOT=`pwd`/debian/ftp MANDIR=/usr/share/man install
-       mv debian/ftp/usr/bin/ftp debian/ftp/usr/bin/netkit-ftp
-       #ln -sf netkit-ftp debian/ftp/usr/bin/pftp
-       rm -f debian/ftp/usr/bin/pftp
-       mv debian/ftp/usr/share/man/man1/ftp.1 \
-          debian/ftp/usr/share/man/man1/netkit-ftp.1
-       #ln -sf netkit-ftp.1 debian/ftp/usr/share/man/man1/pftp.1
-       rm -f debian/ftp/usr/share/man/man1/pftp.1
-       mv debian/ftp/usr/share/man/man5/netrc.5 \
-          debian/ftp/usr/share/man/man5/netkit-netrc.5
-
-       touch install-stamp
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-#      dh_testversion
-       dh_testdir
-       dh_testroot
-       dh_installdocs
-       dh_installexamples
-       dh_installmenu
-       dh_installcron
-       dh_installman
-       dh_installchangelogs ChangeLog
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-source diff:
-       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+override_dh_auto_install:
+       dh_auto_install --destdir=debian/tmp

Attachment: signature.asc
Description: PGP signature

Reply via email to