dice-roller/Makefile

41 lines
1.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
SRC = main.go go.mod
all: dice-roller
dice-roller:
go build -o dice-roller
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)
cp -R LICENSE Makefile README.md dice-roller.1 Colors Coin Dice $(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
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dice-roller $(DESTDIR)$(PREFIX)/bin
chmod 775 $(DESTDIR)$(PREFIX)/bin/dice-roller
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cat dice-roller.1 > $(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
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