aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2014-07-01 19:37:13 +0200
committerMemphiz <memphis@machzwo.de>2014-07-01 19:37:13 +0200
commitacf0a87f94a4371053017472b5fcee846053c4b6 (patch)
treefe4e8fa81e88d631999d3382137e3e4432dbf56a /tools
parentb90c19306a79771fb598395948631722df074f05 (diff)
parent5b24e25bb89e76815e05495ba2b3458008750165 (diff)
Merge pull request #4957 from Memphiz/linusyangbp
[ios] - backports from linusyang
Diffstat (limited to 'tools')
-rwxr-xr-xtools/darwin/Support/Codesign.command2
-rw-r--r--tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in12
-rw-r--r--tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in16
-rw-r--r--tools/depends/native/Makefile2
-rw-r--r--tools/depends/native/fakeroot-native/Makefile42
-rw-r--r--tools/depends/native/gen_entitlements-native/Makefile14
-rwxr-xr-xtools/depends/native/gen_entitlements-native/gen_entitlements.py36
-rw-r--r--tools/depends/target/Backrow/Makefile2
-rw-r--r--tools/depends/target/python26/Makefile2
9 files changed, 116 insertions, 12 deletions
diff --git a/tools/darwin/Support/Codesign.command b/tools/darwin/Support/Codesign.command
index 62e248cf62..8df9860c67 100755
--- a/tools/darwin/Support/Codesign.command
+++ b/tools/darwin/Support/Codesign.command
@@ -5,7 +5,7 @@ LIST_BINARY_EXTENSIONS="dylib so 0 vis"
export CODESIGN_ALLOCATE=`xcodebuild -find codesign_allocate`
-GEN_ENTITLEMENTS="/Developer/iphoneentitlements401/gen_entitlements.py"
+GEN_ENTITLEMENTS="$XBMC_DEPENDS_ROOT/buildtools-native/bin/gen_entitlements.py"
if [ ! -f ${GEN_ENTITLEMENTS} ]; then
echo "error: $GEN_ENTITLEMENTS not found. Codesign won't work."
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
index ec15372fd9..35fd0913c4 100644
--- a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
+++ b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
@@ -32,7 +32,9 @@ if [ ! -d $XBMC ]; then
echo "XBMC.frappliance not found! are you sure you built $1 target?"
exit 1
fi
-if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
+if [ -f "$XBMC_DEPENDS_ROOT/buildtools-native/bin/fakeroot" ]; then
+ SUDO="$XBMC_DEPENDS_ROOT/buildtools-native/bin/fakeroot"
+elif [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
elif [ -f "/usr/bin/sudo" ]; then
SUDO="/usr/bin/sudo"
@@ -48,6 +50,7 @@ PACKAGE=org.xbmc.xbmc-atv2
VERSION=14.0
REVISION=0~alpha1
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+XBMCSIZE="$(du -s -k ${XBMC} | awk '{print $1}')"
echo Creating $PACKAGE package version $VERSION revision $REVISION
${SUDO} rm -rf $DIRNAME/$PACKAGE
@@ -61,6 +64,7 @@ echo "Name: XBMC-ATV2" >> $DIRNAME/$PACKAGE/DEBIAN/co
echo "Depends: curl, org.awkwardtv.whitelist, com.nito.updatebegone, org.xbmc.xbmc-seatbeltunlock" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Version: $VERSION-$REVISION" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Architecture: iphoneos-arm" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Installed-Size: $XBMCSIZE" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Description: XBMC Multimedia Center for AppleTV 2" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Homepage: http://xbmc.org/" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Maintainer: Scott Davilla, Edgar Hucek" >> $DIRNAME/$PACKAGE/DEBIAN/control
@@ -102,8 +106,9 @@ chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
mkdir -p $DIRNAME/$PACKAGE/Applications
cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.git*' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '*.xcent' -exec rm -rf {} \;
# set ownership to root:root
${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
@@ -115,7 +120,8 @@ echo Packaging $PACKAGE
export COPYFILE_DISABLE=true
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
#
-dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+${SUDO} dpkg-deb -bZ lzma $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+${SUDO} chown 501:20 $DIRNAME/$ARCHIVE
dpkg-deb --info $DIRNAME/$ARCHIVE
dpkg-deb --contents $DIRNAME/$ARCHIVE
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
index be99c0cb79..d916e45c1c 100644
--- a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
+++ b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
@@ -33,7 +33,9 @@ if [ ! -d $XBMC ]; then
echo "XBMC.app not found! are you sure you built $1 target?"
exit 1
fi
-if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
+if [ -f "${XBMC_DEPENDS_ROOT}/buildtools-native/bin/fakeroot" ]; then
+ SUDO="${XBMC_DEPENDS_ROOT}/buildtools-native/bin/fakeroot"
+elif [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then
export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
elif [ -f "/usr/bin/sudo" ]; then
SUDO="/usr/bin/sudo"
@@ -49,6 +51,7 @@ PACKAGE=org.xbmc.xbmc-ios
VERSION=14.0
REVISION=0~alpha1
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+XBMCSIZE="$(du -s -k ${XBMC} | awk '{print $1}')"
echo Creating $PACKAGE package version $VERSION revision $REVISION
${SUDO} rm -rf $DIRNAME/$PACKAGE
@@ -59,15 +62,16 @@ mkdir -p $DIRNAME/$PACKAGE/DEBIAN
echo "Package: $PACKAGE" > $DIRNAME/$PACKAGE/DEBIAN/control
echo "Priority: Extra" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Name: XBMC-iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Depends: firmware (>= 4.1), curl" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Depends: firmware (>= 4.1)" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Version: $VERSION-$REVISION" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Architecture: iphoneos-arm" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Installed-Size: $XBMCSIZE" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Description: XBMC Multimedia Center for 4.x iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Homepage: http://xbmc.org/" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Maintainer: Scott Davilla, Edgar Hucek" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Author: TeamXBMC" >> $DIRNAME/$PACKAGE/DEBIAN/control
echo "Section: Multimedia" >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Icon: file:///Applications/Cydia.app/Sources/mirrors.xbmc.org.png" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Icon: file:///Applications/XBMC.app/AppIcon57x57.png" >> $DIRNAME/$PACKAGE/DEBIAN/control
# prerm: called on remove and upgrade - get rid of existing bits.
echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/prerm
@@ -83,8 +87,9 @@ chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
mkdir -p $DIRNAME/$PACKAGE/Applications
cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.git*' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '*.xcent' -exec rm -rf {} \;
# set ownership to root:root
${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
@@ -96,7 +101,8 @@ echo Packaging $PACKAGE
export COPYFILE_DISABLE=true
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
#
-dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+${SUDO} dpkg-deb -bZ lzma $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+${SUDO} chown 501:20 $DIRNAME/$ARCHIVE
dpkg-deb --info $DIRNAME/$ARCHIVE
dpkg-deb --contents $DIRNAME/$ARCHIVE
diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile
index 9bbdd460a8..b03f7a13b6 100644
--- a/tools/depends/native/Makefile
+++ b/tools/depends/native/Makefile
@@ -13,7 +13,7 @@ NATIVE= m4-native gettext-native autoconf-native automake-native \
ifeq ($(OS),ios)
- NATIVE += dpkg-native xz-native tar-native
+ NATIVE += dpkg-native xz-native tar-native fakeroot-native gen_entitlements-native
endif
ifeq ($(OS),osx)
diff --git a/tools/depends/native/fakeroot-native/Makefile b/tools/depends/native/fakeroot-native/Makefile
new file mode 100644
index 0000000000..43ac4055fe
--- /dev/null
+++ b/tools/depends/native/fakeroot-native/Makefile
@@ -0,0 +1,42 @@
+include ../../Makefile.include
+PREFIX=$(NATIVEPREFIX)
+PLATFORM=$(NATIVEPLATFORM)
+DEPS= ../../Makefile.include.in Makefile
+
+APPNAME=fakeroot
+VERSION=macosx-v3.3
+SOURCE=$(APPNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
+APP_BASE_URL=http://github.com/downloads/mackyle/fakeroot
+
+# configuration settings
+CONFIGURE=./configure --prefix=$(PREFIX) --disable-dependency-tracking --disable-static
+
+APP=$(PLATFORM)/$(APPNAME)
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(APP_BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); $(CONFIGURE)
+
+$(APP): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)
+
+.installed-$(PLATFORM): $(APP)
+ $(MAKE) -C $(PLATFORM) install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+
diff --git a/tools/depends/native/gen_entitlements-native/Makefile b/tools/depends/native/gen_entitlements-native/Makefile
new file mode 100644
index 0000000000..a16b4549f6
--- /dev/null
+++ b/tools/depends/native/gen_entitlements-native/Makefile
@@ -0,0 +1,14 @@
+include ../../Makefile.include
+
+GEBIN=$(NATIVEPREFIX)/bin/gen_entitlements.py
+
+all: $(GEBIN)
+
+$(GEBIN):
+ mkdir -p $(NATIVEPREFIX)/bin
+ cp gen_entitlements.py $(GEBIN)
+ chmod 755 $(GEBIN)
+
+clean:
+distclean::
+ rm -f $(GEBIN)
diff --git a/tools/depends/native/gen_entitlements-native/gen_entitlements.py b/tools/depends/native/gen_entitlements-native/gen_entitlements.py
new file mode 100755
index 0000000000..d8ae6af3ee
--- /dev/null
+++ b/tools/depends/native/gen_entitlements-native/gen_entitlements.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+import sys
+import struct
+
+if len(sys.argv) != 3:
+ print "Usage: %s appname dest_file.xcent" % sys.argv[0]
+ sys.exit(-1)
+
+APPNAME = sys.argv[1]
+DEST = sys.argv[2]
+
+if not DEST.endswith('.xml') and not DEST.endswith('.xcent'):
+ print "Dest must be .xml (for ldid) or .xcent (for codesign)"
+ sys.exit(-1)
+
+entitlements = """
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>application-identifier</key>
+ <string>%s</string>
+ <key>get-task-allow</key>
+ <true/>
+</dict>
+</plist>
+""" % APPNAME
+
+f = open(DEST,'w')
+if DEST.endswith('.xcent'):
+ f.write("\xfa\xde\x71\x71")
+ f.write(struct.pack('>L', len(entitlements) + 8))
+f.write(entitlements)
+f.close()
+
diff --git a/tools/depends/target/Backrow/Makefile b/tools/depends/target/Backrow/Makefile
index 22cc1b8c01..7ceb06fc6c 100644
--- a/tools/depends/target/Backrow/Makefile
+++ b/tools/depends/target/Backrow/Makefile
@@ -17,7 +17,7 @@ $(PLATFORM)/$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
.installed-$(PLATFORM): $(PLATFORM)/$(SOURCE)
mkdir -p $(PREFIX)/include
- cp -rf $(PLATFORM)/$(SOURCE) $(PREFIX)/include/
+ cp -pR $(PLATFORM)/$(SOURCE) $(PREFIX)/include/
touch $@
clean:
diff --git a/tools/depends/target/python26/Makefile b/tools/depends/target/python26/Makefile
index 56fbb8cda4..f502a66b67 100644
--- a/tools/depends/target/python26/Makefile
+++ b/tools/depends/target/python26/Makefile
@@ -13,7 +13,7 @@ ARCHIVE=$(SOURCE).tar.bz2
CONFIGURE=OPT="$(CFLAGS)" \
LIBS=-lm \
./configure --prefix=$(PREFIX) \
- --disable-toolbox-glue --disable-framework --with-system-ffi \
+ --disable-toolbox-glue --disable-framework --with-system-ffi --without-pymalloc \
LIBDYLIB=$(PLATFORM)/libpython2.6.a