You are not logged in.

#1 2013-10-18 11:01:56

scoscosco
Member
Registered: 2013-10-18
Posts: 2

first PKGBUILD please review

Hello,

I am creating this because a non technical friend has moved away from .deb's but lacks the knowledge to install from source. Either way the source install is very messy. Creating lots of unowned files all over the system.

A few questions...

1. I was unable to get $pkgname and $pkgver into the source line. Is this ok ?
2. I have taken the deps from http://torrent-search.sourceforge.net/d … stallation   

however not 100% they correspond to Archlinux's packages. Is there a better way of knowing dep names over the linux flavors ?

3. I have run namcap, it is not spewing anything bad. Any other checks?
4. I am not the maintainer ? I'v just created this PKGBUILD, so I am the contributor?

Any help here appreciated

------------------

# Maintainer: <gwendal.lebihan.dev [at] gmail (dot) com>
# Contributer: sco`  <rossybradley [at] gmail (dot) com>

pkgname=torrent-search
pkgver=0.11.2
pkgrel=1
pkgdesc="Torrent search engine developed in Python, using GTK+"
arch=('any')
url="http://torrent-search.sourceforge.net"
license=("GPLv3")
makedepends=('python2')
depends=('python2' 'pygtk' 'python2-lxml' 'python2-httplib2' 'python2-dbus')
source=(http://sourceforge.net/projects/torrent-search/files/torrent-search/0.11.2/torrent-search_0.11.2.tar.gz)
md5sums=('7753393e3fc957def24b52d2b0e22d80')

build() {
true
}

package() {
cd "$srcdir/$pkgname"
python2 setup.py install --root=$pkgdir
}

Offline

#2 2013-10-18 11:10:52

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,614
Website

Re: first PKGBUILD please review


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2013-10-18 11:15:37

scoscosco
Member
Registered: 2013-10-18
Posts: 2

Re: first PKGBUILD please review

Ahh at least I get to see how its done properly!

Thanks graysky

Offline

#4 2013-10-18 11:17:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

Re: first PKGBUILD please review

Read https://wiki.archlinux.org/index.php/Py … Guidelines
It suggests

package() {
  cd "$srcdir/$pkgname-$pkgver"

instead of

package() {
  cd "$srcdir/$pkgname"

If you don't build it, makedepends don't make sense.

You don't have to use $pkgname and $pkgver in the source line. Use variables where it makes sense and isn't cumbersome.

If you're going to upload it to the AUR and maintain it there, you're the maintainer. Otherwise, it doesn't really matter whether you're the maintainer or contributor.



When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Last edited by karol (2013-10-18 11:19:31)

Offline

#5 2013-10-18 11:28:56

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,614
Website

Re: first PKGBUILD please review

karol wrote:

Read https://wiki.archlinux.org/index.php/Py … Guidelines
It suggests

package() {
  cd "$srcdir/$pkgname-$pkgver"

instead of

package() {
  cd "$srcdir/$pkgname"

Just use:

cd "$pkgname-$pkgver"

See: https://bugs.archlinux.org/task/34314

Last edited by graysky (2013-10-18 11:29:26)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2013-10-18 16:59:40

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,089

Re: first PKGBUILD please review

karol wrote:

Read https://wiki.archlinux.org/index.php/Py … Guidelines
It suggests

package() {
  cd "$srcdir/$pkgname-$pkgver"

instead of

package() {
  cd "$srcdir/$pkgname"

That depends completely on the tarball being used. If it extracts to $pkgname instead of $pkgname-$pkgver, that's what you use.

graysky wrote:

Just use:

cd "$pkgname-$pkgver"

See: https://bugs.archlinux.org/task/34314

There's nothing wrong with cd'ing to an absolute path instead of a relative path. Some of us like to know where we are, not rely on the calling program to put is in the right place.

Offline

Board footer

Powered by FluxBB