You are not logged in.

#1 2017-03-12 23:04:33

dr34m
Member
Registered: 2016-07-28
Posts: 47

[SOLVED] PKGBUILD review request: keep

Hi guys,

this is my first pkg, please be nice smile

the software: https://github.com/OrkoHunter/keep

the code:

# Maintainer: dr34m/KarlFiabeschi

pkgname=keep
pkgver=2.1.3
pkgrel=1
pkgdesc="A Meta CLI toolkit : Personal shell command keeper"
arch=('any')
url="https://github.com/OrkoHunter/keep"
license=('MIT')
conflicts=('')
makedepends=('python-setuptools')
depends=('python-click' 'python-requests' 'python-tabulate' )
source=("https://pypi.python.org/packages/b7/bf/5577c770c631eee713da1e0764b29301ac3734253619866f42089d3f5808/keep-2.1.3.tar.gz")
md5sums=('9a452405588da649a17e539f4041e210')

package() {
   cd "$srcdir/$pkgname-$pkgver"
   python setup.py install --root="$pkgdir/" --optimize=1
}

what i miss?

ty

Last edited by dr34m (2017-03-16 08:05:16)

Offline

#2 2017-03-12 23:14:31

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

Re: [SOLVED] PKGBUILD review request: keep

dr34m wrote:

what i miss?

Very, very little. The only thing I see is the empty conflicts array.

There are a couple of things you could simplify to make things easier. Functions are guaranteed to start in $srcdir, so you don't need to include that in the cd command if you don't want to. You can also use pypi.io in the source so you don't have to change the URL all of the time, as well as reusing the $pkgver variable. https://pypi.io/packages/source/k/keep/ … ver.tar.gz

EDIT: Oh, found something else! The MIT license is special in that it's modified for each project it's attached to. You need to install this into the filesystem.

Last edited by Scimmia (2017-03-12 23:16:48)

Offline

#3 2017-03-13 01:21:38

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

Re: [SOLVED] PKGBUILD review request: keep

Looking at the setup.py for that python module, it uses console_scripts to generate a setuptools wrapper at /usr/bin/keep

This means that python-setuptools will be a runtime dependency as well. Fortunately, it is already a dependency of python-chardet which in turn is a dependency of python-requests.

So either remove it from the makedepends and depend on the implicit (recursive) dependency, or remove it from the makedepends and put it in depends.


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

Offline

#4 2017-03-13 09:32:18

dr34m
Member
Registered: 2016-07-28
Posts: 47

Re: [SOLVED] PKGBUILD review request: keep

Eschwartz wrote:

So either remove it from the makedepends and depend on the implicit (recursive) dependency, or remove it from the makedepends and put it in depends.

Thanks!

Scimmia wrote:

Very, very little.

Thansk u and thanks for the tips!

Scimmia wrote:

The only thing I see is the empty conflicts array.

Yep, but i don't know case of conflicts with this software.

Scimmia wrote:

There are a couple of things you could simplify to make things easier. Functions are guaranteed to start in $srcdir, so you don't need to include that in the cd command if you don't want to. You can also use pypi.io in the source so you don't have to change the URL all of the time, as well as reusing the $pkgver variable. https://pypi.io/packages/source/k/keep/ … ver.tar.gz

Oh wonderful tips

Scimmia wrote:

EDIT: Oh, found something else! The MIT license is special in that it's modified for each project it's attached to. You need to install this into the filesystem.

ok but no License in the package,tar,gz.. so i can do something like that?

wget https://raw.githubusercontent.com/OrkoHunter/keep/master/LICENSE.md
 mv LICENSE-md where??

so far:

# Maintainer: dr34m/KarlFiabeschi

pkgname=keep
pkgver=2.1.3
pkgrel=1.1
pkgdesc="A Meta CLI toolkit : Personal shell command keeper"
arch=('any')
url="https://github.com/OrkoHunter/keep"
license=('MIT')
conflicts=('')
makedepends=('')
depends=('python-setuptools' 'python-click' 'python-requests' 'python-tabulate' )
source=("https://pypi.io/packages/source/k/keep/keep-$pkgver.tar.gz")
md5sums=('9a452405588da649a17e539f4041e210')


package() {
   cd "$srcdir/$pkgname-$pkgver"
   python setup.py install --root="$pkgdir/" --optimize=1
}

Offline

#5 2017-03-13 11:46:15

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

Re: [SOLVED] PKGBUILD review request: keep

Scimmia's point about the empty conflicts array, is that an empty array should simply be deleted altogether.

As for the license, that is probably fine... personally, I would rather simply use the GitHub release archive (which does contain the license), but it seems upstream doesn't tag releases because PyPi...


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

Offline

#6 2017-03-13 14:39:05

dr34m
Member
Registered: 2016-07-28
Posts: 47

Re: [SOLVED] PKGBUILD review request: keep

Eschwartz wrote:

Scimmia's point about the empty conflicts array, is that an empty array should simply be deleted altogether.

ok, fine!

As for the license, that is probably fine... personally, I would rather simply use the GitHub release archive (which does contain the license), but it seems upstream doesn't tag releases because PyPi...

I'll check later on next release if pypi are update like the github


so in conclusion this should be fine:

# Maintainer: dr34m/KarlFiabeschi

pkgname=keep
pkgver=2.1.3
pkgrel=1.2
pkgdesc="A Meta CLI toolkit : Personal shell command keeper"
arch=('any')
url="https://github.com/OrkoHunter/keep"
license=('MIT')
makedepends=('')
depends=('python-setuptools' 'python-click' 'python-requests' 'python-tabulate' )
source=("https://pypi.io/packages/source/k/keep/keep-$pkgver.tar.gz"
        "https://raw.githubusercontent.com/OrkoHunter/keep/master/LICENSE.md")
md5sums=('9a452405588da649a17e539f4041e210' 
         'd88a347b3647d9938bdcdb68182c7315')

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

Offline

#7 2017-03-13 14:53:59

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [SOLVED] PKGBUILD review request: keep

Maybe you can use a commit to ID the specific one you need. Aurutils does this for example.

Also, don't forget to remove empty arrays tongue

Offline

#8 2017-03-16 08:03:52

dr34m
Member
Registered: 2016-07-28
Posts: 47

Re: [SOLVED] PKGBUILD review request: keep

runical wrote:

Maybe you can use a commit to ID the specific one you need. Aurutils does this for example.

Also, don't forget to remove empty arrays tongue

Done!

Ty guys

Offline

Board footer

Powered by FluxBB