]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/package/debian/rules
ncurses 6.4 - patch 20240420
[ncurses.git] / Ada95 / package / debian / rules
old mode 100644 (file)
new mode 100755 (executable)
index b0b1db1..0adde8d
@@ -12,9 +12,11 @@ DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 TARGET_DIR = $(CURDIR)/debian/adacurses
-SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses
+SAMPLE_DIR = $(TARGET_DIR)/usr/libexec/AdaCurses
 
-CFLAGS =
+CFLAGS   = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         CFLAGS += -O0
@@ -30,11 +32,16 @@ configure: configure-stamp
 configure-stamp:
        dh_testdir
 
-       CFLAGS="$(CFLAGS)" ./configure \
+       CFLAGS="$(CFLAGS)" \
+       CPPFLAGS="$(CPPFLAGS)" \
+       LDFLAGS="$(LDFLAGS)" ./configure \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/usr \
-               --with-ada-sharedlib
+               --disable-rpath-link \
+               --with-shared \
+               --with-ada-sharedlib \
+               --without-pkg-config
 
        touch configure-stamp
 
@@ -60,13 +67,13 @@ install: install-stamp
 install-stamp: build-stamp
        dh_testdir
        dh_testroot
-       dh_clean -k
+       dh_prep
        dh_installdirs
 
        $(MAKE) install DESTDIR=$(TARGET_DIR)
-       
+
        # FIXME: it would be nice to make these into separate packages
-       ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) )
+       ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) BINDIR=$(SAMPLE_DIR) )
        ( cd doc && $(MAKE) install.html DESTDIR=$(TARGET_DIR) )
 
        touch install-stamp
@@ -86,6 +93,7 @@ binary-arch: build install
        dh_compress
        dh_fixperms
        dh_installdeb
+       dh_makeshlibs
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums