source: trunk/Jamrules @ 6

Last change on this file since 6 was 6, checked in by root, 16 years ago

Update 2005-11-21

File size: 2.9 KB
Line 
1include config.jam ;
2
3if ! $(DEFINES)
4{
5    Exit "Please run ./configure first." ;
6}
7
8VERSION_MAJOR  = 0 ;
9VERSION_MINOR  = 4 ;
10# VERSION_STRING = $(VERSION_MAJOR).$(VERSION_MINOR) ;
11VERSION_STRING = 0.5-cvs ;
12
13DEFINES += VERSION_MAJOR=$(VERSION_MAJOR)
14           VERSION_MINOR=$(VERSION_MINOR)
15           VERSION_STRING=\\\"$(VERSION_STRING)\\\" ;
16OPTIM    = -O3 ;
17RM       = rm -Rf ;
18
19rule SystemLibraries
20{
21    LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] ?= $(LINKLIBS) ;
22    LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] +=  $(>) ;
23}
24
25if $(OS) = MACOSX
26{
27    # Build universal binaries
28    CCFLAGS   += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
29                 -arch ppc -arch i386 ;
30    LINKFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
31                 -arch ppc -arch i386 ;
32
33    # Use libtool to build static libraries (ar does not handle
34    # universal binaries)
35    RANLIB     =   ;
36    NOARSCAN   = 1 ;
37    NOARUPDATE = 1 ;
38    actions Archive
39    {
40        libtool -static $(>) -o $(<) ;
41    }
42
43    rule OSXLinks
44    {
45    }
46    actions OSXLinks
47    {
48        ( cd macosx/Frameworks/Growl.framework/ && \
49          ln -s Versions/Current/Growl && \
50          ln -s Versions/Current/Headers && \
51          ln -s Versions/Current/Resources && \
52          ln -s A Versions/Current )
53    }
54
55    rule OSXInfoPlist
56    {
57        Depends        $(1)  : $(2) ;
58        Depends        $(1)  : Jamrules ;
59        Clean          clean : $(1) ;
60    }
61    actions OSXInfoPlist
62    {
63        $(RM) $(1)
64        sed "s/%%VERSION%%/$(VERSION_STRING)/" < $(2) > $(1)
65    }
66
67    rule OSXBundle
68    {   
69        Depends     exe   : $(1) ;
70        Depends     $(1)  : $(2) ;
71        Clean       clean : $(1) macosx/build ;
72    }
73    actions OSXBundle
74    {   
75        $(RM) $(1) && ( cd macosx && xcodebuild ) && \
76          mv macosx/build/Debug/Transmission.app $(1)
77    }
78
79    rule OSXPackage
80    {
81        Depends      $(1)  : $(2) ;
82        Clean        clean : $(1) ;
83        DoOSXPackage $(1) ;
84    }
85    actions DoOSXPackage
86    {
87        TMP="Transmission $(VERSION_STRING)"
88        rm -f $(1) "$TMP" && mkdir "$TMP" &&
89        mkdir "$TMP/Transmission.app" &&
90        ditto Transmission.app "$TMP/Transmission.app" &&
91        ditto AUTHORS "$TMP/AUTHORS.txt" &&
92        ditto LICENSE "$TMP/LICENSE.txt" &&
93        ditto NEWS "$TMP/NEWS.txt" &&
94        strip -S "$TMP/Transmission.app/Contents/MacOS/Transmission" &&
95        ( echo "[InternetShortcut]"; \
96          echo "URL=http://transmission.m0k.org/" ) > \
97          "$TMP/Homepage.url" &&
98        ( echo "[InternetShortcut]"; \
99          echo "URL=http://transmission.m0k.org/forum/" ) > \
100          "$TMP/Forums.url" &&
101        ( echo "[InternetShortcut]"; \
102          echo "URL=http://transmission.m0k.org/contribute.php" ) > \
103          "$TMP/Contribute.url" &&
104        hdiutil create -format UDZO -srcfolder "$TMP" $(1) &&
105        rm -rf "$TMP"
106    }
107}
Note: See TracBrowser for help on using the repository browser.