Debian Codegraph @

debian/rules

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