Packaging
建構 PKGBUILD
我正在建構我的第一個 PKGBUILD。
我要建構的包來自 git repo。我已經閱讀了 wiki 指南,但 CVS頁面不是很完整……當我 makepkg 時,procces 似乎是直的,但在某些時候,它會卡住。我不知道該怎麼做。
# Maintainer: Tomas Sironi <sironitomas at gmail dot com> pkgname=mutter-meego-git pkgver=20101015 pkgrel=1 pkgdesc="" arch=('i686' 'x86_64') url="http://http://git.gitorious.org/meego-netbook-ux/mutter-meego/" license=('GPL') groups=() depends=() makedepends=('git') optdepends=() provides=('mutter-meego') conflicts=('mutter-meego') _gitroot="git://gitorious.org/meego-netbook-ux/mutter-meego.git" _gitname="mutter-meego-git" replaces=() backup=() options=() install= #~ source=($pkgname-$pkgver.tar.gz) noextract=() md5sums=() #generate with 'makepkg -g' build() { export INCLUDE="/usr/include" msg "Connecting to the GIT server..." if [ -d ${_gitname}/.git ]; then cd ${_gitname} git pull else git clone ${_gitroot} ${_gitname} cd ${_gitname} fi ./configure.ac -prefix /usr \ -libdir /usr/lib make || return 1 make INSTALL_ROOT=$pkgdir install || return 1 } package() { cd $srcdir/$pkgname-$pkgver make DESTDIR=$pkgdir install }
首先應填寫包裝描述
pkgdesc
的縮寫。接下來,您不需要有空數組。pkgname=mutter-meego-git pkgver=20101015 pkgrel=1 pkgdesc="what mutter meego does" arch=('i686' 'x86_64') url="http://git.gitorious.org/meego-netbook-ux/mutter-meego/" # was not a correct uri license=('GPL') depends=() #seems to depend on some gnome stuff makedepends=('git') provides=('mutter-meego') conflicts=('mutter-meego') _gitroot="git://gitorious.org/meego-netbook-ux/mutter-meego.git" _gitname="mutter-meego-git" #~ source=($pkgname-$pkgver.tar.gz) md5sums=() #generate with 'makepkg -g' build() { export INCLUDE="/usr/include" msg "Connecting to the GIT server..." if [ -d ${_gitname}/.git ]; then cd ${_gitname} git pull else git clone ${_gitroot} ${_gitname} cd ${_gitname} fi ./configure.ac -prefix /usr \ -libdir /usr/lib make || return 1 make INSTALL_ROOT=$pkgdir install || return 1 } package() { cd $srcdir/$pkgname-$pkgver make DESTDIR=$pkgdir install }
請記住,其中的內容
build
與您為建構它而輸入的內容相同。你必須執行 autogen.sh ……由於缺少一些 gnome 依賴項(我執行 KDE),我無法這樣做。您還會注意到它./configure.ac
是不可執行的……那麼您將如何執行它呢?弄清楚如何手動建構它,然後將其放入 PKGBUILD 的建構部分。