Makefile: use variable '$(PORTS_DIR)' instead of hardcoded directory name
This commit is contained in:
parent
66310d6d19
commit
9f096fd7fe
11
Makefile
11
Makefile
@ -10,6 +10,7 @@ KERNEL_VERSION = 2.6.23.9
|
||||
KERNEL_PATCHES = squashfs3.3-patch
|
||||
STATIC_BB = http://jaeger.morpheus.net/linux/crux/files/busybox-1.7.2-i386-static.bz2
|
||||
SYSLINUX_VERSION = 3.60
|
||||
PORTS_DIR = $(PWD)/ports
|
||||
FAKE_ROOT_DIR = $(PWD)/tmp/fake_root
|
||||
SQUASHFS_DIR = $(PWD)/tmp/squashfs
|
||||
DATE_STR = `date +'%Y%m%d'`
|
||||
@ -24,7 +25,7 @@ ISO_PACKAGES = filesystem bash coreutils bzip2 e2fsprogs jfsutils \
|
||||
sysfsutils usbutils hotplug udev zlib openssl openssh \
|
||||
dhcpcd wget iproute2
|
||||
|
||||
PORTS_core = $(shell /bin/ls -I README ports/core)
|
||||
PORTS_core = $(shell /bin/ls -I README $(PORTS_DIR)/core)
|
||||
PORTS_opt = $(shell /bin/cat packages.opt)
|
||||
PORTS_xorg = $(shell /bin/cat packages.xorg)
|
||||
|
||||
@ -133,7 +134,7 @@ distclean: clean kernel-distclean syslinux-distclean
|
||||
$(COLLECTIONS): check-root
|
||||
@for p in $(PORTS_$(@)); do \
|
||||
echo "port: $$p"; \
|
||||
(cd ports/$@/$$p && pkgmk -d $(PKGMK_FORCE)); \
|
||||
(cd $(PORTS_DIR)/$@/$$p && pkgmk -d $(PKGMK_FORCE)); \
|
||||
done
|
||||
|
||||
all: $(COLLECTIONS)
|
||||
@ -146,7 +147,7 @@ all-chroot: check-root
|
||||
@mkdir -p $(FAKE_ROOT_DIR)/var/lib/pkg
|
||||
@touch $(FAKE_ROOT_DIR)/var/lib/pkg/db
|
||||
@for COLL in $(COLLECTIONS); do \
|
||||
for PACKAGE in ports/$$COLL/*/*.pkg.tar.gz; do \
|
||||
for PACKAGE in $(PORTS_DIR)/$$COLL/*/*.pkg.tar.gz; do \
|
||||
echo " $$PACKAGE"; \
|
||||
pkgadd -r $(FAKE_ROOT_DIR) $$PACKAGE; \
|
||||
done; \
|
||||
@ -220,7 +221,7 @@ squashfs: kernel busybox
|
||||
@echo "Creating squashfs filesystem..."
|
||||
@mkdir -p $(SQUASHFS_DIR)
|
||||
@for PACKAGE in $(ISO_PACKAGES); do \
|
||||
tar -C $(SQUASHFS_DIR) -xzpf ports/*/$$PACKAGE/$$PACKAGE\#*.pkg.tar.gz; \
|
||||
tar -C $(SQUASHFS_DIR) -xzpf $(PORTS_DIR)/*/$$PACKAGE/$$PACKAGE\#*.pkg.tar.gz; \
|
||||
done
|
||||
@sed -i -e 's/^#PermitRootLogin yes/PermitRootLogin yes/' \
|
||||
$(SQUASHFS_DIR)/etc/ssh/sshd_config
|
||||
@ -284,7 +285,7 @@ iso: check-root kernel syslinux initramfs squashfs
|
||||
done
|
||||
@for COLL in $(COLLECTIONS); do \
|
||||
mkdir -p $(ISO_ROOT_DIR)/crux/$$COLL; \
|
||||
cp ports/$$COLL/*/*.pkg.tar.gz $(ISO_ROOT_DIR)/crux/$$COLL; \
|
||||
cp $(PORTS_DIR)/$$COLL/*/*.pkg.tar.gz $(ISO_ROOT_DIR)/crux/$$COLL; \
|
||||
done
|
||||
@echo "- Copying squashfs filesystem"
|
||||
@cp squashfs/crux.squashfs $(ISO_ROOT_DIR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user