aports/testing/csync2/APKBUILD
Natanael Copa 69e2ae9110 testing/csync2: refactor the git release
- instead of basing the version on a non released 2.0_rc1, based it
  on latest release, 1.34
- use date of latest git commit instead of the date it was generated
- instead of making a git snapshot, make a patch. This way we don't
  need upload the source archive any place.
2012-12-18 12:03:20 +00:00

71 lines
2.2 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=csync2
pkgver=1.34_git20111201
_ver=${pkgver%_git*}
pkgrel=0
pkgdesc="Cluster synchronization tool"
url="http://oss.linbit.com/csync2/"
arch="all"
license="GPL-2+"
depends=
makedepends="librsync-dev gnutls-dev sqlite-dev autoconf automake bison flex"
install=
subpackages="$pkgname-doc"
source="http://oss.linbit.com/csync2/csync2-${_ver}.tar.gz
git.patch
03-strlcpy_disable.patch"
# 01-csync2-sqlite3.patch
# 02-csync2-1.34-gnutls_pkgconfig.patch
_builddir="$srcdir"/$pkgname-$_ver
_giturl="http://git.linbit.com/csync2.git"
snapshot() {
local _pkg=$pkgname-$pkgver.tar.gz
mkdir -p "$srcdir"
cd "$srcdir"
msg "Creating snapshot: $_pkg"
rm -rf ${_giturl##*/}
git clone --bare $_giturl || return 1
git --git-dir ${_giturl##*/} archive -o $_pkg \
--prefix=$pkgname-$pkgver/ HEAD \
|| return 1
msg "New snapshot: $_pkg"
if [ -n "$_upload" ]; then
msg "Uploading to $_upload"
scp $_pkg $_upload || return 1
abump $pkgname-$_tag
fi
#abuild checksum
}
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
autoreconf --install --force
}
build() {
cd "$_builddir"
./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install
}
md5sums="efc8a3548996b79cef2ad76af5e93cd8 csync2-1.34.tar.gz
bd4957d25e984518d929ae4036bf0ae9 git.patch
e6d8aaff70cf847b11873cd1cfaaa8f6 03-strlcpy_disable.patch"