You are not logged in.

#1 2010-04-18 13:54:35

undefined
Member
From: Pakistan
Registered: 2010-04-18
Posts: 14
Website

[solved]My first PKGBUILD - Expert view needed

Hello all,
I am working on a small system tray utility which shows network traffic flow. I want to include it in aur, but before submitting I wanted to know if it's ok. Since the source is on github.com I've used PKGBUILD-git.proto as a base. I'm copying the PKGBUILD here, please have a look at it and tell me if it is ok.

# Contributor: Ali Shuja Siddiqui <alishuja [at] gmail.com>
pkgname=networkled-git
pkgver=20100418
pkgrel=1
pkgdesc="Network interface traffic LEDs made with qt4"
arch=('i686')
url="http://github.com/alishuja/networkled"
license=('GPL3')
depends=('qt>=4')
makedepends=('git')

_gitroot="git://github.com/alishuja/networkled.git"
_gitname="networkled"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  #
  # BUILD HERE
  #

  qmake || return 1
  make || return 1
  make DESTDIR="$pkgdir/" INSTALL_ROOT="$pkgdir/usr" install || return 1
}

Thank you. smile

Last edited by undefined (2010-04-18 18:41:48)


Networkled: Github|AUR

Offline

#2 2010-04-18 14:35:52

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: [solved]My first PKGBUILD - Expert view needed

Just use cp for the build dir, no need to clone.

Make sure that setting INSTALL_ROOT doesn't set any paths in anything to include the pkgdir in the source

Offline

#3 2010-04-18 15:22:18

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,006
Website

Re: [solved]My first PKGBUILD - Expert view needed

why do you only want advice from experts?
i have intermediate pkgbuild skills and it saddens me to read you think my advice is not good enough.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#4 2010-04-18 16:47:01

undefined
Member
From: Pakistan
Registered: 2010-04-18
Posts: 14
Website

Re: [solved]My first PKGBUILD - Expert view needed

firstly thanks for the feedback, Dieter@be sorry, I didn't mean offend you or anyone else. By expert I meant anyone with the knowledge, If you know it, I consider you an expert. smile

With that settled, I've replaced git clone to cp -r,

Thank you, once again. I'll be submitting it to aur now.


Networkled: Github|AUR

Offline

#5 2010-04-18 16:57:40

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,006
Website

Re: [solved]My first PKGBUILD - Expert view needed

okay. good. btw i was not serious wink


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB