1 # Maintainer: BxS <bxsbxs at gmail dot com>
3 pkgname=microchip-mplabx-bin
6 pkgdesc="IDE for Microchip PIC and dsPIC development"
8 url=http://www.microchip.com/en_US/family/mplabx/index.html
10 depends=(java-runtime=6 libusb desktop-file-utils)
12 [ $CARCH = x86_64 ] && depends=(${depends[@]} lib32-glibc)
13 optdepends=('microchip-mplabc18_bin: C compiler for PIC18 MCUs'
14 'microchip-mplabc30_bin: C compiler for PIC24 MCUs and dsPIC DSCs'
15 'microchip-mplabc32_bin: C Compiler for PIC32 MCUs'
16 'hitech-picc_bin: C compiler for PIC10/12/16 MCUs'
17 'hitech-picc-18_bin: C compiler for PIC18 MCUs'
18 'hitech-dspicc-bin: C Compiler for PIC24 MCUs and dsPIC DSCs'
19 'hitech-picc32-bin: C compiler for PIC32 MCUs'
20 'sdcc: C compiler for PIC16/18 MCUs')
23 options=(!strip docs libtool emptydirs !zipman)
24 install=$pkgname.install
26 instdir=/opt/microchip/mplabx
27 installer=mplabx-ide-v$pkgver-linux-installer.run
28 source=(http://ww1.microchip.com/downloads/mplab/X_Beta/$installer
29 http://ww1.microchip.com/downloads/mplab/X_Beta/mplabx-ide-v1.00-release-notes.02.zip
31 microchip-mplabx.desktop
34 noextract=(mplabx-ide-v1.00-release-notes.02.zip)
35 md5sums=(a233ddb982d6377e502ca8e4d3451c8e
36 bf1238a09e7b7d0de8bef5ef85ef0bae
37 d11f3d54362d75c03edba2835da933bb
38 6f2a8170965d4963c468f4766e15fff7
39 1887fb51576009e5f96f6e7ac0b9bad4
40 2d1c400907ba208d3f06ec1ee84eb2c0)
43 echo -e "Creating Package\n Please Wait..."
47 rm -r * &> /dev/null || true
49 mkdir -p $pkgdir$instdir
51 echo -e "#! /bin/sh\necho \"java version \\\"1.6\"" > java
54 chmod 0755 $srcdir/$installer
55 echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ny\n\ny\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\ni\n\n" > inst_input
56 $srcdir/$installer --mode text --installdir $pkgdir$instdir < inst_input &> /dev/null || true
59 rm "$pkgdir$instdir/Uninstall MPLAB X IDE"{," v1.00.desktop"} &> /dev/null || true
60 rm -r $pkgdir$instdir/rollbackBackupDirectory &> /dev/null || true
62 sed 's/\x2F\x75\x73\x72\x2F\x6C\x6F\x63\x61\x6C\x2F\x6C\x69\x62\x2F\x6C\x69\x62\x6D\x63\x68\x70\x75\x73\x62\x2D\x31\x2E\x30\x2E\x73\x6F\x00/\x6C\x69\x62\x75\x73\x62\x2D\x31\x2E\x30\x2E\x73\x6F\x2E\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/' -i $pkgdir/opt/microchip/mplabx/mplab_ide/mplablibs/modules/lib/libUSBAccessLink.so
63 rm $pkgdir$instdir/mplab_ide/mplablibs/modules/lib/libusb-1.0*
65 sed -i 's/\/usr\/hitech/\/opt\/hitech/g' $pkgdir/opt/microchip/mplabx/mplab_ide/mplab_ide/modules/com-microchip-mplab-nbide-toolchainhitech.jar
67 install -Dm 644 $srcdir/z010_mchp_tools.rules $pkgdir/etc/udev/rules.d/z010_mchp_tools.rules
68 install -Dm 644 $srcdir/microchip-mplabx.desktop $pkgdir/usr/share/applications/microchip-mplabx.desktop
69 install -Dm 644 $srcdir/microchip-mplabx.png $pkgdir/usr/share/pixmaps/microchip-mplabx.png
71 mkdir -p $pkgdir/usr/bin
72 ln -s $instdir/mplab_ide/bin/mplab_ide $pkgdir/usr/bin/
74 install -Dm 644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
76 unzip -o $srcdir/mplabx-ide-v1.00-release-notes.02.zip -d $pkgdir$instdir/mplab_ide/mplab_ide/modules/docs > /dev/null