From a9ecbe74e61a80683b7127bfaa0e762c17b4c3bc Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Wed, 6 Jan 2021 01:04:12 -0600 Subject: [PATCH] Add install, uninstall, and debs to Makefile --- .github/workflows/deployment.yml | 6 ++---- .github/workflows/integration.yml | 6 ++---- Makefile | 17 +++++++++++++++-- config.mk | 1 + 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 config.mk diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index c92add3..0f1ff7d 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -27,10 +27,8 @@ jobs: draft: true prerelease: false - - name: Build iOS deb - run: make iosdeb - - name: Build amd64 deb - run: make amd64deb + - name: Build debs + run: make debs - name: Upload iphoneos-arm asset id: upload-iphoneos-arm-asset diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 981a7d0..8bb1f60 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -19,10 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Build iOS deb - run: make iosdeb - - name: Build amd64 deb - run: make amd64deb + - name: Build debs + run: make debs - name: Upload iphoneos-arm deb as artifact uses: actions/upload-artifact@v2 diff --git a/Makefile b/Makefile index 3863a52..1108a48 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,24 @@ VERSION ?= $(shell git tag --points-at HEAD | sed 's/^v//') VERSION += 0-git-$(shell git rev-parse --short HEAD) VERSION := $(word 1, $(VERSION)) -all: options iosdeb amd64deb +include config.mk + +all: + @echo "Nekofetch doesn't need to be compiled, run 'make install' to install" + +debs: options iosdeb amd64deb options: @echo "VERSION: $(VERSION)" +install: + mkdir -p $(PREFIX)/bin + install -m 0755 nekofetch $(PREFIX)/bin/nekofetch + @echo "You may need to install jq, jp2a, and neofetch" + +uninstall: + rm -f $(PREFIX)/bin/nekofetch + ioscontrol: cp control.template ioscontrol sed -i 's/PACKAGE/com.propr.nekofetch/' ioscontrol @@ -39,4 +52,4 @@ clean: rm -f ioscontrol amd64control rm -f com.propr.nekofetch_*_iphoneos-arm.deb nekofetch_*_amd64.deb -.PHONY: all options clean iosdeb amd64deb +.PHONY: all debs options install uninstall clean iosdeb amd64deb diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..646c4e8 --- /dev/null +++ b/config.mk @@ -0,0 +1 @@ +PREFIX := /usr/local