updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / msp430mcu / PKGBUILD
blob62b5fc1fd8a1289b21d109610509dc03beb34837
1 # Contributor: Rick W. Chen <stuffcorpse at archlinux dot us>
3 pkgname=msp430mcu
4 pkgver=20110613
5 pkgrel=5
6 pkgdesc="C headers and binutils linker scripts for microcontrollers in the MSP430 family"
7 arch=(any)
8 url="http://mspgcc4.sourceforge.net/"
9 license=('GPL')
10 makedepends=('python2')
11 options=(!strip)
13 _mspgcc_ver=20110716
14 _gnu_mirror="http://ftpmirror.gnu.org"
15 _sf_base="http://sourceforge.net/projects/mspgcc/files"
16 _patches_base="${_sf_base}/Patches/LTS/${_mspgcc_ver}"
18 _patches=("${pkgname}-${pkgver}-sf3379189.patch"
19           "${pkgname}-${pkgver}-sf3384550.patch"
20           "${pkgname}-${pkgver}-sf3400714.patch")
22 source=("http://sourceforge.net/projects/mspgcc/files/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
23         "${_patches[0]}::${_patches_base}/${_patches[0]}/download"
24         "${_patches[1]}::${_patches_base}/${_patches[1]}/download"
25         "${_patches[2]}::${_patches_base}/${_patches[2]}/download")
26 sha1sums=('79904ac0c1852c6846cadbb21a0cb77a47adcdcd'
27           '87f3d9a759e3dd67f8001775a479243ad2ea61fd'
28           '0efb29a413059603b4d2c44643351299238c662d'
29           '80c3bc7ea1cb40ac51400437e8e41d6a0b731ecb')
31 _builddir="${srcdir}/build"
33 build() {
34   cp -r "${srcdir}/msp430mcu-${pkgver}" ${_builddir} && cd ${_builddir}
35   sed -i -e "s|python |python2 |" $(find ./scripts/ -name '*.sh')
37   (cd "${_builddir}" &&
38     for patch in ${_patches[@]} ; do
39       msg "Applying ${patch}"
40       patch -p1 < "${srcdir}/${patch}"
41     done)
43   export MSP430MCU_ROOT=$(pwd)
44   ./scripts/build.sh
47 package() {
48   cd ${_builddir}
49   ./scripts/install.sh "${pkgdir}/usr"
52 # vim:set sts=2 ts=2 sw=2 et: