1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 16:24:02 +00:00
transmission/Jamrules

110 lines
2.9 KiB
Text
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-01-12 18:30:10 +00:00
VERSION_MINOR = 4 ;
2006-01-12 18:20:48 +00:00
# VERSION_STRING = $(VERSION_MAJOR).$(VERSION_MINOR) ;
2006-01-12 18:52:15 +00:00
VERSION_STRING = CVS-20051213 ;
2006-01-12 17:43:21 +00:00
DEFINES += VERSION_MAJOR=$(VERSION_MAJOR)
VERSION_MINOR=$(VERSION_MINOR)
VERSION_STRING=\\\"$(VERSION_STRING)\\\" ;
2006-01-12 18:52:15 +00:00
OPTIM = -O0 ;
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 17:43:21 +00:00
sed "s/%%VERSION%%/$(VERSION_STRING)/" < $(2) > $(1)
}
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)
}
}