+install:
+ @test -e $(LOCAL_BINDIR)/$(TARGET)$(EXT) || { echo "Please execute first: make all\n"; exit 1; }
+ @test -e $(LOCAL_BINDIR)/syncthing$(EXT) -a -e $(LOCAL_BINDIR)/syncthing-inotify$(EXT) || { echo "Please execute first: make all\n"; exit 1; }
+ export DESTDIR=$(DESTDIR) && export DESTDIR_WWW=$(DESTDIR_WWW) && $(ROOT_SRCDIR)/scripts/install.sh
+
+.PHONY: uninstall
+uninstall:
+ export DESTDIR=$(DESTDIR) && export DESTDIR_WWW=$(DESTDIR_WWW) && $(ROOT_SRCDIR)/scripts/install.sh uninstall
+
+package: clean tools/syncthing vendor build
+ @mkdir -p $(PACKAGE_DIR)/$(TARGET)/www $(PACKAGE_DIR)/scripts
+ @cp -a $(LOCAL_BINDIR)/* $(PACKAGE_DIR)/$(TARGET)/
+ @cp -a webapp/dist/* $(PACKAGE_DIR)/$(TARGET)/www/
+ifneq ($(GOOS), windows)
+ @cp -r $(ROOT_SRCDIR)/conf.d $(ROOT_SRCDIR)/scripts $(PACKAGE_DIR)/$(TARGET)/
+endif
+ @cp $(ROOT_SRCDIR)/conf.d/etc/xds/agent/agent-config.json $(PACKAGE_DIR)/$(TARGET)/agent-config.json.in
+ @cd $(PACKAGE_DIR) && zip -r $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) ./$(TARGET)
+ @echo "### Package $(PACKAGE_ZIPFILE) has been successfuly built - $(BUILD_MODE)"
+
+.PHONY: package-all
+package-all:
+ @echo "# Build linux amd64..."
+ GOOS=linux GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile package
+ @echo "# Build windows amd64..."
+ GOOS=windows GOARCH=amd64 RELEASE=1 SKIP_WEBAPP_BUILD=true make -f $(ROOT_SRCDIR)/Makefile package
+ @echo "# Build darwin amd64..."
+ GOOS=darwin GOARCH=amd64 RELEASE=1 SKIP_WEBAPP_BUILD=true make -f $(ROOT_SRCDIR)/Makefile package
+ make -f $(ROOT_SRCDIR)/Makefile clean
+
+.PHONY: gomod
+gomod:
+ go get
+
+gomod/debug:
+ @echo "replace gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git => $(ROOT_SRCDIR)/../xds-common" >> $(ROOT_SRCDIR)/go.mod
+ @echo "replace gerrit.automotivelinux.org/gerrit/src/xds/xds-server.git => $(ROOT_SRCDIR)/../xds-server" >> $(ROOT_SRCDIR)/go.mod
+ @echo "Add replace in go.mod file - done."