feat: make install
This commit is contained in:
1 parent
23c97bdbc5
commit
825995c112
1 file changed
+22
-1
@@ -1,7 +1,10 @@
|
|||||||
# webkit2_41: Arch and recent distros only ship WebKitGTK 4.1.
|
# webkit2_41: Arch and recent distros only ship WebKitGTK 4.1.
|
||||||
TAGS := desktop,production,webkit2_41
|
TAGS := desktop,production,webkit2_41
|
||||||
|
|
||||||
.PHONY: build frontend dev test screenshots clean
|
PREFIX ?= /usr/local
|
||||||
|
DESTDIR ?=
|
||||||
|
|
||||||
|
.PHONY: build frontend dev test screenshots install uninstall clean
|
||||||
|
|
||||||
build: frontend
|
build: frontend
|
||||||
go build -tags $(TAGS) -ldflags "-s -w" -o build/bin/plotzilla .
|
go build -tags $(TAGS) -ldflags "-s -w" -o build/bin/plotzilla .
|
||||||
@@ -22,5 +25,23 @@ screenshots: frontend
|
|||||||
cd tools/screenshots && npm install --no-fund
|
cd tools/screenshots && npm install --no-fund
|
||||||
go run ./tools/screenshots $(SCREENSHOTS_FLAGS)
|
go run ./tools/screenshots $(SCREENSHOTS_FLAGS)
|
||||||
|
|
||||||
|
# Binary, launcher, icon and the .fountain / .fdx MIME types. The last three
|
||||||
|
# lines refresh the desktop caches; they are skipped when staging (DESTDIR).
|
||||||
|
install:
|
||||||
|
install -Dm755 build/bin/plotzilla $(DESTDIR)$(PREFIX)/bin/plotzilla
|
||||||
|
install -Dm644 desktop/plotzilla.desktop $(DESTDIR)$(PREFIX)/share/applications/plotzilla.desktop
|
||||||
|
install -Dm644 desktop/plotzilla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/plotzilla.svg
|
||||||
|
install -Dm644 desktop/plotzilla-mime.xml $(DESTDIR)$(PREFIX)/share/mime/packages/plotzilla.xml
|
||||||
|
[ -n "$(DESTDIR)" ] || update-mime-database $(PREFIX)/share/mime || true
|
||||||
|
[ -n "$(DESTDIR)" ] || update-desktop-database -q $(PREFIX)/share/applications || true
|
||||||
|
[ -n "$(DESTDIR)" ] || gtk-update-icon-cache -qtf $(PREFIX)/share/icons/hicolor || true
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/bin/plotzilla \
|
||||||
|
$(DESTDIR)$(PREFIX)/share/applications/plotzilla.desktop \
|
||||||
|
$(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/plotzilla.svg \
|
||||||
|
$(DESTDIR)$(PREFIX)/share/mime/packages/plotzilla.xml
|
||||||
|
[ -n "$(DESTDIR)" ] || update-mime-database $(PREFIX)/share/mime || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build/bin frontend/dist/assets frontend/dist/index.html
|
rm -rf build/bin frontend/dist/assets frontend/dist/index.html
|
||||||
Reference in new issue
Block a user