2021-10-16 17:41:17 -05:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
KEYRING_TARGET_DIR=$(DESTDIR)$(PREFIX)/share/pacman/keyrings/
|
2021-10-21 14:04:16 -05:00
|
|
|
KEYRING_FILES=$(wildcard build/*.gpg) $(wildcard build/*-revoked) $(wildcard build/*-trusted)
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-16 17:41:17 -05:00
|
|
|
all: build
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-16 17:41:17 -05:00
|
|
|
lint:
|
2021-10-24 07:37:27 -05:00
|
|
|
black --check --diff keyringctl libkeyringctl
|
2021-10-16 17:41:17 -05:00
|
|
|
isort --diff .
|
2021-10-24 07:37:27 -05:00
|
|
|
flake8 keyringctl libkeyringctl
|
|
|
|
mypy --install-types --non-interactive keyringctl libkeyringctl
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-24 15:10:14 -05:00
|
|
|
fmt:
|
|
|
|
black .
|
|
|
|
isort .
|
|
|
|
|
2021-10-31 11:53:20 -06:00
|
|
|
test:
|
2021-10-31 14:26:27 -06:00
|
|
|
coverage run
|
|
|
|
coverage report
|
2021-10-31 11:53:20 -06:00
|
|
|
|
2021-10-16 17:41:17 -05:00
|
|
|
build:
|
2021-10-21 14:04:16 -05:00
|
|
|
./keyringctl -v build
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-16 17:41:17 -05:00
|
|
|
install:
|
|
|
|
install -vDm 755 $(KEYRING_FILES) -t $(KEYRING_TARGET_DIR)
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-16 17:41:17 -05:00
|
|
|
uninstall:
|
|
|
|
rm -f $(KEYRING_TARGET_DIR)/archlinux{.gpg,-trusted,-revoked}
|
|
|
|
rmdir -p --ignore-fail-on-non-empty $(KEYRING_TARGET_DIR)
|
2012-02-13 07:37:52 -06:00
|
|
|
|
2021-10-31 11:53:20 -06:00
|
|
|
.PHONY: all lint fmt test build install uninstall
|