mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
f6a70e2a8f
Changed 0.5-cvs to 0.5-svn
110 lines
2.9 KiB
Text
110 lines
2.9 KiB
Text
include config.jam ;
|
|
|
|
if ! $(DEFINES)
|
|
{
|
|
Exit "Please run ./configure first." ;
|
|
}
|
|
|
|
VERSION_MAJOR = 0 ;
|
|
VERSION_MINOR = 4 ;
|
|
# VERSION_STRING = $(VERSION_MAJOR).$(VERSION_MINOR) ;
|
|
VERSION_STRING = 0.5-svn ;
|
|
|
|
DEFINES += VERSION_MAJOR=$(VERSION_MAJOR)
|
|
VERSION_MINOR=$(VERSION_MINOR)
|
|
VERSION_STRING=\\\"$(VERSION_STRING)\\\" ;
|
|
OPTIM = -O0 ;
|
|
RM = rm -Rf ;
|
|
|
|
rule SystemLibraries
|
|
{
|
|
LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] ?= $(LINKLIBS) ;
|
|
LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(>) ;
|
|
}
|
|
|
|
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 = ;
|
|
NOARSCAN = 1 ;
|
|
NOARUPDATE = 1 ;
|
|
actions Archive
|
|
{
|
|
libtool -static $(>) -o $(<) ;
|
|
}
|
|
|
|
rule OSXInfoPlist
|
|
{
|
|
Depends $(1) : $(2) ;
|
|
Depends $(1) : Jamrules ;
|
|
Clean clean : $(1) ;
|
|
}
|
|
actions OSXInfoPlist
|
|
{
|
|
$(RM) $(1)
|
|
sed "s/%%VERSION%%/$(VERSION_STRING)/g" < $(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" &&
|
|
strip -S "$TMP/Transmission.app/Contents/MacOS/Transmission" &&
|
|
( 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"
|
|
}
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|