| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
include /usr/share/dpkg/architecture.mk |
| 6 |
include /usr/share/dpkg/buildtools.mk |
| 7 |
|
| 8 |
BUILD_DIR := BUILD |
| 9 |
DH_AUTO_OPTIONS := -v -Sautoconf --parallel -B$(BUILD_DIR) |
| 10 |
DESTDIR := $(CURDIR)/debian/$(shell dh_listpackages) |
| 11 |
|
| 12 |
DEB_BUILD_MAINT_OPTIONS := hardening=+all abi=+lfs |
| 13 |
|
| 14 |
DEB_CFLAGS_MAINT_APPEND := $(shell $(PKG_CONFIG) --cflags libtirpc) |
| 15 |
DEB_LDFLAGS_MAINT_APPEND := $(shell $(PKG_CONFIG) --libs libtirpc) |
| 16 |
DPKG_EXPORT_BUILDFLAGS := 1 |
| 17 |
|
| 18 |
include /usr/share/dpkg/buildflags.mk |
| 19 |
include /usr/share/dpkg/pkg-info.mk |
| 20 |
|
| 21 |
|
| 22 |
ifneq (,$(findstring maintainer,$(DEB_BUILD_OPTIONS))) |
| 23 |
MAINTAINER_MODE := yes |
| 24 |
else |
| 25 |
MAINTAINER_MODE := no |
| 26 |
ifeq (,$(findstring debian/gcc-wrapper,$(CC))) |
| 27 |
CC := $(CURDIR)/debian/gcc-wrapper $(CC) |
| 28 |
endif |
| 29 |
endif |
| 30 |
|
| 31 |
|
| 32 |
%: |
| 33 |
dh ${@} |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
dh_auto_configure $(DH_AUTO_OPTIONS) -- \ |
| 37 |
--with-libwrap \ |
| 38 |
--with-libcap \ |
| 39 |
--without-lsf \ |
| 40 |
--without-libnsl \ |
| 41 |
--disable-silent-rules \ |
| 42 |
--enable-warnings \ |
| 43 |
--enable-maintainer-mode=$(MAINTAINER_MODE) \ |
| 44 |
CC="$(CC)" |
| 45 |
|
| 46 |
|
| 47 |
override_dh_auto_build: |
| 48 |
dh_auto_build $(DH_AUTO_OPTIONS) |
| 49 |
|
| 50 |
override_dh_auto_clean: |
| 51 |
dh_auto_clean $(DH_AUTO_OPTIONS) |
| 52 |
|
| 53 |
override_dh_auto_install: |
| 54 |
dh_auto_install $(DH_AUTO_OPTIONS) |
| 55 |
|
| 56 |
cp -a debian/rlinetd.conf $(DESTDIR)/etc |
| 57 |
find $(DESTDIR)/usr/lib -name '*.la' -delete |
| 58 |
|
| 59 |
sed -e 's/#VERSION#/$(DEB_VERSION)/g' \ |
| 60 |
<debian/update-inetd.sh \ |
| 61 |
> $(DESTDIR)/usr/sbin/update-inetd |
| 62 |
chmod 755 $(DESTDIR)/usr/sbin/update-inetd |