Add service configuration in case the service-control package is installed.

This commit is contained in:
df 2020-08-02 20:36:10 +01:00
parent 75af91d0cc
commit a9dcc648ae

View File

@ -21,7 +21,7 @@ BIN=testmdnsd mdnsd
LIBTINYSVCMDNS_OBJS = mdns.o mdnsd.o
.PHONY: all clean opkg release
.PHONY: all clean opkg release opkg-service opkg-init
all: $(BIN) libtinysvcmdns.a
@ -43,9 +43,14 @@ libtinysvcmdns.a: $(patsubst %, libtinysvcmdns.a(%), $(LIBTINYSVCMDNS_OBJS))
mdnsd: testmdnsd
strip -o $@ $<
opkg: mdnsd $(wildcard opkg/CONTROL/*) etc/init.d/S80mdnsd
opkg-init: $(wildcard etc/init.d/*)
install -D -p $< opkg/etc/init.d/
opkg-service: $(wildcard etc/modservice.d/*)
install -m 644 -D -p $< opkg/etc/modservice.d
opkg: mdnsd $(wildcard opkg/CONTROL/*) opkg-init opkg-service
install -D -p mdnsd opkg/sbin
install -D -p etc/init.d/S80mdnsd opkg/etc/init.d/
opkg-pack opkg
release: opkg