sheet-parser/Makefile

44 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

VERSION = 0.4
2022-08-21 01:12:22 +02:00
PREFIX = /usr/local
2022-08-23 20:58:04 +02:00
MANPAGE = sheet-parser.1
2022-08-21 01:12:22 +02:00
MANPREFIX = $(PREFIX)/share/man
ZSH_COMPLETION_OUTPUT := zsh.completion
2022-08-21 23:33:09 +02:00
SRC = main.go go.mod sheetContent.go go.sum
2022-08-21 01:12:22 +02:00
all: sheet-parser
sheet-parser:
2022-08-21 23:33:09 +02:00
go build -o sheet-parser -trimpath
2022-08-21 01:12:22 +02:00
clean:
rm -f sheet-parser sheet-parser-$(VERSION).tar.gz $(MANPAGE)
2022-08-21 01:12:22 +02:00
2022-08-23 20:58:04 +02:00
dist: clean $(MANPAGE)
2022-08-21 01:12:22 +02:00
mkdir -p sheet-parser-$(VERSION)
2022-08-23 20:59:09 +02:00
cp -R example.json $(ZSH_COMPLETION_OUTPUT) LICENSE Makefile README.md $(MANPAGE).scd $(MANPAGE) $(SRC) sheet-parser-$(VERSION)
2022-08-21 01:12:22 +02:00
tar -cf sheet-parser-$(VERSION).tar sheet-parser-$(VERSION)
gzip sheet-parser-$(VERSION).tar
rm -rf sheet-parser-$(VERSION)
install: all
2022-08-23 20:58:04 +02:00
install -dm 0755 $(DESTDIR)$(PREFIX)/bin
install -m 0755 sheet-parser $(DESTDIR)$(PREFIX)/bin
install -dm 0755 $(DESTDIR)$(MANPREFIX)/man1
install -m 0644 $(MANPAGE) $(DESTDIR)$(MANPREFIX)/man1
2022-08-21 01:12:22 +02:00
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/sheet-parser\
2022-08-23 20:58:04 +02:00
$(DESTDIR)$(MANPREFIX)/man1/$(MANPAGE)
2022-08-21 01:12:22 +02:00
package: dist
rsync --progress sheet-parser-$(VERSION).tar.gz voidDroplet:/var/www/alpine/src/
rm -f /var/cache/distfiles/sheet-parser*
abuild checksum
abuild -r
2022-08-23 20:58:04 +02:00
$(MANPAGE): $(MANPAGE).scd
scdoc < $< > $@
2022-08-21 01:12:22 +02:00
.PHONY: all sheet-parser clean dist install uninstall package