transmission/Jamrules

111 lines
2.9 KiB
Plaintext
Raw Normal View History

2006-01-12 17:43:21 +00:00
include config.jam ;
if ! $(DEFINES)
{
Exit "Please run ./configure first." ;
}
VERSION_MAJOR = 0 ;
2006-02-11 16:34:25 +00:00
VERSION_MINOR = 5 ;
VERSION_STRING = $(VERSION_MAJOR).$(VERSION_MINOR) ;
# VERSION_STRING = 0.6-svn ;
2006-01-12 17:43:21 +00:00
DEFINES += VERSION_MAJOR=$(VERSION_MAJOR)
VERSION_MINOR=$(VERSION_MINOR)
VERSION_STRING=\\\"$(VERSION_STRING)\\\" ;
2006-02-11 16:34:25 +00:00
OPTIM = -O3 ;
2006-01-12 17:43:21 +00:00
RM = rm -Rf ;
2006-01-12 18:33:20 +00:00
rule SystemLibraries
{
LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] ?= $(LINKLIBS) ;
LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(>) ;
}
2006-01-12 17:43:21 +00:00
if $(OS) = MACOSX
{
# Build universal binaries
CCFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-arch ppc -arch i386 ;
LINKFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
-arch ppc -arch i386 ;
# Use libtool to build static libraries (ar does not handle
# universal binaries)
RANLIB = ;
2006-01-12 18:20:48 +00:00
NOARSCAN = 1 ;
2006-01-12 17:43:21 +00:00
NOARUPDATE = 1 ;
actions Archive
{
libtool -static $(>) -o $(<) ;
}
rule OSXInfoPlist
{
Depends $(1) : $(2) ;
2006-01-12 18:20:48 +00:00
Depends $(1) : Jamrules ;
2006-01-12 17:43:21 +00:00
Clean clean : $(1) ;
}
actions OSXInfoPlist
{
2006-01-12 18:20:48 +00:00
$(RM) $(1)
2006-01-12 18:57:23 +00:00
sed "s/%%VERSION%%/$(VERSION_STRING)/g" < $(2) > $(1)
2006-01-12 17:43:21 +00:00
}
rule OSXBundle
{
Depends exe : $(1) ;
Depends $(1) : $(2) ;
Clean clean : $(1) macosx/build ;
}
actions OSXBundle
{
$(RM) $(1) && ( cd macosx && xcodebuild ) && \
mv macosx/build/Debug/Transmission.app $(1)
}
rule OSXPackage
{
Depends $(1) : $(2) ;
Clean clean : $(1) ;
DoOSXPackage $(1) ;
}
actions DoOSXPackage
{
TMP="Transmission $(VERSION_STRING)"
rm -f $(1) "$TMP" && mkdir "$TMP" &&
mkdir "$TMP/Transmission.app" &&
ditto Transmission.app "$TMP/Transmission.app" &&
ditto AUTHORS "$TMP/AUTHORS.txt" &&
ditto LICENSE "$TMP/LICENSE.txt" &&
ditto NEWS "$TMP/NEWS.txt" &&
2006-01-12 18:33:20 +00:00
strip -S "$TMP/Transmission.app/Contents/MacOS/Transmission" &&
2006-01-12 17:43:21 +00:00
( echo "[InternetShortcut]"; \
echo "URL=http://transmission.m0k.org/" ) > \
"$TMP/Homepage.url" &&
( echo "[InternetShortcut]"; \
echo "URL=http://transmission.m0k.org/forum/" ) > \
"$TMP/Forums.url" &&
( echo "[InternetShortcut]"; \
echo "URL=http://transmission.m0k.org/contribute.php" ) > \
"$TMP/Contribute.url" &&
hdiutil create -format UDZO -srcfolder "$TMP" $(1) &&
rm -rf "$TMP"
}
}
2006-01-12 18:52:15 +00:00
if $(OS) = BEOS
{
rule BeOSBuild
{
Depends exe : $(1) ;
Depends $(1) : $(2) ;
Clean clean : $(1) beos/obj.$(CPU) ;
}
actions BeOSBuild
{
$(RM) $(1) && ( cd beos && make ) && \
mv beos/obj.$(CPU)/Transmission $(1)
}
2006-01-12 18:57:23 +00:00
}