我正在构建我的第一个 PKGBUILD。
我想要构建的包来自 git 存储库。我已阅读 wiki 指南,但 CVS页不是很完整...当我 makepkg 时,过程似乎很顺利,但在某些时候,它会卡住。我不知道如何继续。
# 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
}
答案1
首先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 的构建部分。