updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / ppc64-xenon-libxenon-git / PKGBUILD
blobd0daaa51466633d86692f80bf5dcb771c3b7cad3
1 # Maintainer: Moritz Fischer <aur@pure-entropy.org>
2 pkgname=ppc64-xenon-libxenon-git
3 pkgver=20110916
4 pkgrel=1
5 pkgdesc="legal homebrew @ xbox 360"
6 arch=('i686' 'x86_64')
7 license=('GPL')
8 depends=()
9 makedepends=('git' 'libmpc' 'mpfr' 'gettext' 'ppc64-xenon-binutils' 'ppc64-xenon-newlib' 'ppc64-xenon-gcc-elf')
10 provides=('ppc64-xenon-libxenon')
11 url="http://free60.org"
12 options=(!strip !buildflags)
14 conflicts=()
16 _gitroot=git://free60.git.sourceforge.net/gitroot/free60/free60
17 _gitname=free60
21 build() {
22         cd ${srcdir}
24         if [ -d $_gitname ]; then
25                 cd $_gitname && git reset HEAD --hard && git clean -x -d -f && git pull origin
26                 msg "Updated the local files."
27         else
28                 git clone $_gitroot
29                 msg "GIT checkout done or server timeout"
30         fi
32         cd ${srcdir}
33         export DEVKITXENON=/usr/xenon
35         make -C $_gitname/libxenon/ports/xenon libxenon.a || return 1
38 package() {
39         cd $_gitname/libxenon/ports/xenon
40         mkdir -p ${pkgdir}/usr/xenon/lib
41         cp libxenon.a ${pkgdir}/usr/xenon/lib/
42         mkdir -p ${pkgdir}/usr/xenon/include/libxenon
43         cp -r ../../drivers/* ${pkgdir}/usr/xenon/include/libxenon
44         cp ../../include/* ${pkgdir}/usr/xenon/include/libxenon
45         mkdir -p ${pkgdir}/usr/xenon/include/libxenon/lwip
46         cp ../../drivers/lwip/include/lwip/* ${pkgdir}/usr/xenon/include/libxenon/lwip/
47         cp ../../drivers/lwip/include/ipv4/lwip/* ${pkgdir}/usr/xenon/include/libxenon/lwip/
48         mkdir -p ${pkgdir}/usr/xenon/include/libxenon/netif/
49         cp ../../drivers/lwip/include/netif/* ${pkgdir}/usr/xenon/include/libxenon/netif/
50         mkdir -p ${pkgdir}/usr/xenon/include/libxenon/arch/
51         cp ../../drivers/lwip/xenon/include/arch/* ${pkgdir}/usr/xenon/include/libxenon/arch/
52         mkdir -p ${pkgdir}/usr/xenon/include/libxenon/sys/
53         cp ../../drivers/newlib/dirent.h ${pkgdir}/usr/xenon/include/libxenon/sys
54         find ${pkgdir}/usr/xenon/include/ -type f \! -name "*.h" -delete
55         cd ${srcdir}
56         cp  $_gitname/devkitxenon/app.lds free60/devkitxenon/rules ${pkgdir}/usr/xenon
57         # startup crt fix
58         cp $_gitname/libxenon/startup/xenon/crt1.o ${pkgdir}/usr/xenon/lib/
59         cp $_gitname/libxenon/ports/xenon/crti.o ${pkgdir}/usr/xenon/lib/
60         cp $_gitname/libxenon/ports/xenon/crtn.o ${pkgdir}/usr/xenon/lib/
61         sed -i -e 's#/usr/include#/include/libxenon#g' ${pkgdir}/usr/xenon/rules
62         sed -i -e 's#/usr/lib#/lib/32#g' ${pkgdir}/usr/xenon/rules
63         msg 'Please add an export DEVKITXENON="/usr/xenon" to your environment'