source: trunk/Jamrules @ 4

Last change on this file since 4 was 4, checked in by root, 17 years ago

Update 2005-11-18

File size: 2.4 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
19if $(OS) = MACOSX
20{
21    # Build universal binaries
22    CCFLAGS   += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
23                 -arch ppc -arch i386 ;
24    LINKFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
25                 -arch ppc -arch i386 ;
26
27    # Use libtool to build static libraries (ar does not handle
28    # universal binaries)
29    RANLIB     =   ;
30    NOARSCAN   = 1 ;
31    NOARUPDATE = 1 ;
32    actions Archive
33    {
34        libtool -static $(>) -o $(<) ;
35    }
36
37    rule OSXInfoPlist
38    {
39        Depends        $(1)  : $(2) ;
40        Depends        $(1)  : Jamrules ;
41        Clean          clean : $(1) ;
42    }
43    actions OSXInfoPlist
44    {
45        $(RM) $(1)
46        sed "s/%%VERSION%%/$(VERSION_STRING)/" < $(2) > $(1)
47    }
48
49    rule OSXBundle
50    {   
51        Depends     exe   : $(1) ;
52        Depends     $(1)  : $(2) ;
53        Clean       clean : $(1) macosx/build ;
54    }
55    actions OSXBundle
56    {   
57        $(RM) $(1) && ( cd macosx && xcodebuild ) && \
58          mv macosx/build/Debug/Transmission.app $(1)
59    }
60
61    rule OSXPackage
62    {
63        Depends      $(1)  : $(2) ;
64        Clean        clean : $(1) ;
65        DoOSXPackage $(1) ;
66    }
67    actions DoOSXPackage
68    {
69        TMP="Transmission $(VERSION_STRING)"
70        rm -f $(1) "$TMP" && mkdir "$TMP" &&
71        mkdir "$TMP/Transmission.app" &&
72        ditto Transmission.app "$TMP/Transmission.app" &&
73        ditto AUTHORS "$TMP/AUTHORS.txt" &&
74        ditto LICENSE "$TMP/LICENSE.txt" &&
75        ditto NEWS "$TMP/NEWS.txt" &&
76        ( echo "[InternetShortcut]"; \
77          echo "URL=http://transmission.m0k.org/" ) > \
78          "$TMP/Homepage.url" &&
79        ( echo "[InternetShortcut]"; \
80          echo "URL=http://transmission.m0k.org/forum/" ) > \
81          "$TMP/Forums.url" &&
82        ( echo "[InternetShortcut]"; \
83          echo "URL=http://transmission.m0k.org/contribute.php" ) > \
84          "$TMP/Contribute.url" &&
85        hdiutil create -format UDZO -srcfolder "$TMP" $(1) &&
86        rm -rf "$TMP"
87    }
88}
Note: See TracBrowser for help on using the repository browser.