TARGET_DIR = $(CURDIR)/debian/adacurses
SAMPLE_DIR = $(TARGET_DIR)/usr/bin/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
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
$(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
dh_compress
dh_fixperms
dh_installdeb
+ dh_makeshlibs
dh_shlibdeps
dh_gencontrol
dh_md5sums