mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +08:00
[Makefile] remove mkinitcpio dependency (#136)
[Makefile] remove `mkinitcpio` dependency
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
PKGNAME ?= grub-btrfs
|
PKGNAME ?= grub-btrfs
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
|
|
||||||
|
INITCPIO ?= false
|
||||||
|
|
||||||
SHARE_DIR = $(DESTDIR)$(PREFIX)/share
|
SHARE_DIR = $(DESTDIR)$(PREFIX)/share
|
||||||
LIB_DIR = $(DESTDIR)$(PREFIX)/lib
|
LIB_DIR = $(DESTDIR)$(PREFIX)/lib
|
||||||
|
|
||||||
@@ -13,7 +15,7 @@ install:
|
|||||||
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.path
|
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.path
|
||||||
@install -Dm644 -t "$(SHARE_DIR)/licenses/$(PKGNAME)/" LICENSE
|
@install -Dm644 -t "$(SHARE_DIR)/licenses/$(PKGNAME)/" LICENSE
|
||||||
@# Arch Linux like distros only :
|
@# Arch Linux like distros only :
|
||||||
@if command -V mkinitcpio >/dev/null 2>&1; then \
|
@if test "$(INITCPIO)" = true; then \
|
||||||
install -Dm644 "initramfs/Arch Linux/overlay_snap_ro-install" "$(LIB_DIR)/initcpio/install/grub-btrfs-overlayfs"; \
|
install -Dm644 "initramfs/Arch Linux/overlay_snap_ro-install" "$(LIB_DIR)/initcpio/install/grub-btrfs-overlayfs"; \
|
||||||
install -Dm644 "initramfs/Arch Linux/overlay_snap_ro-hook" "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"; \
|
install -Dm644 "initramfs/Arch Linux/overlay_snap_ro-hook" "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"; \
|
||||||
fi
|
fi
|
||||||
@@ -29,8 +31,8 @@ uninstall:
|
|||||||
@rm -f "$(LIB_DIR)/systemd/system/grub-btrfs.path"
|
@rm -f "$(LIB_DIR)/systemd/system/grub-btrfs.path"
|
||||||
@rm -f "$(LIB_DIR)/initcpio/install/grub-btrfs-overlayfs"
|
@rm -f "$(LIB_DIR)/initcpio/install/grub-btrfs-overlayfs"
|
||||||
@rm -f "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"
|
@rm -f "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"
|
||||||
@# Arch Linux unlike distros only :
|
@# Arch Linux UNlike distros only :
|
||||||
@if ! command -V mkinitcpio >/dev/null 2>&1; then \
|
@if test "$(INITCPIO)" != true && test -d "$(LIB_DIR)/initcpio"; then \
|
||||||
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio/install" || :; \
|
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio/install" || :; \
|
||||||
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio/hooks" || :; \
|
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio/hooks" || :; \
|
||||||
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio" || :; \
|
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio" || :; \
|
||||||
|
|||||||
Reference in New Issue
Block a user