summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 855fda344e7768471ae719e01e4ba66848c11042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: ABDULLATIF Mouhamadi <bourou01dev@gmail.com>

pkgname=msp430-libc
pkgver=20120224
pkgrel=1
pkgdesc="C runtime library for the MSP430 family of microcontrollers"
arch=('i686' 'x86_64')
url="http://mspgcc4.sourceforge.net/"
license=('custom')
depends=('gcc-msp430')
options=(!strip)

_mspgcc_ver=20120406
_sf_base="http://sourceforge.net/projects/mspgcc/files"
_patches_base="${_sf_base}/Patches/LTS/${_mspgcc_ver}"
_patches=("${pkgname}-${pkgver}-sf3522752.patch")

source=("https://sourceforge.net/projects/mspgcc/files/msp430-libc/msp430-libc-${pkgver}.tar.bz2"
        "${_patches[0]}::${_patches_base}/${_patches[0]}/download")
sha1sums=('d01cf0db41bff1a0ab50644cbb11bc5a1d5be172'
          '2ca4aea9b8dcd6a199303373a8a97c7a2dd4eef6')

_builddir=build

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  (cd "${srcdir}/${pkgname}-${pkgver}" &&
    for patch in ${_patches[@]} ; do
      msg "Applying ${patch}"
      patch -p1 < "${srcdir}/${patch}"
    done)

  rm -frv ${_builddir}
  mkdir -p ${_builddir} && cd ${_builddir}

}


build() {
  cd "${srcdir}/${pkgname}-${pkgver}/src"
  make PREFIX=/usr
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}/src"
  mkdir -p ${pkgdir}/usr/msp430/lib
  make -j1 install PREFIX=${pkgdir}/usr

  install -Dm644 "${srcdir}/${pkgname}-${pkgver}/COPYING" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set sts=2 ts=2 sw=2 et: