1# Sparkle
2
3SPARKLE_VERSION := 1.16.0
4SPARKLE_URL := https://github.com/sparkle-project/Sparkle/archive/$(SPARKLE_VERSION).zip
5
6ifdef HAVE_MACOSX
7PKGS += sparkle
8endif
9
10$(TARBALLS)/Sparkle-$(SPARKLE_VERSION).zip:
11	$(call download_pkg,$(SPARKLE_URL),sparkle)
12
13.sum-sparkle: Sparkle-$(SPARKLE_VERSION).zip
14
15sparkle: Sparkle-$(SPARKLE_VERSION).zip .sum-sparkle
16	$(UNPACK)
17	$(MOVE)
18
19.sparkle: sparkle
20	# Build Sparkle and change the @rpath
21	cd $< && xcodebuild $(XCODE_FLAGS)
22	cd $< && install_name_tool -id @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle build/Release/Sparkle.framework/Versions/A/Sparkle
23	# Install
24	cd $< && mkdir -p "$(PREFIX)/Frameworks" && \
25		rm -Rf "$(PREFIX)/Frameworks/Sparkle.framework" && \
26		cp -R build/Release/Sparkle.framework "$(PREFIX)/Frameworks"
27	touch $@
28