Added support to build pkgs in the chroot as normal user via capchroot.
Please read the comment in xbps-src.conf to use it. Fully tested and working nicely, probably some pkgs will need minimal changes. --HG-- extra : convert_revision : 820ad6d48aa74cf5b6db1871adea750acccaa82f
This commit is contained in:
parent
5d6d7b0f4e
commit
e57940985e
15 changed files with 406 additions and 242 deletions
|
@ -1,36 +1,43 @@
|
|||
include vars.mk
|
||||
|
||||
BIN = xbps-src
|
||||
SUBDIRS = etc common helpers triggers shutils
|
||||
BINS = xbps-src
|
||||
SUBDIRS = etc common libexec helpers triggers shutils
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
sed -e "s|@@XBPS_INSTALL_PREFIX@@|$(PREFIX)|g" \
|
||||
-e "s|@@XBPS_INSTALL_ETCDIR@@|$(ETCDIR)|g" \
|
||||
-e "s|@@XBPS_INSTALL_SHAREDIR@@|$(SHAREDIR)|g" \
|
||||
$(BIN).sh.in > $(BIN)
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir || exit 1; \
|
||||
for bin in $(BINS); do \
|
||||
sed -e "s|@@XBPS_INSTALL_PREFIX@@|$(PREFIX)|g" \
|
||||
-e "s|@@XBPS_INSTALL_ETCDIR@@|$(ETCDIR)|g" \
|
||||
-e "s|@@XBPS_INSTALL_SHAREDIR@@|$(SHAREDIR)|g" \
|
||||
-e "s|@@XBPS_INSTALL_SBINDIR@@|$(SBINDIR)|g" \
|
||||
$$bin.sh.in > $$bin; \
|
||||
done
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f $(BIN)
|
||||
for dir in $(SUBDIRS); do \
|
||||
-rm -f $(BINS)
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir clean || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: install
|
||||
install: all
|
||||
install -d $(SBINDIR)
|
||||
install -m 755 $(BIN) $(SBINDIR)
|
||||
for dir in $(SUBDIRS); do \
|
||||
for bin in $(BINS); do \
|
||||
install -m 755 $$bin $(SBINDIR); \
|
||||
done
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir install || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
-rm -f $(SBINDIR)/$(BIN)
|
||||
for dir in $(SUBDIRS); do \
|
||||
for bin in $(BINS); do \
|
||||
rm -f $(SBINDIR)/$$bin; \
|
||||
done
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir uninstall || exit 1; \
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue