canfestival的PKGBUILD

# Maintainer: axlrose<zlbgps AT gmail.com>>
_pkgname=canfestival
pkgname=${_pkgname}-hg
pkgver=20131013
pkgrel=1
pkgdesc="ANSI-C platform independent CANOpen stack"
arch=('i686' 'x86_64')
url="http://www.canfestival.org"
license=('GPL')
groups=('devel')
depends=('wxpython')
#'socketcand-git'
makedepends=('mercurial')
provides=(${_pkgname})
conflicts=()
replaces=()
#backup=()
options=()
install=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'
EHG_REPO_URI_BASE="http://dev.automforge.net/CanFestival-3"
_hgroot=${EHG_REPO_URI_BASE}
_hgrepo=CanFestival-3
build() {
  cd "$srcdir"
  msg "Connecting to Mercurial server...."
  if [[ -d "$_hgrepo" ]]; then
    cd "$_hgrepo"
    hg pull -u
    msg "The local files are updated."
  else
    hg clone "$_hgroot" "$_hgrepo"
  fi
  msg "Mercurial checkout done or server timeout"
  msg "Starting build..."
  rm -rf "$srcdir/$_hgrepo-build"
  cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
  cd "$srcdir/$_hgrepo-build"
    sed -i '/ldconfig/d' Makefile.in
  #
  # BUILD HERE
  #
  #./autogen.sh
  #./configure --prefix=/usr
    local confcmd="./configure
        --cc=gcc
        --cxx=g++
        --prefix='${pkgdir}/usr/'
    --can=socket --wx=1 --can=socket"
    #IUSE="+socket +wxwidgets +examples"
    #DEPEND="wxwidgets? ( dev-python/wxpython )"
        #$(use socket && echo '--can=socket') $(use examples && echo '--can=socket') $(use socket || echo '--can=virtual_kernel') $(use wxwidgets && echo '--wx=1') $(use wxwidgets || echo '--wx=0')"
    echo ${confcmd}
    ${confcmd} || return 1
  make
}
package() {
  cd "$srcdir/$_hgrepo-build"
  make DESTDIR="$pkgdir/" install
  mkdir -pv ${pkgdir}/usr/share/applications
  mkdir -pv ${pkgdir}/usr/share/${_hgrepo}/objdictgen
  cp objdictgen/networkedit.ico ${pkgdir}/usr/share/${_hgrepo}/objdictgen/
  cp objdictgen/networkedit.png ${pkgdir}/usr/share/${_hgrepo}/objdictgen/
  cp debian/objdictedit.desktop ${pkgdir}/usr/share/applications/
  cd ${pkgdir}/usr/bin
  ln -sf ../objdictgen/objdictedit.py  objdictedit
  ln -sf ../objdictgen/objdictgen.py   objdictgen
}
# vim:set ts=4 sw=4 et:






https://github.com/bignaux/lorelei-overlay/blob/master/sys-apps/canfestival/canfestival-9999.ebuild 参考ebuild文件

你可能感兴趣的:(can)