1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/usr/bin/make -f
PACKAGE = micro-httpd
BIN = micro_httpd
include debian/debian-vars.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
man:
# target: man -- convert *.pod to manual page
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
MANSECT=8 makeman
override_dh_auto_build: man
# Notify Makefile about compilation. We skip the *.o step.
touch micro_httpd.o
$(CC) $(CFLAGS) $(CPPFLAGS) micro_httpd.c $(LDFLAGS) -o $(BIN)
override_dh_auto_install:
install -d -m 0755 $(SBINDIR) $(MAN8DIR)
$(MAKE) install BINDIR=$(SBINDIR) MANDIR=$(MAN8DIR)
# rename binary
mv $(SBINDIR)/$(BIN) $(SBINDIR)/$(PACKAGE)
# replace original manual page
rm -f $(MAN8DIR)/*
$(INSTALL_DATA) debian/*.8 $(MAN8DIR)
override_dh_systemd_enable:
dh_systemd_enable micro-httpd\@.service micro-httpd.socket
%:
dh $@ --with systemd
.PHONY: man
# End of file
|