mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-06 22:35:18 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f22fd8630 | ||
|
|
88a0320d62 | ||
|
|
87b816345b |
23
Makefile
23
Makefile
@@ -1,6 +1,8 @@
|
||||
PKGNAME ?= grub-btrfs
|
||||
PREFIX ?= /usr
|
||||
|
||||
INITCPIO ?= false
|
||||
|
||||
SHARE_DIR = $(DESTDIR)$(PREFIX)/share
|
||||
LIB_DIR = $(DESTDIR)$(PREFIX)/lib
|
||||
|
||||
@@ -13,7 +15,7 @@ install:
|
||||
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.path
|
||||
@install -Dm644 -t "$(SHARE_DIR)/licenses/$(PKGNAME)/" LICENSE
|
||||
@# 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-hook" "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"; \
|
||||
fi
|
||||
@@ -29,8 +31,8 @@ uninstall:
|
||||
@rm -f "$(LIB_DIR)/systemd/system/grub-btrfs.path"
|
||||
@rm -f "$(LIB_DIR)/initcpio/install/grub-btrfs-overlayfs"
|
||||
@rm -f "$(LIB_DIR)/initcpio/hooks/grub-btrfs-overlayfs"
|
||||
@# Arch Linux unlike distros only :
|
||||
@if ! command -V mkinitcpio >/dev/null 2>&1; then \
|
||||
@# Arch Linux UNlike distros only :
|
||||
@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/hooks" || :; \
|
||||
rmdir --ignore-fail-on-non-empty "$(LIB_DIR)/initcpio" || :; \
|
||||
@@ -50,11 +52,12 @@ help:
|
||||
@echo " uninstall"
|
||||
@echo " help"
|
||||
@echo
|
||||
@echo " parameters | description | defaults"
|
||||
@echo " -----------+--------------------------------+----------------------------"
|
||||
@echo " DESTDIR | install destination | <unset>"
|
||||
@echo " PREFIX | system tree prefix | '/usr'"
|
||||
@echo " SHARE_DIR | shared data location | '\$$(DESTDIR)\$$(PREFIX)/share'"
|
||||
@echo " LIB_DIR | system libraries location | '\$$(DESTDIR)\$$(PREFIX)/lib'"
|
||||
@echo " PKGNAME | name of the ditributed package | 'grub-btrfs'"
|
||||
@echo " parameter | type | description | defaults"
|
||||
@echo " ----------+------+--------------------------------+----------------------------"
|
||||
@echo " DESTDIR | path | install destination | <unset>"
|
||||
@echo " PREFIX | path | system tree prefix | '/usr'"
|
||||
@echo " SHARE_DIR | path | shared data location | '\$$(DESTDIR)\$$(PREFIX)/share'"
|
||||
@echo " LIB_DIR | path | system libraries location | '\$$(DESTDIR)\$$(PREFIX)/lib'"
|
||||
@echo " PKGNAME | name | name of the ditributed package | 'grub-btrfs'"
|
||||
@echo " INITCPIO | bool | include mkinitcpio hook | false"
|
||||
@echo
|
||||
|
||||
Reference in New Issue
Block a user