[aur-general] Review request for a PKGBUILD
Leonid Bloch
leonid.bloch at esrf.fr
Sun Jan 8 21:13:12 UTC 2017
Bruno, thanks for the catch! You are right!
But I prefer to keep the quotes: too many times I fell for some
unexplained behavior in Bash the reason for which was forgetting to
quote a variable. I try to quote wherever possible since. :)
Updated PKGBUILD:
~~~~~~~~~~~~~~~~~
# Package maintainer: Leonid B <leonid dot bloch at esrf dot fr>
pkgname=hdf5-lz4-filter-git
pkgver=r106.g863db28
pkgrel=1
pkgdesc="LZ4 filter for the HDF5 data format"
arch=('i686' 'x86_64')
url="https://github.com/nexusformat/HDF5-External-Filter-Plugins/tree/master/LZ4"
license=('BSD')
depends=('hdf5' 'lz4')
makedepends=('git')
source=("${pkgname%-git}::git+https://github.com/nexusformat/HDF5-External-Filter-Plugins.git"
"hdf5_env.sh")
sha256sums=('SKIP'
'643d90a15a5105d891adea12806d468aef134f902a38761e864a1085370fb4f9a')
pkgver() {
cd "${pkgname%-git}"
printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse
--short HEAD)"
}
prepare() {
cd "${pkgname%-git}"
git rm -rf BLOSC BZIP2 docs
}
build() {
cd "${pkgname%-git}/LZ4"
./configure --prefix=/usr --with-hdf5=/usr --with-lz4lib=/usr
make
}
package() {
cd "${pkgname%-git}/LZ4"
make DESTDIR="${pkgdir}/" install
install -D -m755 "${srcdir}/hdf5_env.sh"
"${pkgdir}/etc/profile.d/hdf5_env.sh"
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
On Sun, Jan 8, 2017 at 5:49 PM, Bruno Pagani via aur-general
<aur-general at archlinux.org> wrote:
> Le 08/01/2017 à 05:59, Leonid Bloch a écrit :
>
>> pkgver() {
>> cd "${srcdir}/${pkgname%-git}"
>>
>> prepare() {
>> cd "${srcdir}/${pkgname%-git}"
>>
>> build() {
>> cd "${srcdir}/${pkgname%-git}/LZ4"
>>
>> package() {
>> cd "${srcdir}/${pkgname%-git}/LZ4"
>
> Just a tiny thing, but makepkg always start each function into
> "${srcdir}$", so you could remove it from these paths (and thus the
> quote altogether).
>
>> install -D -m755 "${srcdir}/hdf5_env.sh"
>> "${pkgdir}/etc/profile.d/hdf5_env.sh"
>
> However, don’t remove it here, because you’re not in the "${srcdir}"
> anymore at this point. I’m sure you know, but that’s just in case you
> could have went too fast in removing ${srcdir} everywhere (I did when I
> learned about makepkg and "${srcdir}"). ;)
>
> Regards,
> Bruno
>
More information about the aur-general
mailing list