Simplify *-git packages using pacman 4.1 features for VCSes.

This commit is contained in:
Antoine Lubineau 2013-04-09 16:54:28 +02:00
parent 5797dd1c42
commit fdbbc6590d
2 changed files with 14 additions and 23 deletions

View file

@ -1,6 +1,6 @@
pkgbase = dbench-git pkgbase = dbench-git
pkgdesc = A filesystem benchmark based on load patterns pkgdesc = A filesystem benchmark based on load patterns
pkgver = 20110123 pkgver = 20130101
pkgrel = 1 pkgrel = 1
url = http://dbench.samba.org/ url = http://dbench.samba.org/
arch = i686 arch = i686
@ -8,6 +8,8 @@ pkgbase = dbench-git
license = GPL3 license = GPL3
makedepends = git makedepends = git
depends = smbclient depends = smbclient
source = git://git.samba.org/sahlberg/dbench.git
sha256sums = SKIP
pkgname = dbench-git pkgname = dbench-git

View file

@ -1,35 +1,24 @@
# Maintainer: Antoine Lubineau <antoine@lubignon.info> # Maintainer: Antoine Lubineau <antoine@lubignon.info>
pkgname=dbench-git pkgname=dbench-git
pkgver=20110123 pkgver=20130101
pkgrel=1 pkgrel=1
pkgdesc="A filesystem benchmark based on load patterns" pkgdesc='A filesystem benchmark based on load patterns'
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="http://dbench.samba.org/" url='http://dbench.samba.org/'
license=('GPL3') license=('GPL3')
depends=('smbclient') depends=('smbclient')
makedepends=('git') makedepends=('git')
source=('git://git.samba.org/sahlberg/dbench.git')
sha256sums=('SKIP')
_gitroot="git://git.samba.org/sahlberg/dbench.git" pkgver() {
_gitname="dbench" cd "$srcdir/${pkgname%-git}"
git log -1 --format='%cd' --date=short | sed 's|-||g'
}
build() { build() {
cd "$srcdir" cd "$srcdir/${pkgname%-git}"
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"
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
@ -37,6 +26,6 @@ build() {
} }
package() { package() {
cd "$srcdir/$_gitname-build" cd "$srcdir/${pkgname%-git}"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }