diff options
author | vonPalitroque | 2015-09-19 14:45:21 -0400 |
---|---|---|
committer | vonPalitroque | 2015-09-19 14:45:21 -0400 |
commit | 8b57591a7edca148a9dea19599fa03a8de02895f (patch) | |
tree | 10709231f48cacfedb7756596c0c329834f22614 /PKGBUILD | |
download | aur-8b57591a7edca148a9dea19599fa03a8de02895f.tar.gz |
initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..13a498ca389a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com> + +_target=msp430-elf +pkgname=${_target}-mcu +pkgver=3.5.0.0 +pkgrel=1 +pkgdesc="Header files and linker scripts for MSP430 microcontrollers" +arch=('any') +url="http://www.ti.com/tool/msp430-gcc-opensource" +license=('custom') +options=('!strip' 'staticlibs' 'emptydirs') +source=(http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/msp430-gcc-support-files.zip + license) +sha256sums=('1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407' + 'cd344f1a8da5c24768fbcc3494ad12b9880a82097dfb5a4d63d2a52f2833cc38') + + +build() { + cd "${srcdir}/msp430-gcc-support-files" + # https://sourceware.org/bugzilla/show_bug.cgi?id=17940 + # some linker scripts are missing the necessary debug_line the linker expects + for f in *.ld; do + echo -n "Modifying linker script ${f}... " + sed -i \ + "s|(\.debug_line)|(\.debug_line \.debug_line\.\* \.debug_line_end)|g" \ + ${f} + [[ $? = "0" ]] && echo "ok" || echo "fail" + done +} + +package() { + cd "${srcdir}/msp430-gcc-support-files" + + # install linker scripts + # binutils does weird stuff and does not look in lib/ldscripts + install -dm755 "${pkgdir}/usr/${_target}/lib" + for f in *.ld; do + install -m644 ${f} "${pkgdir}/usr/${_target}/lib" + done + + # install header files + install -dm755 "${pkgdir}/usr/${_target}/include" + for f in *.h; do + install -m644 ${f} "${pkgdir}/usr/${_target}/include" + done + + # copy license file + install -dm755 "${pkgdir}/usr/share/licenses/msp430-elf-mcu" + install -m644 ../license "${pkgdir}/usr/share/licenses/msp430-elf-mcu" +} + +# vim:set ts=2 sw=2 et: |