xbps-src: no need to subst shell helpers anymore.

This commit is contained in:
Juan RP 2011-11-18 14:20:00 +01:00
parent c011a2749b
commit 99578ee070
7 changed files with 11 additions and 30 deletions

View File

@ -1,6 +1,6 @@
include ../vars.mk
SCRIPTS = chroot-helper doinst-helper
SCRIPTS = chroot-helper.sh doinst-helper.sh
MOUNT_BIN = capmount
UMOUNT_BIN = capumount
CHROOT_BIN = capchroot
@ -10,26 +10,18 @@ LDFLAGS = -lcap
ifdef IN_CHROOT
BINS =
SCRIPTS = doinst-helper
SCRIPTS = doinst-helper.sh
endif
.PHONY: all
all: $(BINS)
for bin in $(SCRIPTS); 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" \
-e "s|@@XBPS_INSTALL_LIBEXECDIR@@|$(LIBEXECDIR)|g" \
$$bin.sh.in > $$bin; \
done
.PHONY: clean
clean:
-rm -f $(BINS) $(SCRIPTS)
-rm -f $(BINS)
.PHONY: install
install: all
install:
install -d $(DESTDIR)$(LIBEXECDIR)
for bin in $(SCRIPTS); do \
install -m755 $$bin $(DESTDIR)$(LIBEXECDIR); \
@ -50,10 +42,10 @@ uninstall:
done
$(MOUNT_BIN):
$(CC) $(WFLAGS) $(LDFLAGS) mount.c -o $@
$(CC) $(WFLAGS) mount.c $(LDFLAGS) -o $@
$(UMOUNT_BIN):
$(CC) $(WFLAGS) $(LDFLAGS) umount.c -o $@
$(CC) $(WFLAGS) umount.c $(LDFLAGS) -o $@
$(CHROOT_BIN):
$(CC) $(WFLAGS) $(LDFLAGS) chroot.c -o $@
$(CC) $(WFLAGS) chroot.c $(LDFLAGS) -o $@

View File

@ -1,16 +1,5 @@
include ../vars.mk
SCRIPTS = chroot.sh pkgtarget_funcs.sh
.PHONY: all
all:
for f in $(SCRIPTS); do \
sed -e "s|@@XBPS_INSTALL_PREFIX@@|$(PREFIX)|g" \
-e "s|@@XBPS_INSTALL_SHAREDIR@@|$(SHAREDIR)|g" \
-e "s|@@XBPS_INSTALL_LIBEXECDIR@@|$(LIBEXECDIR)|g" \
$$f.in > $$f; \
done
.PHONY: clean
clean:
-rm -f $(SCRIPTS)

View File

@ -28,7 +28,7 @@ _mount()
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
HOSTDIR="${XBPS_HOSTDIR}" XBPS_ETCDIR="${XBPS_ETCDIR}" \
XBPS_SHAREDIR="${XBPS_SHAREDIR}" ${SUDO_CMD} \
${XBPS_LIBEXECDIR}/chroot-helper mount
${XBPS_LIBEXECDIR}/chroot-helper.sh mount
return $?
}
@ -37,7 +37,7 @@ _umount()
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
HOSTDIR="${XBPS_HOSTDIR}" XBPS_ETCDIR="${XBPS_ETCDIR}" \
XBPS_SHAREDIR="${XBPS_SHAREDIR}" ${SUDO_CMD} \
${XBPS_LIBEXECDIR}/chroot-helper umount
${XBPS_LIBEXECDIR}/chroot-helper.sh umount
return $?
}

View File

@ -135,7 +135,7 @@ install_pkg()
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
CONFIG_FILE=${XBPS_CONFIG_FILE} \
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
${XBPS_LIBEXECDIR}/doinst-helper ${curpkgn} \
${XBPS_LIBEXECDIR}/doinst-helper.sh ${curpkgn} \
|| return $?
# Strip binaries/libraries.

View File

@ -6,5 +6,5 @@ SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
# The following vars shouldn't be specified with DESTDIR!
#
SHAREDIR ?= $(PREFIX)/share/xbps-src
LIBEXECDIR ?= $(PREFIX)/libexec
LIBEXECDIR ?= $(PREFIX)/libexec/xbps-src
ETCDIR ?= $(PREFIX)/etc