source: trunk/mk/osx.mk @ 372

Last change on this file since 372 was 372, checked in by titer, 16 years ago

Trying to spare some more space here and there

  • Property svn:keywords set to Date Rev Author Id
File size: 1.5 KB
Line 
1# $Id: osx.mk 372 2006-06-15 22:28:34Z 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       
32URL = printf "[InternetShortcut]\nURL=http://transmission.m0k.org%s\n"
33define PACKAGE_RULE1
34        $(RM) tmp "Transmission $(VERSION_PACKAGE)" \
35          Transmission-$(VERSION_PACKAGE).dmg
36        mkdir -p tmp
37        cp -R macosx/Transmission.app tmp/
38        cp AUTHORS tmp/AUTHORS.txt
39        cp LICENSE tmp/LICENSE.txt
40        cp NEWS tmp/NEWS.txt
41        $(URL) "/" > tmp/Homepage.url
42        $(URL) "/forum" > tmp/Forums.url
43        $(URL) "/contribute.php" > tmp/Contribute.url
44endef
45define PACKAGE_RULE2
46        mv tmp "Transmission $(VERSION_PACKAGE)"
47        hdiutil create -format UDZO -imagekey zlib-level=9 -srcfolder \
48          "Transmission $(VERSION_PACKAGE)" Transmission-$(VERSION_PACKAGE).dmg
49        rm -rf "Transmission $(VERSION_PACKAGE)"
50endef
51
52package:
53        $(PACKAGE_RULE1)
54        $(PACKAGE_RULE2)
55
56package-release:
57        $(PACKAGE_RULE1)
58        strip -S tmp/Transmission.app/Contents/MacOS/Transmission
59        $(PACKAGE_RULE2)
Note: See TracBrowser for help on using the repository browser.