/
Leprekon
/
packwrap
Обзор
Документация
Войти
/
Leprekon
/
packwrap
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Makefile
57 строк
1 KB
Sergei Chernov
Initial Import
14 июл 2026, 23:07
14 июл 2026, 23:07
b9ecd64
Код
Авторство
О чём код?
.ONESHELL: SHELL := /bin/bash PACKWRAP := ./bin/packwrap VERSION := 0.1.0 PREFIX ?= /usr/local DESTDIR ?= SHARE := $(DESTDIR)$(PREFIX)/share/packwrap .PHONY: all check clean install uninstall all: check check: check-types check-repo-list check-types: @echo "Checking type scripts..." @for d in types/*/; do \ t="$$(basename "$$d")"; \ echo " $$t"; \ [ -f "$$d/repo" ] || { echo "ERROR: $$d/repo not found"; exit 1; }; \ done check-repo-list: @echo "Checking repository availability..." @$(PACKWRAP) help 2>&1 | head -5 install: @echo "Installing packwrap $(VERSION) to $(DESTDIR)$(PREFIX)..." install -Dm755 bin/packwrap "$(DESTDIR)$(PREFIX)/bin/packwrap" install -Dm644 lib/api.sh "$(SHARE)/lib/api.sh" # Type scripts for d in types/*/; do \ t="$$(basename "$$d")"; \ mkdir -p "$(SHARE)/types/$$t"; \ install -m755 "types/$$t/repo" "$(SHARE)/types/$$t/repo"; \ [ -f "types/$$t/proj" ] && install -m755 "types/$$t/proj" "$(SHARE)/types/$$t/proj"; \ [ -f "types/$$t/build" ] && install -m755 "types/$$t/build" "$(SHARE)/types/$$t/build"; \ [ -f "types/$$t/Dockerfile" ] && install -m644 "types/$$t/Dockerfile" "$(SHARE)/types/$$t/Dockerfile"; \ done # Hooks install -Dm644 share/hooks/gentoo.example "$(SHARE)/hooks/gentoo.example" # Documentation install -Dm644 README.md "$(SHARE)/doc/README.md" install -Dm644 LICENSE "$(SHARE)/doc/LICENSE" @echo "Done." uninstall: @echo "Removing packwrap..." rm -f "$(DESTDIR)$(PREFIX)/bin/packwrap" rm -rf "$(SHARE)" clean: rm -f *.metapkg