Alpine.mk: better names for the rules.
parent
ee0d4cc27a
commit
29ca3ebabd
12
mk/alpine.mk
12
mk/alpine.mk
|
@ -4,10 +4,10 @@ VERSION ?= v3.20
|
||||||
MIRROR ?= http://uk.alpinelinux.org/alpine/
|
MIRROR ?= http://uk.alpinelinux.org/alpine/
|
||||||
URL_REPOS ?= $(MIRROR)$(VERSION)
|
URL_REPOS ?= $(MIRROR)$(VERSION)
|
||||||
|
|
||||||
enter-chroot:
|
enter:
|
||||||
chroot $(CHROOT) /bin/sh
|
chroot $(CHROOT) /bin/sh
|
||||||
|
|
||||||
install-chroot:
|
install:
|
||||||
@echo "creating a new alpine $(VERSION) chroot"
|
@echo "creating a new alpine $(VERSION) chroot"
|
||||||
mkdir -p $(CHROOT)
|
mkdir -p $(CHROOT)
|
||||||
apk --arch $(ARCH) -X $(URL_REPOS)/main/ -U --allow-untrusted --root $(CHROOT) --initdb add alpine-base
|
apk --arch $(ARCH) -X $(URL_REPOS)/main/ -U --allow-untrusted --root $(CHROOT) --initdb add alpine-base
|
||||||
|
@ -15,15 +15,15 @@ install-chroot:
|
||||||
echo "$(URL_REPOS)/main" > $(CHROOT)/etc/apk/repositories
|
echo "$(URL_REPOS)/main" > $(CHROOT)/etc/apk/repositories
|
||||||
echo "$(URL_REPOS)/community" >> $(CHROOT)/etc/apk/repositories
|
echo "$(URL_REPOS)/community" >> $(CHROOT)/etc/apk/repositories
|
||||||
|
|
||||||
mount-chroot:
|
mount:
|
||||||
for a in proc sys dev; do mount -o bind /$$a $(CHROOT)/$$a; done
|
for a in proc sys dev; do mount -o bind /$$a $(CHROOT)/$$a; done
|
||||||
|
|
||||||
umount-chroot:
|
unmount:
|
||||||
-umount $(CHROOT)/proc
|
-umount $(CHROOT)/proc
|
||||||
-umount $(CHROOT)/sys
|
-umount $(CHROOT)/sys
|
||||||
-umount $(CHROOT)/dev
|
-umount $(CHROOT)/dev
|
||||||
|
|
||||||
delete-chroot: umount-chroot
|
delete: unmount
|
||||||
rm -r $(CHROOT)
|
rm -r $(CHROOT)
|
||||||
|
|
||||||
new-chroot: install-chroot mount-chroot enter-chroot
|
new: install mount enter
|
||||||
|
|
Loading…
Reference in New Issue