source: trunk/mk/osx.mk @ 436

Last change on this file since 436 was 436, checked in by titer, 15 years ago

Only put Transmission.app in the dmg

  • Property svn:keywords set to Date Rev Author Id
File size: 1.3 KB
Line 
1# $Id: osx.mk 436 2006-06-22 03:41:19Z titer $
2
3#
4# Update Info.plist with the version from version.mk
5#
6include mk/version.mk
7macosx/Info.plist: macosx/Info.plist.in mk/version.mk
8        $(RM) $@
9        sed -e "s/%%BUNDLE_VERSION%%/$(VERSION_REVISION)/g" \
10          -e "s/%%SHORT_VERSION_STRING%%/$(VERSION_STRING)/g" < $< > $@
11
12#
13# Then use Xcode do make the actual build
14#
15all: macosx/Info.plist
16        @xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
17clean:
18        @xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
19        $(RM) macosx/Info.plist
20
21
22#
23# Package generation
24# Check if this is a release or an SVN build
25#
26ifeq ($(VERSION_STRING),$(VERSION_MAJOR).$(VERSION_MINOR))
27VERSION_PACKAGE = $(VERSION_STRING)
28else
29VERSION_PACKAGE = $(VERSION_STRING)-r$(VERSION_REVISION)
30endif
31       
32define PACKAGE_RULE1
33        $(RM) tmp "Transmission $(VERSION_PACKAGE)" \
34          Transmission-$(VERSION_PACKAGE).dmg
35        mkdir -p tmp
36        cp -R macosx/Transmission.app tmp/
37endef
38define PACKAGE_RULE2
39        mv tmp "Transmission $(VERSION_PACKAGE)"
40        hdiutil create -format UDZO -imagekey zlib-level=9 -srcfolder \
41          "Transmission $(VERSION_PACKAGE)" Transmission-$(VERSION_PACKAGE).dmg
42        rm -rf "Transmission $(VERSION_PACKAGE)"
43endef
44
45package:
46        $(PACKAGE_RULE1)
47        $(PACKAGE_RULE2)
48
49package-release:
50        $(PACKAGE_RULE1)
51        strip -S tmp/Transmission.app/Contents/MacOS/Transmission
52        $(PACKAGE_RULE2)
Note: See TracBrowser for help on using the repository browser.