You are not logged in.

#1 2016-09-17 18:05:36

dbishop
Member
Registered: 2016-04-27
Posts: 4

PKGBUILD Review Request: Legofy 1.0.0

Hey all,

This is my first PKGBUILD for a little fun program that I like to use from time to time. Thought it would be good practice for creating and maintaining packages.

I've built and tested this on my system using this PKGBUILD already, but I just want to make sure that it's all kosher before I publish it to the AUR:

# Maintainer: Donnie Bishop <donnie.a.bishop@gmail.com>

pkgname=legofy
pkgver=1.0.0
pkgrel=1
pkgdesc=" Make images look as if they are made out of 1x1 LEGO blocks "
arch=('any')
url="https://github.com/JuanPotato/Legofy"
license=('MIT')
provides=('legofy')
depends=('python' 'python-pillow' 'python-click')
makedepends=('git' 'python')
options=(!emptydirs)
source=("git://github.com/JuanPotato/Legofy")
sha1sums=('SKIP')

_gitname='Legofy'

package() {
  cd "$srcdir/$_gitname"
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et:

I used makepkg to generate the .SRCINFO file, and have that ready to commit and push as well.

Any advice or tips would be much appreciated! Glad I'm finally starting to contribute to the community!

Offline

#2 2016-09-18 01:22:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,541

Re: PKGBUILD Review Request: Legofy 1.0.0

If building from git HEAD, this needs to be a VCS package. Alternatively, you need to build from a release tarball or tag.

Offline

#3 2016-09-19 13:35:33

dbishop
Member
Registered: 2016-04-27
Posts: 4

Re: PKGBUILD Review Request: Legofy 1.0.0

@Scimmia Read through the wiki page, and was comparing it to another git pkgbuild. Tested it and it successfully installed the package to my system.

How does this look?

# Maintainer: Donnie Bishop <donnie.a.bishop@gmail.com>

pkgname=legofy-git
pkgver=r184.0154ef5
pkgrel=1
pkgdesc="Make images look as if they are made out of 1x1 LEGO blocks"
arch=('any')
url="https://github.com/JuanPotato/Legofy"
license=('MIT')
depends=('python' 'python-pillow' 'python-click')
makedepends=('git' 'python') 
provides=("legofy")
conflicts=("legofy")
options=(!emptydirs)
source=("git://github.com/JuanPotato/Legofy")
md5sums=('SKIP')

_gitname='Legofy'

pkgver() {
	cd "$srcdir/$_gitname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd "$srcdir/$_gitname"
    python setup.py install --root="$pkgdir/" --optimize=1
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Offline

#4 2016-09-19 14:10:00

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: PKGBUILD Review Request: Legofy 1.0.0

Looks good - the prepare function is in the proper format, the correct install commands and paths are used, and any variables are quoted. The rest like using cd "$srcdir"/... instead of cd ./... is up to personal preference.

Last edited by Alad (2016-09-19 14:10:19)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2016-09-19 14:12:11

dbishop
Member
Registered: 2016-04-27
Posts: 4

Re: PKGBUILD Review Request: Legofy 1.0.0

Awesome! Thanks for the review! Excited to publish this to the AUR smile

Offline

#6 2016-09-20 02:58:12

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD Review Request: Legofy 1.0.0

Please use consistent indenting. smile

Why do you find it important to manually specify !emptydirs ?

There is no need to list python as a makedepends, given that it is already listed as a depends...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2016-10-05 19:40:39

AlexIL
Member
From: Israel
Registered: 2016-01-02
Posts: 45
Website

Re: PKGBUILD Review Request: Legofy 1.0.0

Consider using pkgver() function.
Also run namcap on the PKGBUILD and packaged tarball to check for possible errors or warnings.
Looking good by the way!

Offline

Board footer

Powered by FluxBB