[aur-general] Use of sudo in pkgbuild

Laurie Clark-Michalek bluepeppers at archlinux.us
Tue Apr 7 16:06:14 EDT 2009


The pkg will not build if I don't have sudo enabled. It's because
gtk-update-icon-cache is used during the make install, regardless of
directory. See the error message below.

gtk-update-icon-cache: Failed to open file
/usr/share/icons/hicolor/.icon-theme.cache : Permission denied
make: *** [install] Error 1
==> ERROR: Build Failed.


2009/4/8 Dan Vratil <progdan at progdansoft.com>

> 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
>


More information about the aur-general mailing list