updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / msp430-gdb / PKGBUILD
blob46dd5651375461f6ec23798a980bd92de7e38456
1 # Contributor: Rick W. Chen <stuffcorpse at archlinux dot us>
3 pkgname=msp430-gdb
4 pkgver=7.2a
5 _gdbver=7.2
6 pkgrel=1
7 pkgdesc="GNU debugger for MSP430"
8 arch=('i686' 'x86_64')
9 url="http://mspgcc4.sourceforge.net/"
10 license=('GPL')
11 depends=('gcc-msp430' 'python2')
12 makedepends=('gcc-msp430')
14 _mspgcc_ver=20110716
15 _gdb_patch_ver=20110103
16 _gnu_mirror="http://ftpmirror.gnu.org"
18 source=("http://sourceforge.net/projects/mspgcc/files/mspgcc/mspgcc-${_mspgcc_ver}.tar.bz2"
19         "${_gnu_mirror}/gdb/gdb-${pkgver}.tar.bz2")
20 sha1sums=('db625da1295fa7b64fe687420d908e532e72439c'
21           '14daf8ccf1307f148f80c8db17f8e43f545c2691')
23 _builddir="${srcdir}/build"
25 build() {
26   _patch_name="msp430-gdb-${_gdbver}-${_gdb_patch_ver}.patch"
27   (cd "${srcdir}/gdb-${_gdbver}" &&
28     patch -p1 < "${srcdir}/mspgcc-${_mspgcc_ver}/${_patch_name}")
30   rm -frv ${_builddir}
31   mkdir -p ${_builddir} && cd ${_builddir}
32   "${srcdir}/gdb-${_gdbver}/configure" \
33     --target=msp430 \
34     --prefix=/usr \
35     --program-prefix="msp430-" \
36     --enable-languages=c,c++ \
37     --mandir=/usr/share/man \
38     --infodir=/usr/share/info \
39     --with-python=python2 \
40     --disable-nls
41   make
44 package() {
45   cd ${_builddir}
46   make DESTDIR=${pkgdir} install
48   cd ${pkgdir}/usr/share/info
49   for file in annotate stabs ; do
50     mv ${file}.info "msp430-${file}.info"
51   done
53   for file in gdb.info* gdbint.info* ; do
54     mv ${file} "msp430-${file}"
55   done
57   rm -fr ${pkgdir}/usr/lib/libiberty.a
58   rm -fr ${pkgdir}/usr/share/info/dir
59   rm -fr ${pkgdir}/usr/share/info/bfd.info
60   rm -fr ${pkgdir}/usr/share/info/configure.info
61   rm -fr ${pkgdir}/usr/share/info/standards.info
63   rm -fr ${pkgdir}/usr/share/gdb/syscalls/amd64-linux.xml
64   rm -fr ${pkgdir}/usr/share/gdb/syscalls/gdb-syscalls.dtd
65   rm -fr ${pkgdir}/usr/share/gdb/syscalls/i386-linux.xml
66   rm -fr ${pkgdir}/usr/share/gdb/syscalls/ppc-linux.xml
67   rm -fr ${pkgdir}/usr/share/gdb/syscalls/ppc64-linux.xml
68   rm -fr ${pkgdir}/usr/share/gdb/syscalls/sparc-linux.xml
69   rm -fr ${pkgdir}/usr/share/gdb/syscalls/sparc64-linux.xml
72 # vim:set sts=2 ts=2 sw=2 et: