dice-roller/Makefile

39 lines
1 KiB
Makefile
Raw Normal View History

VERSION = 0.3
2022-07-28 16:18:38 +02:00
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
2022-08-22 17:44:16 +02:00
SRC = main.go go.mod go.sum Coin Dice
2022-07-28 16:18:38 +02:00
all: dice-roller
dice-roller:
2022-08-22 00:07:42 +02:00
go build -o dice-roller -trimpath
2022-07-28 16:18:38 +02:00
clean:
2022-07-28 16:30:59 +02:00
rm -f dice-roller dice-roller-$(VERSION).tar.gz
2022-07-28 16:18:38 +02:00
dist: clean
mkdir -p dice-roller-$(VERSION)
2022-08-22 17:44:16 +02:00
cp -R zsh.completion LICENSE Makefile README.md dice-roller.1 $(SRC) dice-roller-$(VERSION)
2022-07-28 16:30:59 +02:00
tar -cf dice-roller-$(VERSION).tar dice-roller-$(VERSION)
2022-07-28 16:18:38 +02:00
gzip dice-roller-$(VERSION).tar
rm -rf dice-roller-$(VERSION)
install: all
2022-08-21 19:04:57 +02:00
install -m 0775 -d $(DESTDIR)$(PREFIX)/bin
install -m 755 dice-roller $(DESTDIR)$(PREFIX)/bin
install -m 0775 -d $(DESTDIR)$(MANPREFIX)/man1
install -m 644 dice-roller.1 $(DESTDIR)$(MANPREFIX)/man1
2022-07-28 16:18:38 +02:00
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/dice-roller\
$(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
package: dist
rsync --progress dice-roller-$(VERSION).tar.gz voidDroplet:/var/www/alpine/src/
2022-08-20 14:00:15 +02:00
rm -f /var/cache/distfiles/dice-roller*
abuild checksum
abuild -r
.PHONY: all dice-roller clean dist install uninstall package