mirror of
https://gitlab.com/EternalWanderer/sheet-parser.git
synced 2025-07-02 17:56:36 +02:00
First steps towards package
This commit is contained in:
parent
c6df11bcc5
commit
a22ba4db06
4 changed files with 461 additions and 0 deletions
46
Makefile
Normal file
46
Makefile
Normal file
|
@ -0,0 +1,46 @@
|
|||
VERSION = 0.1
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
ZSH_COMPLETION_OUTPUT := zsh.completion
|
||||
|
||||
SRC = main.go go.mod sheetContent.go
|
||||
|
||||
all: sheet-parser
|
||||
|
||||
sheet-parser:
|
||||
go build -o sheet-parser -buildvcs=false
|
||||
|
||||
clean:
|
||||
rm -f sheet-parser sheet-parser-$(VERSION).tar.gz
|
||||
|
||||
dist: clean
|
||||
mkdir -p sheet-parser-$(VERSION)
|
||||
cp -R LICENSE Makefile README.md sheet-parser.1 $(SRC) sheet-parser-$(VERSION)
|
||||
tar -cf sheet-parser-$(VERSION).tar sheet-parser-$(VERSION)
|
||||
gzip sheet-parser-$(VERSION).tar
|
||||
rm -rf sheet-parser-$(VERSION)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f sheet-parser $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 775 $(DESTDIR)$(PREFIX)/bin/sheet-parser
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
cat sheet-parser.1 > $(DESTDIR)$(MANPREFIX)/man1/sheet-parser.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sheet-parser.1
|
||||
|
||||
install-completions:
|
||||
@install -d $(DESTDIR)$(PREFIX)/share/zsh/site-functions
|
||||
@install -m 0644 $(ZSH_COMPLETION_OUTPUT) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_sheet-parser
|
||||
@printf '%s\n' '$(OK)'
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/sheet-parser\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/sheet-parser.1
|
||||
|
||||
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
|
||||
|
||||
.PHONY: all sheet-parser clean dist install uninstall package
|
Loading…
Add table
Add a link
Reference in a new issue