From 2633cc8d96e178d76e9a1088502482f2e7fa5889 Mon Sep 17 00:00:00 2001 From: TheRealKeto Date: Tue, 11 Jun 2024 01:12:00 -0400 Subject: [PATCH 1/2] Add ipatool --- build_info/ipatool.control | 12 ++++++++++ makefiles/ipatool.mk | 47 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 build_info/ipatool.control create mode 100644 makefiles/ipatool.mk diff --git a/build_info/ipatool.control b/build_info/ipatool.control new file mode 100644 index 0000000000..8534c1ba9a --- /dev/null +++ b/build_info/ipatool.control @@ -0,0 +1,12 @@ +Package: ipatool +Version: @DEB_IPATOOL_V@ +Architecture: @DEB_ARCH@ +Maintainer: @DEB_MAINTAINER@ +Author: Majd Alfhaily +Section: Utilities +Priority: optional +Homepage: https://github.com/majd/ipatool +Description: Command-line tool to navigate the App Store. + ipatool is a command line tool that allows you to search for + iOS apps on the App Store and download a copy of the package, + known as an ipa file. diff --git a/makefiles/ipatool.mk b/makefiles/ipatool.mk new file mode 100644 index 0000000000..5ea4a7c590 --- /dev/null +++ b/makefiles/ipatool.mk @@ -0,0 +1,47 @@ +ifneq ($(PROCURSUS),1) +$(error Use the main Makefile) +endif + +ifneq (,$(findstring darwin,$(MEMO_TARGET))) + +SUBPROJECTS += ipatool +IPATOOL_VERSION := 2.0.0 +DEB_IPATOOL_V ?= $(IPATOOL_VERSION) + +ipatool-setup: setup + $(call GITHUB_ARCHIVE,majd,ipatool,$(IPATOOL_VERSION),v$(IPATOOL_VERSION)) + $(call EXTRACT_TAR,ipatool-$(IPATOOL_VERSION).tar.gz,ipatool-$(IPATOOL_VERSION),ipatool) + +ifneq ($(wildcard $(BUILD_WORK)/ipatool/.build_complete),) +ipatool: + @echo "Using previously built ipatool." +else +ipatool: ipatool-setup + sed -e '3s|.*|VERSION="$(DEB_IPATOOL_V)"|' -i $(BUILD_WORK)/ipatool/tools/version.sh + cd $(BUILD_WORK)/ipatool && ./tools/version.sh + cd $(BUILD_WORK)/ipatool && $(DEFAULT_GOLANG_FLAGS) go build \ + -trimpath \ + -o $(BUILD_WORK)/ipatool/ipatool + $(INSTALL) -Dm755 $(BUILD_WORK)/ipatool/ipatool -t $(BUILD_STAGE)/ipatool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/ + $(call AFTER_BUILD) +endif + +ipatool-package: ipatool-stage + # ipatool.mk Package Structure + rm -rf $(BUILD_DIST)/ipatool + + # ipatool.mk Prep ipatool + cp -a $(BUILD_STAGE)/ipatool $(BUILD_DIST) + + # ipatool.mk Sign + $(call SIGN,ipatool,general.xml) + + # ipatool.mk Make .debs + $(call PACK,ipatool,DEB_IPATOOL_V) + + # ipatool.mk Build cleanup + rm -rf $(BUILD_DIST)/ipatool + +.PHONY: ipatool ipatool-package + +endif From 031e329da5f9c520190d8b180737857cf988bc51 Mon Sep 17 00:00:00 2001 From: TheRealKeto Date: Tue, 11 Jun 2024 01:24:00 -0400 Subject: [PATCH 2/2] ipatool: Update to 2.1.4 --- makefiles/ipatool.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/makefiles/ipatool.mk b/makefiles/ipatool.mk index 5ea4a7c590..d88cdc453d 100644 --- a/makefiles/ipatool.mk +++ b/makefiles/ipatool.mk @@ -5,7 +5,7 @@ endif ifneq (,$(findstring darwin,$(MEMO_TARGET))) SUBPROJECTS += ipatool -IPATOOL_VERSION := 2.0.0 +IPATOOL_VERSION := 2.1.4 DEB_IPATOOL_V ?= $(IPATOOL_VERSION) ipatool-setup: setup @@ -17,10 +17,9 @@ ipatool: @echo "Using previously built ipatool." else ipatool: ipatool-setup - sed -e '3s|.*|VERSION="$(DEB_IPATOOL_V)"|' -i $(BUILD_WORK)/ipatool/tools/version.sh - cd $(BUILD_WORK)/ipatool && ./tools/version.sh cd $(BUILD_WORK)/ipatool && $(DEFAULT_GOLANG_FLAGS) go build \ -trimpath \ + -ldflags "-X github.com/majd/ipatool/v2/cmd.version=$(IPATOOL_VERSION)" \ -o $(BUILD_WORK)/ipatool/ipatool $(INSTALL) -Dm755 $(BUILD_WORK)/ipatool/ipatool -t $(BUILD_STAGE)/ipatool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/ $(call AFTER_BUILD)