2009-10-18 09:17:26 +00:00
|
|
|
include ../vars.mk
|
|
|
|
|
2010-12-21 11:33:46 +00:00
|
|
|
# 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
|
|
|
|
|
2009-10-18 09:17:26 +00:00
|
|
|
CONF_FILE = xbps-src.conf
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all:
|
2010-12-21 11:33:46 +00:00
|
|
|
sed -e "s|@@XBPS_DISTRIBDIR@@|${DISTRIBDIR}|" \
|
|
|
|
${CONF_FILE}.in > ${CONF_FILE}
|
2009-10-18 09:17:26 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2010-12-21 11:33:46 +00:00
|
|
|
-rm -f ${CONF_FILE}
|
2009-10-18 09:17:26 +00:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install:
|
|
|
|
if [ ! -d $(DESTDIR)$(ETCDIR) ]; then \
|
|
|
|
install -d $(DESTDIR)$(ETCDIR); \
|
|
|
|
fi
|
|
|
|
|
2011-11-18 15:06:11 +00:00
|
|
|
if [ ! -f $(DESTDIR)$(ETCDIR)/$(CONF_FILE) ]; then \
|
|
|
|
install -m644 $(CONF_FILE) $(DESTDIR)$(ETCDIR); \
|
2009-10-18 09:17:26 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|