update to 10.0.2_411 and cleanup of code

This commit is contained in:
Romain Bazile 2017-07-17 10:46:48 +02:00
parent f804ae82d3
commit 8e647e5ab1
3 changed files with 62 additions and 28 deletions

View file

@ -1,7 +1,7 @@
pkgbase = mcuxpresso-ide pkgbase = mcuxpresso-ide
pkgdesc = An easy-to-use integrated development environment (IDE) for creating, building, debugging, and optimizing your application. From BIN package distributed by NXP. pkgdesc = An easy-to-use integrated development environment (IDE) for creating, building, debugging, and optimizing your application. From BIN package distributed by NXP.
pkgver = 10.0.0_344 pkgver = 10.0.2_411
pkgrel = 3 pkgrel = 1
url = http://www.nxp.com/MCUXPresso url = http://www.nxp.com/MCUXPresso
arch = x86_64 arch = x86_64
license = custom:"NXP" license = custom:"NXP"
@ -11,11 +11,12 @@ pkgbase = mcuxpresso-ide
depends = ncurses depends = ncurses
depends = glibc depends = glibc
depends = lib32-glibc depends = lib32-glibc
noextract = mcuxpressoide-10.0.0_344.x86_64.deb.bin depends = jlink-software-and-documentation
noextract = mcuxpressoide-10.0.2_411.x86_64.deb.bin
options = !strip options = !strip
source = https://freescaleesd.flexnetoperations.com/337170/457/11291457/mcuxpressoide-10.0.0_344.x86_64.deb.bin source = https://freescaleesd.flexnetoperations.com/337170/537/11781537/mcuxpressoide-10.0.2_411.x86_64.deb.bin
source = LICENSE source = LICENSE
sha256sums = e39a767b6bd8ef9e84efa2e20ecc07cc8c7a8bbcfb04633d52e0d02ea2b5ce73 sha256sums = 4cd3d04d7d7c0b84a69b801f3c0eb7fa4c897dbdbfcfe1fd7fd4d2295746b293
sha256sums = f54634d263ed329288adbcd617f971502a22f38717602c504371a49301d37fb2 sha256sums = f54634d263ed329288adbcd617f971502a22f38717602c504371a49301d37fb2
pkgname = mcuxpresso-ide pkgname = mcuxpresso-ide

View file

