mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-04 02:23:24 +00:00
miniupnpd/Makefile.bsd: use uuid tool set by configure
This commit is contained in:
parent
95a6ffda1f
commit
2be8af3551
@ -144,30 +144,16 @@ clean:
|
||||
$(RM) $(TESTMINISSDPOBJS)
|
||||
$(RM) validateupnppermissions validategetifaddr validatessdppktgen
|
||||
|
||||
install: miniupnpd genuuid
|
||||
install: miniupnpd
|
||||
$(STRIP) miniupnpd
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALLBINDIR)
|
||||
$(INSTALL) -m 755 miniupnpd $(DESTDIR)$(INSTALLBINDIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALLETCDIR)
|
||||
$(INSTALL) -b miniupnpd.conf $(DESTDIR)$(INSTALLETCDIR)/miniupnpd.conf.sample
|
||||
sed -i '' -e "s/^uuid=[-0-9a-fA-F]*/uuid=`$(UUIDBIN)`/" $(DESTDIR)$(INSTALLETCDIR)/miniupnpd.conf.sample
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALLMANDIR)/man8
|
||||
$(INSTALL) -m 644 $(SRCDIR)/miniupnpd.8 $(DESTDIR)$(INSTALLMANDIR)/man8/miniupnpd.8
|
||||
|
||||
# genuuid is using the uuid cli tool available under OpenBSD 4.0 in
|
||||
# the uuid-1.5.0 package
|
||||
# any other cli tool returning a uuid on stdout should work.
|
||||
UUID != if which uuidgen 2>&1 > /dev/null; then \
|
||||
echo `uuidgen` ; \
|
||||
elif which uuid 2>&1 > /dev/null; then \
|
||||
echo `uuid` ; \
|
||||
else echo "00000000-0000-0000-0000-000000000000"; \
|
||||
fi
|
||||
|
||||
genuuid:
|
||||
$(CP) $(SRCDIR)/miniupnpd.conf miniupnpd.conf.before
|
||||
sed -e "s/^uuid=[-0-9a-fA-F]*/uuid=$(UUID)/" miniupnpd.conf.before > miniupnpd.conf
|
||||
$(RM) miniupnpd.conf.before
|
||||
|
||||
check: validateupnppermissions validategetifaddr validatessdppktgen
|
||||
|
||||
validateupnppermissions: $(SRCDIR)/testupnppermissions.sh testupnppermissions
|
||||
|
Loading…
x
Reference in New Issue
Block a user