improve flatpak Makefile
This commit is contained in:
parent
a06707c5e9
commit
0aa1ecfe33
2 changed files with 17 additions and 10 deletions
9
flatpak/.gitignore
vendored
9
flatpak/.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
/RemoteTouchpad
|
Makefile
|
||||||
/repo
|
.flatpak-builder
|
||||||
/.flatpak-builder
|
repo
|
||||||
/RemoteTouchpad-*.flatpak
|
build
|
||||||
|
*.flatpak
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,32 @@
|
||||||
ARCH = $(shell flatpak --default-arch)
|
ARCH = $(shell flatpak --default-arch)
|
||||||
|
|
||||||
APP_ID = com.github.unrud.RemoteTouchpad
|
APP_ID = com.github.unrud.RemoteTouchpad
|
||||||
APP_NAME = RemoteTouchpad
|
APP_NAME = $(shell echo $(APP_ID) | rev | cut --delimiter=. --fields=1 | rev)
|
||||||
|
FORMAT = $(shell ls -1 $(APP_ID).json $(APP_ID).yaml 2>/dev/null | tail -n1 | rev | cut -d. -f1 | rev)
|
||||||
|
BRANCH = master
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: bundle
|
all: bundle
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
flatpak-builder --arch=$(ARCH) --force-clean $(APP_NAME) $(APP_ID).json
|
mkdir -p build
|
||||||
|
flatpak-builder --arch=$(ARCH) --force-clean build/$(APP_NAME) $(APP_ID).$(FORMAT)
|
||||||
|
|
||||||
.PHONY: repo
|
.PHONY: repo
|
||||||
repo:
|
repo:
|
||||||
flatpak-builder --arch=$(ARCH) --force-clean $(APP_NAME) $(APP_ID).json --repo=repo
|
mkdir -p build repo
|
||||||
|
flatpak-builder --arch=$(ARCH) --force-clean build/$(APP_NAME) $(APP_ID).$(FORMAT) --repo=repo/$(APP_NAME)
|
||||||
|
|
||||||
.PHONY: bundle
|
.PHONY: bundle
|
||||||
bundle: repo
|
bundle: repo
|
||||||
flatpak build-bundle --arch=$(ARCH) repo $(APP_NAME)-$(ARCH).flatpak $(APP_ID)
|
flatpak build-bundle --arch=$(ARCH) repo/$(APP_NAME) $(APP_NAME)-$(ARCH).flatpak $(APP_ID) $(BRANCH)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(APP_NAME) $(APP_NAME)-*.flatpak repo .flatpak-builder || true
|
rm -rf $(APP_NAME)-*.flatpak build/$(APP_NAME) repo/$(APP_NAME) .flatpak-builder || true
|
||||||
|
rmdir build || true
|
||||||
|
rmdir repo || true
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
|
|
@ -28,4 +34,4 @@ install:
|
||||||
|
|
||||||
.PHONY: uninstall
|
.PHONY: uninstall
|
||||||
uninstall:
|
uninstall:
|
||||||
flatpak uninstall --user $(APP_ID)
|
flatpak uninstall --user $(APP_ID)/$(ARCH)/$(BRANCH)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue