diff options
author | TheRealKeto <therealketo@gmail.com> | 2021-07-05 00:48:25 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-07-05 09:38:30 -0400 |
commit | edabcc1929c4cc0ddc5bb013d2204d0f75123621 (patch) | |
tree | 9d9d60d71aa90263ca7d3d16f509ea90126081b4 | |
parent | bd76a8431a0ad66d8b8345ab9237c411cea41887 (diff) | |
download | snaprestore-edabcc1929c4cc0ddc5bb013d2204d0f75123621.tar.gz snaprestore-edabcc1929c4cc0ddc5bb013d2204d0f75123621.tar.zst snaprestore-edabcc1929c4cc0ddc5bb013d2204d0f75123621.zip |
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 <me@cameronkatri.com>
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -5,7 +5,6 @@ CFLAGS ?= -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14 INSTALL ?= install FAKEROOT ?= fakeroot PREFIX ?= /usr -DESTDIR ?= DEB_MAINTAINER ?= Cameron Katri <me@cameronkatri.com> 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 |