You are not logged in.
Pages: 1
Hi,
I have tried to adapt PKGBUILD for orphaned app dosage (app to keep a local mirror of specific web comics) and I have made new working PKGBUILD with two errors when building:
==> WARNING: Using a PKGBUILD without a package() function is deprecated.
==> WARNING: Package contains reference to $pkgdir
so I need some basic help.
My PKGBUILD:
# Contributor: Zaplanincan <zaplanincan@gmail.com>
pkgname=dosage
arch=('i686' 'x86_64')
pkgver=2.5
pkgrel=1
pkgdesc="A Python application designed to keep a local mirror of specific web comics."
url="http://wummel.github.io/dosage/dist/$pkgname"
license="GPL"
depends=('python-requests')
source="http://wummel.github.io/dosage/dist/$pkgname-$pkgver.tar.gz"
md5sums=('daef0c292a2a4510ba1392ec3a2e9d37')
build() {
cd $srcdir/$pkgname-$pkgver
python setup.py install --prefix=$pkgdir/usr
}...and old PKGBUILD:
# Contributor: FJ <joostef@gmail.com>
pkgname=dosage
arch="i686 x86_64"
pkgver=1.6.0
pkgrel=1
pkgdesc="A Python application designed to keep a local mirror of specific web comics."
url="http://slipgate.za.net/$pkgname"
license="GPL"
depends=('python twisted zope-interface')
source="http://slipgate.za.net/dosage/downloads/$pkgname-$pkgver.tar.gz"
md5sums=('dd9550b08899d9f1904caf24888f5f38')
build() {
cd $startdir/src/$pkgname-$pkgver
python setup.py install --prefix=$startdir/pkg/usr
mv $startdir/pkg/usr/bin/mainline $startdir/pkg/usr/bin/dosage
}Am I missing something else?
Thanks for the help.
Offline
Is there any building that is actually done, or is it just installed? If it's just an install, rename the build() function to package(). If it does actually build, do "python setup.py build" in the build function, then install in the package function.
As a side note, please use quotes anytime you use $pkgdir or $srcdir, ie "cd $srcdir/$pkgname-$pkgver"
Offline
Thanks for quick replay,
I have changed from build() to package() because it is just install and it's OK now. What about second warning:
==> WARNING: Package contains reference to $pkgdir
how can I change that?
Offline
Don't use --prefix, but --root in your setup command:
package() {
cd $srcdir/$pkgname-$pkgver
python setup.py install --root="$pkgdir/" --optimize=1
}| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Thank you, have made sugested changes. The last version:
# Contributor: FJ <joostef@gmail.com>
# Maintainer: Zaplanincan <zaplanincan@gmail.com>
pkgname=dosage
arch=('i686' 'x86_64')
pkgver=2.5
pkgrel=1
pkgdesc="A Python application designed to keep a local mirror of specific web comics."
url="http://wummel.github.io/dosage/dist/$pkgname"
license="GPL"
depends=('python-requests')
source="http://wummel.github.io/dosage/dist/$pkgname-$pkgver.tar.gz"
md5sums=('daef0c292a2a4510ba1392ec3a2e9d37')
package() {
cd "$srcdir/$pkgname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
}Offline
License and source must be arrays so put them in parenthesis:
license=("GPL")
source=("http://wummel.github.io/dosage/dist/$pkgname-$pkgver.tar.gz")
Also, usually the arch field goes after the pkgdesc.
Offline
Ok, will change that. Thanks.
Offline
Pages: 1