You are not logged in.
This is a PKGBUILD for a project I've created called WCGBrowser. It's my first PKGBUILD, and my goal is to submit it to the AUR.
I was hoping someone with some AUR experience could comment on any changes I should make before I submit it.
pkgname=wcgbrowser-git
pkgver=r117.ab48482
pkgrel=1
pkgdesc="A web browser for kiosk systems."
arch=('i686' 'x86_64')
url="http://www.alandmoore.com/wcgbrowser/wcgbrowser.html"
license=("GPL")
makedepends=('git')
depends=('python' 'python-yaml' 'python-pyqt5')
source=("git+https://github.com/alandmoore/wcgbrowser.git")
md5sums=('SKIP')
_reponame="wcgbrowser"
pkgver() {
cd "${srcdir}"/"${_reponame}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
cd "${srcdir}"/"${_reponame}"
# Make directories
install -dm755 "${pkgdir}"/usr/bin/
install -dm755 "${pkgdir}"/usr/share/"${_reponame}"
install -dm755 "${pkgdir}"/usr/share/doc/"${_reponame}"/examples
install -dm755 "${pkgdir}"/etc/
# Fix the path in wcgbrowser launch script
sed -i 's|/usr/local|/usr|' wcgbrowser
# Copy Files
install -m644 browser.py "${pkgdir}"/usr/share/"${_reponame}"/
install -m755 wcgbrowser "${pkgdir}"/usr/bin/
install -m644 wcgbrowser.yaml "${pkgdir}"/etc/
install -m644 README.rst "${pkgdir}"/usr/share/doc/"${_reponame}"/
install -m644 examples/* "${pkgdir}"/usr/share/doc/"${_reponame}"/examples/
}Offline
I only see two actual issues.
1. If there's nothing architecture specific in the final package, the 'arch' array should just contain 'any'.
2. You should run sed in a separate prepare function.
Beyond that, there is some simplification you can do. Using install's -D flag, you can create a directory at the same time you install a file. You just need to add the filename to the end of the destination. This won't work for the examples, though, you'll still have to create that one earlier. You could also eliminate the 'python' dep, as that would be satisfied by the other two. Both of these are style choices, though, so you can do it however you want.
Offline
Thanks! Here's what I have after following your suggestions:
pkgname=wcgbrowser-git
pkgver=20150305
pkgrel=1
pkgdesc="A web browser for kiosk systems."
arch=('any')
url="http://www.alandmoore.com/wcgbrowser/wcgbrowser.html"
license=("GPL")
makedepends=('git')
depends=('python-yaml' 'python-pyqt5')
source=("git+https://github.com/alandmoore/wcgbrowser.git")
md5sums=('SKIP')
_reponame="wcgbrowser"
pkgver() {
cd "${srcdir}"/"${_reponame}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}"/"${_reponame}"
# Fix the path in wcgbrowser launch script
sed -i 's|/usr/local|/usr|' wcgbrowser
}
package(){
cd "${srcdir}"/"${_reponame}"
# Make directories
install -dm755 "${pkgdir}"/usr/share/doc/"${_reponame}"/examples
# Copy Files
install -D -m644 browser.py "${pkgdir}"/usr/share/"${_reponame-}"/browser.py
install -D -m755 wcgbrowser "${pkgdir}"/usr/bin/wcgbrowser
install -D -m644 wcgbrowser.yaml "${pkgdir}"/etc/wcgbrowser.yaml
install -D -m644 README.rst "${pkgdir}"/usr/share/doc/"${_reponame}"/README.rst
install -m644 examples/* "${pkgdir}"/usr/share/doc/"${_reponame}"/examples/
}Offline