@ -1,17 +1,17 @@
# Maintainer: Romain Bazile <gromain.baz at gmail dot com> # Maintainer: Romain Bazile <gromain.baz at gmail dot com>
pkgname=mcuxpresso-ide pkgname=mcuxpresso-ide
pkgver=10.0.0_344 pkgver=10.0.2_411
pkgrel=3 pkgrel=1
epoch= epoch=
pkgdesc="An easy-to-use integrated development environment (IDE) for creating, building, debugging, and optimizing your application. From BIN package distributed by NXP." pkgdesc="An easy-to-use integrated development environment (IDE) for creating, building, debugging, and optimizing your application. From BIN package distributed by NXP."
arch=('x86_64') arch=('x86_64')
url="http://www.nxp.com/MCUXPresso" url="http://www.nxp.com/MCUXPresso"
license=('custom:"NXP"') license=('custom:"NXP"')
depends=('dfu-util' 'libusb' 'webkitgtk' 'ncurses' 'glibc' 'lib32-glibc') depends=('dfu-util' 'libusb' 'webkitgtk' 'ncurses' 'glibc' 'lib32-glibc' 'jlink-software-and-documentation')
source=("https://freescaleesd.flexnetoperations.com/337170/457/11291457/mcuxpressoide-${pkgver}.${arch}.deb.bin" "LICENSE") source=("https://freescaleesd.flexnetoperations.com/337170/537/11781537/mcuxpressoide-${pkgver}.${arch}.deb.bin" "LICENSE")
noextract=("mcuxpressoide-${pkgver}.${arch}.deb.bin") noextract=("mcuxpressoide-${pkgver}.${arch}.deb.bin")
sha256sums=('e39a767b6bd8ef9e84efa2e20ecc07cc8c7a8bbcfb04633d52e0d02ea2b5ce73' sha256sums=('4cd3d04d7d7c0b84a69b801f3c0eb7fa4c897dbdbfcfe1fd7fd4d2295746b293'
'f54634d263ed329288adbcd617f971502a22f38717602c504371a49301d37fb2') 'f54634d263ed329288adbcd617f971502a22f38717602c504371a49301d37fb2')
options=('!strip') options=('!strip')
@ -25,21 +25,17 @@ prepare() {
rm mcuxpressoide-${pkgver}.${arch}.deb rm mcuxpressoide-${pkgver}.${arch}.deb
bsdtar -x -f mcuxpressoide/data.tar.gz -C mcuxpressoide/ bsdtar -x -f mcuxpressoide/data.tar.gz -C mcuxpressoide/
rm mcuxpressoide/data.tar.gz rm mcuxpressoide/data.tar.gz
mkdir JLink_Linux_x86_64
bsdtar -x -f JLink_Linux_x86_64.deb -C JLink_Linux_x86_64/
rm JLink_Linux_x86_64.deb rm JLink_Linux_x86_64.deb
bsdtar -x -f JLink_Linux_x86_64/data.tar.gz -C JLink_Linux_x86_64/
rm JLink_Linux_x86_64/data.tar.gz
} }
package() { package() {
# Create folder for license file
mkdir -p ${srcdir}/mcuxpressoide/usr/share/NXPLPCXpresso; mkdir -p ${srcdir}/mcuxpressoide/usr/share/NXPLPCXpresso;
mv ${srcdir}/mcuxpressoide/lib/udev/rules.d/55-pemicro.rules ${srcdir}/mcuxpressoide/lib/udev/rules.d/57-pemicro.rules # Move main folder in place
cp -r ${srcdir}/mcuxpressoide/usr ${pkgdir}/; mv ${srcdir}/mcuxpressoide/usr ${pkgdir}/;
cp -r ${srcdir}/mcuxpressoide/lib ${pkgdir}/usr/; # Move udev rules from /lib to /usr/lib folder
cp -r ${srcdir}/JLink_Linux_x86_64/usr ${pkgdir}/; mv ${srcdir}/mcuxpressoide/lib/udev ${pkgdir}/usr/lib/;
cp -r ${srcdir}/JLink_Linux_x86_64/opt ${pkgdir}/; # Add LICENSE file to licenses folder
cp -r ${srcdir}/JLink_Linux_x86_64/etc ${pkgdir}/;
install -D -m644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE; install -D -m644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE;
} }

View file

@ -1,13 +1,50 @@
pre_install() { msg() {
echo "Be advised that the package you are currently installing should be downloaded through" # check if messages are to be printed using color
echo "NXP's License Wall at https://www.nxp.com/MCUXpresso" unset ALL_OFF BOLD BLUE GREEN RED YELLOW
echo "By installing this package you agree to the terms of this license." # prefer terminal safe colored and bold text when tput is supported
echo "A copy of the License is available in /usr/share/licenses/mcuxpresso-ide" if tput setaf 0 &>/dev/null; then
ALL_OFF="$(tput sgr0)"
BOLD="$(tput bold)"
BLUE="${BOLD}$(tput setaf 4)"
GREEN="${BOLD}$(tput setaf 2)"
RED="${BOLD}$(tput setaf 1)"
YELLOW="${BOLD}$(tput setaf 3)"
else
ALL_OFF="\e[0m"
BOLD="\e[1m"
BLUE="${BOLD}\e[34m"
GREEN="${BOLD}\e[32m"
RED="${BOLD}\e[31m"
YELLOW="${BOLD}\e[33m"
fi
local mesg=$1; shift
printf "${RED} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
} }
license() {
msg "Be advised that the package you are currently installing should be downloaded through"
msg "NXP's License Wall at https://www.nxp.com/MCUXpresso"
msg "By installing this package you agree to the terms of this license."
msg "A copy of the License is available in /usr/share/licenses/mcuxpresso-ide"
}
pre_install(){
license
}
pre_upgrade() {
license
}
post_install() { post_install() {
echo "Warning! If you want to be able to install or update plugins" msg "Warning! If you want to be able to install or update plugins"
echo "in MCUXpresso, you either need to launch it as root, or" msg "in MCUXpresso, you either need to launch it as root, or"
echo "chown the /usr/local/mcuxpressoide-${pkgver}/ide/ folder to your user." msg "chown the /usr/local/mcuxpressoide-${pkgver}/ide/ folder to your user."
}
post_upgrade() {
msg "Warning! If you want to be able to install or update plugins"
msg "in MCUXpresso, you either need to launch it as root, or"
msg "chown the /usr/local/mcuxpressoide-${pkgver}/ide/ folder to your user."
} }