Makefile: Change to use new targets

Makefile:
Remove soon unneeded targets for dist and upload.
Add lint and build targets.
Simplify the installation and uninstallation target.
This commit is contained in:
David Runge 2021-10-17 00:41:17 +02:00 committed by Levente Polyak
parent fa0f35a66c
commit 153ae31437
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8

View File

@ -1,22 +1,23 @@
V=20211028 PREFIX ?= /usr/local
KEYRING_TARGET_DIR=$(DESTDIR)$(PREFIX)/share/pacman/keyrings/
KEYRING_FILES=$(wildcard output/*.gpg) $(wildcard output/*-revoked) $(wildcard output/*-trusted)
PREFIX = /usr/local all: build
lint:
black --check --diff keyringctl
isort --diff .
flake8 keyringctl
mypy --install-types --non-interactive keyringctl
build:
./keyringctl -v export-keyring
install: install:
install -dm755 $(DESTDIR)$(PREFIX)/share/pacman/keyrings/ install -vDm 755 $(KEYRING_FILES) -t $(KEYRING_TARGET_DIR)
install -m0644 archlinux.gpg $(DESTDIR)$(PREFIX)/share/pacman/keyrings/
install -m0644 archlinux-trusted $(DESTDIR)$(PREFIX)/share/pacman/keyrings/
install -m0644 archlinux-revoked $(DESTDIR)$(PREFIX)/share/pacman/keyrings/
uninstall: uninstall:
rm -f $(DESTDIR)$(PREFIX)/share/pacman/keyrings/archlinux{.gpg,-trusted,-revoked} rm -f $(KEYRING_TARGET_DIR)/archlinux{.gpg,-trusted,-revoked}
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/share/pacman/keyrings/ rmdir -p --ignore-fail-on-non-empty $(KEYRING_TARGET_DIR)
dist: .PHONY: build install lint uninstall
git archive --format=tar --prefix=archlinux-keyring-$(V)/ $(V) | gzip -9 > archlinux-keyring-$(V).tar.gz
gpg --detach-sign --use-agent archlinux-keyring-$(V).tar.gz
upload:
scp archlinux-keyring-$(V).tar.gz archlinux-keyring-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/archlinux-keyring/
.PHONY: install uninstall dist upload