You are not logged in.
Pages: 1
Hello, since this is the first package I've created, I thought it would be best to have it reviewed before submitting it to the AUR.
Thank you!
PKGBUILD:
# Maintainer: Jeremey Hustman <jeremeyhustman at gmail daught com>
pkgname=cflint-git
_gitname=CFLint
pkgver=CFLint.0.4.release.r21.d446a95
pkgrel=1
pkgdesc="A static code analysis tool for ColdFusion"
url=https://github.com/cflint/CFLint/wiki
arch=(any)
license=('(L)GPL3')
depends=()
makedepends=('git' 'maven')
conflicts=($_gitname)
provides=($_gitname)
noextract=()
source=("git://github.com/cflint/${_gitname}.git")
md5sums=('SKIP')
pkgver() {
cd "$_gitname"
# Git, tags available
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
if [ -d "${_gitname}" ]; then
cd "$_gitname"
git clean -dfx
git reset --hard
git pull origin master
else
git clone "${_gitroot}"
cd "${_gitname}"
fi
mvn clean install
}
package() {
cd "${srcdir}/${_gitname}"
mkdir -p ${pkgdir}/{usr/bin,usr/etc,usr/lib}
pwd
install -Dm755 target/appassembler/bin/* "${pkgdir}/usr/bin/"
install -Dm644 target/appassembler/etc/* "${pkgdir}/usr/etc/"
install -Dm644 target/appassembler/lib/* "${pkgdir}/usr/lib/"
}
Offline
First off, the entire if/else block in the build function is not only unnecessary but counter productive. Get rid of it.
What is the pwd command in the package function for?
You did well with quoting in general, but missed the mkdir command.
I would suggest cleaning up the pkgver a bit. You really don't want it to start with "CFLint", for example.
Online
...and you can remove the empty arrays (depends, noextract).
Offline
Also, I don't think that license entry is valid.
Online
Thank you all, I appreciate your input!
Offline
Scimmia, that pwd was to make sure that I was where I though I was, debugging code that got left behind.
Offline
Moving to "Creating & Modifying Packages"
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Pages: 1