Created
April 8, 2015 12:13
-
-
Save victorhaggqvist/9dc57e63f202b73e2c6a to your computer and use it in GitHub Desktop.
Pebble SDK 3.0_dp6 PKGBUILD and PKGBUILD for qemu-fdt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org> | |
# Adapted for dp1 version by Semyon Maryasin <simeon@maryasin.name> | |
# vim: ft=sh | |
pkgname=pebble-sdk-beta | |
pkgver=3.0_dp6 | |
pkgrel=1 | |
pkgdesc="Pebble SDK, used to develop applications and watchfaces for the Pebble Smartwatch." | |
url="https://developer.getpebble.com/2/getting-started/" | |
arch=('i386' 'x86_64') | |
license=('custom' 'MIT') | |
install='pebble-sdk.install' | |
depends=('arm-none-eabi-gcc' 'arm-none-eabi-newlib' 'python2-pypng' 'python2-freetype-py' | |
'python2-sh' 'python2-twisted' 'python2-autobahn' | |
'python2-websocket-client' 'arm-none-eabi-binutils' | |
'python2-greenlet' 'python2-requests' | |
'python2-six' 'python2-wsgiref' 'python2-dateutil' 'python2-peewee' | |
'python2-gevent' 'python2-gevent-websocket' 'python2-pygeoip' 'qemu-fdt' 'python2-oauth2client' 'libpng12') | |
# 'pypy-backports.ssl_match_hostname' | |
optdepends=('python2-pyserial: To connect to the Pebble via serial port') | |
conflicts=('pebble-sdk') | |
source=("http://assets.getpebble.com.s3-website-us-east-1.amazonaws.com/sdk2/PebbleSDK-${pkgver/_/-}.tar.gz" | |
'python-waf.patch' | |
'build-command.patch' | |
'pebble-sdk.install') | |
sha1sums=('568ec2f553bc7e577c19400979c2fd26b4a5f55f' | |
'a59d059fb75db7cfdebb008917a2b96459bdaa38' | |
'72be6cd5697dc401f89544578aa4c4f8a97905f9' | |
'7ea5244f828e682d073434078569fab62a1ad996') | |
options=('staticlibs' '!strip') | |
prepare() { | |
cd "$srcdir/PebbleSDK-${pkgver//_/-}" | |
find . -type f \( -path ./bin/pebble -o -path ./Pebble/waf -o \ | |
-name '*.py' \) -exec \ | |
sed -i '1s|^#!/usr/bin/env python$|#!/usr/bin/python2|' {} \; | |
patch -p0 -i "$srcdir/build-command.patch" | |
# Unpack waf and fix python files | |
cd Pebble | |
./waf 2>/dev/null || true | |
cd .waf* | |
find . -type f -name '*.py' -exec \ | |
sed -i '1s|^#! /usr/bin/env python$|#!/usr/bin/python2|' {} \; | |
patch -p0 -i "$srcdir/python-waf.patch" | |
} | |
package() { | |
install -dm755 "$pkgdir/opt/pebble" | |
install -dm755 "$pkgdir/usr/bin" | |
cd "$srcdir/PebbleSDK-${pkgver//_/-}" | |
cp -R * "$pkgdir/opt/pebble" | |
rm -r "$pkgdir/opt/pebble/bin" | |
ln -s "/opt/pebble/tools/pebble.py" "$pkgdir/usr/bin/pebble" | |
touch "$pkgdir/opt/pebble/NO_TRACKING" | |
chown -R $USER "$pkgdir/opt/pebble" | |
} | |
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Josh Cartwright <joshc@eso.teric.us> | |
# Based on extra/qemu maintained by Tobias Powalowski <tpowa@archlinux.org> | |
pkgname=qemu-fdt | |
pkgver=1.5.0 | |
pkgrel=2 | |
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation." | |
arch=('i686' 'x86_64') | |
license=('GPL2' 'LGPL2.1') | |
url="http://wiki.qemu.org/Index.html" | |
makedepends=('texi2html' 'perl' 'python2') | |
depends=('pixman' 'libjpeg' 'libpng' 'sdl' 'alsa-lib' 'nss' 'glib2' 'gnutls>=2.4.1' 'bluez-libs' 'vde2' 'util-linux' 'curl' 'libsasl' 'libgl' 'libpulse' 'seabios' 'libcap-ng' 'dtc') | |
conflicts=('qemu') | |
backup=('etc/qemu/target-x86_64.conf') | |
install=qemu.install | |
source=(http://wiki.qemu.org/download/qemu-${pkgver}.tar.bz2 | |
define-fdt-types.patch | |
65-kvm.rules) | |
options=(!strip) | |
prepare() | |
{ | |
cd "${srcdir}/qemu-${pkgver}" | |
sed -i -e 's/lib64/lib/g' ldscripts/x86_64.ld | |
# fix building with newer dtc versions | |
# http://lists.gnu.org/archive/html/qemu-devel/2013-05/msg00856.html | |
patch -Np1 -i ${srcdir}/define-fdt-types.patch | |
} | |
build () | |
{ | |
cd "${srcdir}/qemu-${pkgver}" | |
./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list=oss,alsa,sdl,pa \ | |
--python=/usr/bin/python2 \ | |
--enable-mixemu --libexecdir=/usr/lib/qemu \ | |
--enable-fdt | |
make | |
} | |
package() { | |
cd "${srcdir}/qemu-${pkgver}" | |
make DESTDIR="${pkgdir}" libexecdir="/usr/lib/qemu" install | |
rm "${pkgdir}/usr/share/qemu/bios.bin" | |
install -D -m644 "${srcdir}/65-kvm.rules" \ | |
"${pkgdir}/usr/lib/udev/rules.d/65-kvm.rules" | |
# bridge_helper needs suid | |
# https://bugs.archlinux.org/task/32565 | |
chmod u+s "${pkgdir}/usr/lib/qemu/qemu-bridge-helper" | |
# add sample config | |
echo "allow br0" > ${pkgdir}/etc/qemu/bridge.conf.sample | |
# strip scripts directory | |
find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do | |
case "$(file -bi "$binary")" in | |
*application/x-executable*) # Binaries | |
/usr/bin/strip $STRIP_BINARIES "$binary";; | |
esac | |
done | |
} | |
md5sums=('b6f3265b8ed39d77e8f354f35cc26e16' | |
'ead7109d56d11f736297c730af85a114' | |
'b316a066d2f1bb57d8f5b7ea1d0d1caf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment