[aur-general] Use of sudo in pkgbuild

Dan Vratil progdan at progdansoft.com
Wed Apr 8 16:00:29 EDT 2009


You don't need to use SUDO for `make install` as you have write privileges 
into $pkgdir folder.

On Tuesday 07 April 2009 21:55:38 Laurie Clark-Michalek wrote:
> Hi,
>
> I've been working on the splashy-creator package (updating it to 2.2), and
> had got it working, when I realised I had a potential problem. I needed to
> use sudo in the pkgbuild, and so far, I have never seen it used in a
> package. Is this OK, and/or is there away to avoid it? Here is my package
> build for inspection:
>
> # Contributor: Laurie Clark-Michalek <BluePeppers (at) archlinux (dot) us>
>
> pkgname=splashy-creator
> pkgver=2.2
> pkgrel=1
> pkgdesc="A tool for creating Splashy themes."
> arch=('i686' 'x86_64')
> url="http://www.nanolx.org/index.php?option=com_content&task=view&id=34"
> license=('GPL3')
> depends=('sed' 'pygtk>=2.4' 'python>=2.4' 'splashy')
> makedepends=('sudo' 'patch')
> source=(http://nanolx.org/free/$pkgname-$pkgver.tar.bz2 $pkgname.patch)
> md5sums=('615033a2cabab0b132ecc9aff2c07a7b'
> 'b8095120f36b5f2cc3b1704a7b2e32a6')
>
> build() {
>   cd $srcdir/$pkgname
>   ./configure
>   patch ./Makefile $srcdir/splashy-creator.patch
>   sudo make DESTDIR=$pkgdir install || return 1
> }
>
>
> The patch is just a small one:
>
> 23c23
> <       @mkdir -p $(DESTDIR)/usr/usr/bin/
> ---
>
> >       @mkdir -p $(DESTDIR)/usr/bin/
>
> Thanks,
>
> Laurie
>
> P.S. This is the first time I've used patch, so is the .patch file alright?

-- 
---------------------------------
Dan Vrátil
progdan at progdansoft.com
ICQ 249163429
Jabber progdan at jabber.cz
Tel. +420 732 326 870
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://www.archlinux.org/pipermail/aur-general/attachments/20090408/35de9a1e/attachment.pgp>


More information about the aur-general mailing list