opkg-utils的PKGBUILD文件,参考自OE的opkg-utils_git.bb

主要用于将生成的ipk包构建成ipk仓库,生成索引文件等功能

比如拿以下命令进行生成Packages文件

#flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"


==========================================



# Contributor: GunsNRose <zlbgps AT gmail.com>>
_gitname=opkg-utils
_gitroot='git://git.yoctoproject.org/opkg-utils'
pkgname=opkg-utils-git
pkgver=20130801
pkgrel=1
pkgdesc="OPKG Package Manager Utilities"
arch=('i686' 'x86_64')
url="http://wiki.openmoko.org/wiki/Opkg"
license=('GPL')
depends=('python')
makedepends=('git')
provides=('opkg-utils')
build() {
  cd "$srcdir"
  if [ ! -d "$srcdir/${_gitname}" ] ; then
      git clone --depth=1 ${_gitroot}
  else
      cd "$srcdir/${_gitname}" || return 1
      git pull
  fi
  if [  -d "$srcdir/${_gitname}-build" ] ; then
      rm -rf "$srcdir/${_gitname}-build"
  fi
  if [ ! -d "$srcdir/${_gitname}-build" ] ; then
      cp -a "$srcdir/${_gitname}" "$srcdir"/${_gitname}-build || return 1
  fi
  cd "$srcdir"/${_gitname}-build
  make PREFIX=/usr
}
package() {
  cd "$srcdir"/${_gitname}-build
  make PREFIX=/usr DESTDIR=${pkgdir} install
}


你可能感兴趣的:(#archlinux,#oe)