Merge xbps-src code to make it usable in a standalone mode.

The new xbps-src configuration file is `etc/conf` where you can
add your local overrides from defaults set via `etc/defaults.conf`.

To use this xbps-src, run these steps:

	$ make
	$ sudo make setup (to make chroot helper setgid)
	$ ./xbps-src ...
This commit is contained in:
Juan RP
2014-03-22 12:31:42 +01:00
parent 49e9dc0df8
commit 0b95cb8f5d
20 changed files with 2825 additions and 0 deletions

32
Makefile Normal file
View File

@@ -0,0 +1,32 @@
# xbps-packages top-level Makefile.
#
# MUTABLE VARIABLES
PRIVILEGED_GROUP ?= xbuilder
# INMUTABLE VARIABLES
VERSION = 112
GITVER := $(shell git rev-parse --short HEAD)
SHAREDIR = common/xbps-src/shutils
LIBEXECDIR = common/xbps-src/libexec
CHROOT_C = uchroot.c
CHROOT_BIN = xbps-src-chroot-helper
CFLAGS += -O2 -Wall -Werror
.PHONY: all setup clean
all:
sed -e "s|@@XBPS_SRC_VERSION@@|$(VERSION) ($(GITVER))|g" \
${CURDIR}/common/xbps-src/xbps-src.sh > ${CURDIR}/xbps-src
$(CC) $(CFLAGS) ${LIBEXECDIR}/$(CHROOT_C) -o ${LIBEXECDIR}/$(CHROOT_BIN)
chmod 755 xbps-src
@echo
@echo "The chroot helper must be a setgid binary (4750) for the group '$(PRIVILEGED_GROUP)'."
@echo "Please run 'sudo make setup' to set appropiate permissions."
setup:
chown root:$(PRIVILEGED_GROUP) $(LIBEXECDIR)/$(CHROOT_BIN)
chmod 4750 $(LIBEXECDIR)/$(CHROOT_BIN)
clean:
rm -f xbps-src $(LIBEXECDIR)/$(CHROOT_BIN)