You are not logged in.

#1 2017-02-02 14:21:08

sballert
Member
Registered: 2017-02-02
Posts: 1

PKGBUILD review request: lejos-ev3

Hello,

can someone please review this package for me? I used the lejos-nxt package as template.

PKGBUILD

# Maintainer: sballert <sballert@posteo.de>

pkgname=lejos-ev3
_pkgver=0.9.1-beta
pkgver=0.9.1.beta
pkgrel=1
pkgdesc="A firmware and toolchain for programming the Lego EV3 in Java"
arch=('any')
license=('MPL' 'GPL' 'APACHE')
url="http://lejos.sourceforge.net/"
depends=('java-environment')
source=("https://downloads.sourceforge.net/project/ev3.lejos.p/${_pkgver}/leJOS_EV3_${_pkgver}.tar.gz")
md5sums=('e58802d784ba990c09b4196fc99dc0ab')

install=${pkgname}.install

package() {
    cd leJOS_EV3_${_pkgver}

    # create directories
    install -d -m755 ${pkgdir}/opt/lejos-ev3/{bin,lib}
    install -d -m755 ${pkgdir}/opt/lejos-ev3/lib/{ev3,pc}
    install -d -m755 ${pkgdir}/opt/lejos-ev3/lib/ev3/3rdparty
    install -d -m755 ${pkgdir}/opt/lejos-ev3/lib/pc/3rdparty

    # install files
    install -m755 -t ${pkgdir}/opt/lejos-ev3/bin bin/*
    install -m644 -t ${pkgdir}/opt/lejos-ev3/lib/ev3/ lib/ev3/{*.jar,*.zip}
    install -m644 -t ${pkgdir}/opt/lejos-ev3/lib/pc/ lib/pc/{*.jar,*.zip}
    install -m644 -t ${pkgdir}/opt/lejos-ev3/lib/ev3/3rdparty lib/ev3/3rdparty/*.jar
    install -m644 -t ${pkgdir}/opt/lejos-ev3/lib/pc/3rdparty lib/pc/3rdparty/{*.jar,*.zip}

    # copy docs
    cp -r docs/* ${pkgdir}/opt/lejos-ev3/docs

    # create links
    install -d -m755 ${pkgdir}/usr/bin
    cd ${pkgdir}/opt/lejos-ev3/bin
    for i in ev3*; do ln -sf /opt/lejos-ev3/bin/${i} ${pkgdir}/usr/bin/; done
}

lejos-ev3.install

post_install() {
    echo ">>> For samples of usage and documentation please visit "
    echo ">>> 'http://lejos.sourceforge.net/'."
}

namcap:

lejos-ev3 W: Referenced library 'bash' is an uninstalled dependency

Thanks in advance.

Offline

#2 2017-02-03 20:29:36

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: lejos-ev3

Seems simple enough, and fairly clean. Two notes:

${pkgdir} must always be quoted, as you cannot control the directory makepkg is run in and therefore ${pkgdir} can have spaces in it.
That install script is completely useless, users should already know to see /usr/share/docs/ for documentation and consult the project homepage. Emitting spam on post_install without telling the user anything they don't already know, is a bad idea.

I don't know where that namcap warning comes from, but namcap can only offer hopefully-useful advice and should be taken with a grain of salt. In this case, since "bash" is part of the base group, it never needs to be specified as a dependency.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB