jvb wrote:
> This is my first attempt at using a PKGBUILD file. What I'm attempting
> to do is update urlview to version 16. I downloaded the original file:
> "urlview_0.9.orig.tar.gz", and the diff file: "urlview_0.9-16.diff". I
> have these in a separate dir I created: ~/abs/urlview". Then I copied
> over the PKGBUILD script from "/var/abs/extra/network/urlview". Then I
> edited the PKGBUILD file. I *think* I have it correct, but one thing
> bothers me. In the first line of the "build()" function there is the
> "$startdir" variable. My question is, where does build get "$startdir"?
> In other words, what is the "$startdir"?
>
> Here's the PKGBUILD file so far:
>
> --------------------------------------------------------------
> pkgname=urlview
> pkgver=0.9
> pkgrel=16
> depends=('bash')
> pkgdesc="A curses URL parser for text files"
> source=(http://ftp.linux.pt/pub/mirrors/debian/pool/main/u/urlview/$pkgname\_$pkgver.orig.tar.gz\
> $pkgname\_$pkgrel\-$pkgrel.diff.gz)
> url="http://ftp.linux.pt/pub/mirrors/debian/pool/main/u/urlview/"
>
> build() {
> cd $startdir/$pkgname-$pkgver.orig
> patch -Np1 -i ../urlview\_$pkgver\-$pkgrel.diff
> ./configure --prefix=/usr
> mkdir -p $startdir/pkg/etc/urlview $startdir/pkg/usr/man/man1
> make || return 1
> make prefix=$startdir/pkg/usr install
> install -D -m755 url_handler.sh\
> $startdir/pkg/etc/urlview/url_handler.sh
> install -D -m644 sample.urlview\
> $startdir/pkg/etc/urlview/system.urlview
> ln -fs /etc/urlview/url_handler.sh\
> $startdir/pkg/usr/bin/url_handler.sh
> }
> -----------------------------------------------------------------
>
>
> All wet noodle lashes are welcome. :-)
>
> Jerry,
> A.K.A. - Arch noob
>
>
> _______________________________________________
> arch mailing list
> [email protected]
> http://www.archlinux.org/mailman/listinfo/arch
>
>
>
$startdir is a variable set by makepkg automatically - this points to
the directory where you run makepkg. In your example, $startdir will be
~/abs/urlview - all sources are automatically copied by makepkg to
$startdir/src (and recognized archives are automatically unpacked as
well) - and the package is created from all files in $startdir/pkg (ie.
files in $startdir/pkg/usr will be installed to /usr when you install
the package).
Hope that helps,
-- Cerebral
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch