makefile patch
[ckermit.git] / debian / rules
old mode 100644 (file)
new mode 100755 (executable)
index b945e34..b6fc62d
@@ -2,17 +2,23 @@
 # -*- makefile -*-
 # debian/rules for ckermit
 # GNU copyright 1997 to 1999 by Joey Hess.
-# modified for ckermit by Ian Beckwith <ianb@nessie.mcc.ac.uk>
+# modified for ckermit by Ian Beckwith <ianb@debian.org>
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
 BUILDDIR=`pwd`/debian/ckermit
 
-CFLAGS = -g -DCK_SYSINI=\\\"/etc/kermit/kermrc\\\"    \
-            -DIKSDCONF=\\\"/etc/kermit/iksd.conf\\\"  \
-            -DOPENSSL_097 -DCK_INI_B -DTIMEH -DCK_SOCKS \
-                       -DX509_SUBJECT_ALT_NAME_TO_USER
+CFLAGS = -O2 \
+       -DCK_SYSINI=\\\"/etc/kermit/kermrc\\\"    \
+       -DIKSDCONF=\\\"/etc/kermit/iksd.conf\\\"  \
+       -DCK_INI_B -DCK_SOCKS \
+       -DX509_SUBJECT_ALT_NAME_TO_USER \
+       -DFNFLOAT -DCK_NEWTERM \
+       -DUSE_STRERROR -DCK_NCURSES \
+       -DHAVE_OPENPTY \
+       -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+       -DOPENSSL_097 -DOPENSSL_098 -DOPENSSL_100
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -20,29 +26,22 @@ else
        CFLAGS += -O2
 endif
 
-MAKEOPTS=-f makefile DESTDIR=\"$(BUILDDIR)\" BINDIR=/usr/bin MANDIR=/usr/share/man/man1 INFODIR=/usr/share/doc/ckermit KFLAGS='$(CFLAGS)' LNKFLAGS="-lsocksd"
-
-#MAKETARGET=linux+krb5+krb4+openssl+shadow+pam
-MAKETARGET=linux+shadow+pam
-
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       INSTALL_PROGRAM += -s
-endif
+MAKEOPTS=-f makefile DESTDIR=\"$(BUILDDIR)\" BINDIR=/usr/bin MANDIR=/usr/share/man/man1 INFODIR=/usr/share/doc/ckermit KFLAGS='$(CFLAGS)' LNKFLAGS="-lsocks -lutil -Wl,-z,defs -Wl,--as-needed"
+MAKETARGET=linux+openssl
+#MAKETARGET=linux+krb5+openssl+zlib+shadow+pam
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       # Add here commands to configure the package.
 
        touch configure-stamp
 
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: configure-stamp
        dh_testdir
 
-       # Add here commands to compile the package.
        $(MAKE) $(MAKEOPTS) $(MAKETARGET)
 
        touch build-stamp
@@ -52,16 +51,15 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       # Add here commands to clean up after the build process.
-       -$(MAKE) $(MAKEOPTS) clean
-       -rm -f wermit # no longer cleaned by upstream makefile
-       -rm -f UNINSTALL 
-       dh_clean 
+       $(MAKE) $(MAKEOPTS) clean
+       rm -f wermit # no longer cleaned by upstream makefile
+       rm -f UNINSTALL
+       dh_clean
 
 install: build
        dh_testdir
        dh_testroot
-       dh_clean -k 
+       dh_prep
        dh_installdirs
 
        # Add here commands to install the package into debian/ckermit.
@@ -86,25 +84,16 @@ binary-arch: build install
        dh_testroot
        dh_installchangelogs -k ckc211.txt
        dh_installdocs
-#      dh_installexamples
-       dh_installdirs 
-#      dh_install
+       dh_installdirs
        dh_installmenu
-       dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
+       dh_installdebconf
        dh_installpam --name=kermit
-#      dh_installmime
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
        dh_installman
+       dh_lintian
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
-#      dh_perl
-#      dh_python
        dh_makeshlibs
        dh_installdeb
        dh_shlibdeps