From edabcc1929c4cc0ddc5bb013d2204d0f75123621 Mon Sep 17 00:00:00 2001 From: TheRealKeto Date: Mon, 5 Jul 2021 00:48:25 -0400 Subject: Major changes and fixes - Add uninstall function - Reduces some lines of code - Packaging function now uses install function - Removes unessesary DESTDIR variable defintion Signed-off-by: Cameron Katri --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7819de7..ee33117 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ CFLAGS ?= -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14 INSTALL ?= install FAKEROOT ?= fakeroot PREFIX ?= /usr -DESTDIR ?= DEB_MAINTAINER ?= Cameron Katri DEB_ARCH ?= iphoneos-arm @@ -24,10 +23,10 @@ install: build/snaprestore $(INSTALL) -Dm755 build/snaprestore $(DESTDIR)$(PREFIX)/bin/snaprestore $(INSTALL) -Dm644 LICENSE $(DESTDIR)$(PREFIX)/share/snaprestore/LICENSE -package: build/snaprestore +package: install rm -rf staging - $(INSTALL) -Dm755 build/snaprestore staging$(PREFIX)/bin/snaprestore - $(INSTALL) -Dm644 LICENSE staging$(PREFIX)/share/snaprestore/LICENSE + mkdir -p staging + cp -a $(DESTDIR)$(PREFIX) staging $(FAKEROOT) chown -R 0:0 staging SIZE=$$(du -s staging | cut -f 1); \ $(INSTALL) -Dm755 src/snaprestore.control staging/DEBIAN/control; \ @@ -40,5 +39,9 @@ package: build/snaprestore $(FAKEROOT) dpkg-deb -z9 -b staging build rm -rf staging -clean: +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/snaprestore + rm -rf $(DESTDIR)$(PREFIX)/share/snaprestore + +clean: rm -f build/snaprestore -- cgit v1.2.3-56-ge451