xbps-src: no need to subst shell helpers anymore.
This commit is contained in:
parent
c011a2749b
commit
99578ee070
|
@ -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 $@
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 $?
|
||||
}
|
||||
|
|
@ -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.
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue