You are not logged in.
Pages: 1
Hi,
It is my first package and so I need feedback and review.
This tool allows to parse string to convert emoji from text format (like that :smile:) to raw image on the command line. It's binding of emojify (write in bash) in Perl for fix issues not fixed on and to add many emojis.
# Maintainer: Heziode <Heziode@protonmail.com>
pkgname=emojify-pl
pkgver=1.2.0
pkgrel=1
pkgdesc='Emoji on the command line. (perl version)'
arch=('any')
url='https://github.com/heziode/emojify'
depends=('perl')
license=('MIT')
source=(
"${url}/archive/${pkgver}.tar.gz"
)
package() {
install -Dm755 "${srcdir}/emojify-${pkgver}/emojify" "${pkgdir}/usr/bin/emojify"
install -Dm644 "${srcdir}/emojify-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
md5sums=('2e656ea98f314482e1f9fdc1cbcb9633')
Offline
The "(perl version)" in the pkgdesc is unnecessary, since there is already an emojify package in the AUR for the perl version, you'd have to rename this before uploading it.
You should use a source that begins with "${pkgname}-${pkgver}.tar.gz::" since otherwise, the "1.2.0.tar.gz" will clash with any other files having the same name, and many makepkg users do use the $SRCDEST variable to download all PKGBUILD sources to a shared directory.
Aside for that, I'd probably move the checksums to right below the source line, and you really should keep source=() all on one line like every other array with only one element but it seems okay.
So I would probably use the following source line:
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
It's a pretty simply PKGBUILD that just copies over a file, all you needed to do was do basically reasonable things like use properly quoted srcdir and pkgdir... which you have, so good job.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank's Eschwartz,
So with your review I have now this:
# Maintainer: Heziode <Heziode@protonmail.com>
pkgname=emojify-pl
pkgver=1.2.0
pkgrel=1
pkgdesc='Emoji on the command line.'
arch=('any')
url='https://github.com/heziode/emojify'
depends=('perl')
license=('MIT')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
md5sums=('2e656ea98f314482e1f9fdc1cbcb9633')
package() {
install -Dm755 "${srcdir}/emojify-${pkgver}/emojify" "${pkgdir}/usr/bin/emojify"
install -Dm644 "${srcdir}/emojify-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Last edited by Heziode (2018-01-21 10:07:44)
Offline
Yep, looks fine.
Also as a style thing, I would generally leave a line of whitespace between the last variable and the package() function, as this distinguishes it better. For much the same reason that I would leave whitespace between the #Maintainer comment and the pkgname variable (and that, you did).
Also note that strictly speaking, you do not "need" to prefix the install commands by "${srcdir}", as all the build() / package() / etc functions begin there anyways. That being said, I fall into the camp of people who do as you do, and specify it anyway.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank's for info Eschwartz.
# Maintainer: Heziode <Heziode@protonmail.com>
pkgname=emojify-pl
pkgver=1.2.0
pkgrel=1
pkgdesc='Emoji on the command line.'
arch=('any')
url='https://github.com/heziode/emojify'
depends=('perl')
license=('MIT')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
md5sums=('2e656ea98f314482e1f9fdc1cbcb9633')
package() {
install -Dm755 "${srcdir}/emojify-${pkgver}/emojify" "${pkgdir}/usr/bin/emojify"
install -Dm644 "${srcdir}/emojify-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Offline
Update, I have added conflict:
# Maintainer: Heziode <Heziode@protonmail.com>
pkgname=emojify-pl
pkgver=1.2.0
pkgrel=1
pkgdesc='Emoji on the command line.'
arch=('any')
url='https://github.com/heziode/emojify'
depends=('perl')
conflicts=('emojify')
license=('MIT')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
md5sums=('2e656ea98f314482e1f9fdc1cbcb9633')
package() {
install -Dm755 "${srcdir}/emojify-${pkgver}/emojify" "${pkgdir}/usr/bin/emojify"
install -Dm644 "${srcdir}/emojify-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Last edited by Heziode (2018-01-22 22:12:16)
Offline
Pages: 1