debian/rules: add -DSELECT on kfreebsd
[ckermit.git] / debian / rules
index 6757c3b..ab73041 100755 (executable)
@@ -1,10 +1,5 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-# modified for ckermit by Ian Beckwith <ianb@debian.org>
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -19,7 +14,12 @@ CFLAGS =-g \
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
-       CFLAGS += -O2
+       CFLAGS += -O1
+endif
+
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
+       CFLAGS += -DSELECT
 endif
 
 MAKEOPTS=-f makefile DESTDIR=\"$(BUILDDIR)\" BINDIR=/usr/bin MANDIR=/usr/share/man/man1 INFODIR=/usr/share/doc/ckermit KFLAGS='$(CFLAGS)' LNKFLAGS="-Wl,-z,defs -Wl,--as-needed"
@@ -50,7 +50,7 @@ override_dh_auto_install:
        rm "$(BUILDDIR)/usr/share/doc/ckermit/COPYING.TXT"
 
 override_dh_installchangelogs:
-       dh_installchangelogs -k ckc300.txt
+       dh_installchangelogs -k ckc301.txt
 
 override_dh_installpam:
        dh_installpam --name=kermit