summaryrefslogtreecommitdiffstats
path: root/dhcpcd/dhcpcd-hooks/Makefile
blob: 5982f1b7d0ffb563eca71a8ba792193f1a6abe77 (plain) (blame)
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
TOP?=	../
include ${TOP}/Makefile.inc
include ${TOP}/config.mk

SCRIPTSDIR=	${LIBEXECDIR}/dhcpcd-hooks
SCRIPTS=	01-test 02-dump
SCRIPTS+=	10-mtu 10-wpa_supplicant 15-timezone 20-resolv.conf
SCRIPTS+=	29-lookup-hostname 30-hostname
SCRIPTS+=	${HOOKSCRIPTS}

all:

clean:

proginstall:
	${INSTALL} -d ${DESTDIR}${SCRIPTSDIR}
	${INSTALL} -m ${NONBINMODE} ${SCRIPTS} ${DESTDIR}${SCRIPTSDIR}

install: proginstall

import:
	${INSTALL} -d /tmp/${DISTPREFIX}/dhcpcd-hooks
	for x in ${SCRIPTS}; do \
		t="/tmp/${DISTPREFIX}/dhcpcd-hooks/$$x"; \
		if test "$$(sed -ne 1p $$x)" = "#!/bin/sh"; then \
			echo "#!/bin/sh" >"$$t"; \
			printf "${IMPORT_SHID}\n" >>"$$t"; \
			echo "" >>"$$t"; \
			sed 1d "$$x" >>"$$t"; \
		else \
			printf "${IMPORT_SHID}\n" >"$$t"; \
			echo "" >>"$$t"; \
			cat "$$x" >>"$$t"; \
		fi; \
	done;