Setup: Prepare build scripts to provide .deb and .rpm packages #3861
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
602097635f
commit
e85f349ea6
2 changed files with 4 additions and 6 deletions
5
Makefile
5
Makefile
|
@ -22,7 +22,7 @@ BUILD_ARCH ?= $(shell scripts/dist/arch.sh)
|
|||
JS_BUILD_PATH ?= $(shell realpath "./assets/static/build")
|
||||
|
||||
# Install parameters.
|
||||
INSTALL_PATH ?= $(BUILD_PATH)/photoprism-ce-$(BUILD_TAG)-$(shell echo $(BUILD_OS) | tr '[:upper:]' '[:lower:]')-$(BUILD_ARCH)
|
||||
INSTALL_PATH ?= $(BUILD_PATH)/photoprism-ce_$(BUILD_TAG)-$(shell echo $(BUILD_OS) | tr '[:upper:]' '[:lower:]')-$(BUILD_ARCH)
|
||||
DESTDIR ?= $(INSTALL_PATH)
|
||||
DESTUID ?= 1000
|
||||
DESTGID ?= 1000
|
||||
|
@ -120,12 +120,11 @@ install:
|
|||
mkdir --mode=$(INSTALL_MODE) -p $(DESTDIR)
|
||||
env TMPDIR="$(BUILD_PATH)" ./scripts/dist/install-tensorflow.sh $(DESTDIR)
|
||||
rm -rf --preserve-root $(DESTDIR)/include
|
||||
(cd $(DESTDIR) && mkdir -p bin lib assets config config/examples)
|
||||
(cd $(DESTDIR) && mkdir -p bin lib assets)
|
||||
./scripts/build.sh prod "$(DESTDIR)/bin/$(BINARY_NAME)"
|
||||
rsync -r -l --safe-links --exclude-from=assets/.buildignore --chmod=a+r,u+rw ./assets/ $(DESTDIR)/assets
|
||||
wget -O $(DESTDIR)/assets/static/img/wallpaper/welcome.jpg https://cdn.photoprism.app/wallpaper/welcome.jpg
|
||||
wget -O $(DESTDIR)/assets/static/img/preview.jpg https://cdn.photoprism.app/img/preview.jpg
|
||||
cp internal/config/testdata/*.yml $(DESTDIR)/config/examples
|
||||
chown -R $(INSTALL_USER) $(DESTDIR)
|
||||
chmod -R $(INSTALL_MODE) $(DESTDIR)
|
||||
chmod -R $(INSTALL_MODE_BIN) $(DESTDIR)/bin $(DESTDIR)/lib
|
||||
|
|
5
scripts/dist/install-go-tools.sh
vendored
5
scripts/dist/install-go-tools.sh
vendored
|
@ -32,8 +32,6 @@ elif [[ -z $GOPATH ]]; then
|
|||
GOPATH=$(go env GOPATH)
|
||||
fi
|
||||
|
||||
echo "Installing Go tools for ${DESTARCH^^} in $GOPATH..."
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p "$GOPATH/src"
|
||||
|
@ -46,13 +44,14 @@ case $DESTARCH in
|
|||
;;
|
||||
|
||||
*)
|
||||
echo "Installing Go tools in /usr/local/bin..."
|
||||
echo "Installing Go tools for ${DESTARCH^^} in /usr/local/bin..."
|
||||
GOBIN="/usr/local/bin" go install golang.org/x/tools/cmd/goimports@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/psampaz/go-mod-outdated@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/mikefarah/yq/v4@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/kyoh86/richgo@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/muesli/duf@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue