void-packages/xbps-src/etc/Makefile
Juan RP 4616674b86 xbps-src: find out the correct path for XBPS_DISTRIBUTIONDIR in the build process.
--HG--
rename : xbps-src/etc/xbps-src.conf => xbps-src/etc/xbps-src.conf.in
2010-12-21 12:33:46 +01:00

34 lines
661 B
Makefile

include ../vars.mk
# Find out the real path for the xbps-src distribdir.
_CURDIR = $(shell dirname $(shell pwd))
ifeq ($(shell basename ${_CURDIR}), xbps-src)
DISTRIBDIR = $(subst /xbps-src,,${_CURDIR})
else
DISTRIBDIR = ${_CURDIR}
endif
CONF_FILE = xbps-src.conf
.PHONY: all
all:
sed -e "s|@@XBPS_DISTRIBDIR@@|${DISTRIBDIR}|" \
${CONF_FILE}.in > ${CONF_FILE}
.PHONY: clean
clean:
-rm -f ${CONF_FILE}
.PHONY: install
install:
if [ ! -d $(DESTDIR)$(ETCDIR) ]; then \
install -d $(DESTDIR)$(ETCDIR); \
fi
if [ ! -f $(DESTDIR)$(ETCDIR)/$(CONF_FILE) ]; then \
install -m 644 $(CONF_FILE) $(DESTDIR)$(ETCDIR); \
fi
.PHONY: uninstall
uninstall: