[aur-general] rfc: pkgbuild for prospect releng-tool
Doug Newgard
scimmia at archlinux.org
Wed Mar 6 06:59:58 UTC 2019
On Tue, 5 Mar 2019 23:53:10 -0700
Brett Cornwall via aur-general <aur-general at archlinux.org> wrote:
> On 2019-03-06 01:24, James Knight via aur-general wrote:
> >Hello -- new user to AUR and hoping if anyone is willing to review a
> >PKGBUILD [1] definition for me. I have been reading PKGBUILD [2] and
> >"AUR - Submitting packages" [3] documents, which the latter document
> >suggests to "... submit the PKGBUILD to the AUR mailing list ... for
> >public review before adding it to the AUR".
>
> Hello, and welcome!
>
> Great job doing your research. You've already gone above and beyond with
> the above.
>
>
> >pkgname=releng-tool
> >pkgver=0.1
>
> I don't see any releases on the upstream github. Where'd you get this
> 0.1?
>
> >pkgrel=1
> >pkgdesc='tool to assist in the release engineering of a project'
>
> Capitalize the T!
>
> >url='https://releng.io/'
> >arch=('any')
> >license=('BSD')
>
> I don't see this license in the project. It needs to be in the project,
> and if it is indeed BSD licensed you need to copy the license to
> "$pkgdir/usr/share/licenses/$pkgname/" [1]
License is in the repo and is already being installed. Nothing to see here.
>
> >makedepends=(
> > 'python'
> >)
>
> You're using python-setuptools, so you'll want to set that in
> makedepends instead of python.
Also missing git as a makedep. Might want to build in a clean chroot and see
what else you're missing. python shouldn't be in the makedeps, as it should be
in the global deps array, as stated below.
>
> >source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver")
>
> I see that you're the maintainer of upstream; Why not create a release
> on Github and then download the tarball here? Typically, pulling sources
> via git is for '-git' packages.
git is fine for release packages.
>
> >sha512sums=('SKIP')
>
> Having a tarball release will mean that you can have checksum
> verification as well.
>
git does checksumming.
> [...]
>
> >package() {
> > depends=('python')
>
> The depends() should just go to the top alongside makedepends for this
> package. You probably saw this in the examples for the python packaging
> standards, but this is typically used for a 'split package', i.e. using
> one PKGBUILD to build versions for both python2 and python3. Since
> you're only building for python 3 depends() should go to the top.
>
> > cd "$pkgname-$pkgver"
> > python setup.py install --root="$pkgdir" --optimize=1
>
> Go ahead and add a --skip-build here since you already built earlier.
>
> [...]
>
> > install -dm 755 "$pkgdir/usr/share/bash-completion/completions"
> > install -m644 scripts/releng-tool-completion
> >"$pkgdir/usr/share/bash-completion/completions/releng-tool"
>
> No need to create the directory beforehand; This can be shortened into:
>
> install -Dm644 scripts/releng-tool-completion "$pkgdir/usr/share/bash-completion/completions/releng-tool"
>
>
>
>
> Check out the 'namcap' package in [extra] if you haven't already. It's
> certainly a fallible tool but it can help with maintenance quality.
>
> Also, check out the Python packaging guidelines: https://wiki.archlinux.org/index.php/Python_package_guidelines#setuptools
>
>
> [1] https://wiki.archlinux.org/index.php/PKGBUILD#license
More information about the aur-general
mailing list