APKBUILD examples:Git checkout: Difference between revisions
m (Reverted edits by RuthHughes (talk) to last revision by Fab) |
(Update example) |
||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
source="http://dev.alpinelinux.org/archive/configshell/$ | source="http://dev.alpinelinux.org/archive/configshell/$_pkgname-$_pkgver.tar.gz" | ||
builddir="$srcdir/$_pkgname-fb-v$_pkgver" | |||
_giturl="https://github.com/agrover/configshell-fb" | _giturl="https://github.com/agrover/configshell-fb" | ||
_gittag=v$ | _gittag="v$_pkgver" | ||
snapshot() { | snapshot() { | ||
mkdir -p "$srcdir" | mkdir -p "$srcdir" | ||
cd "${SRCDEST:-$srcdir}" | cd "${SRCDEST:-$srcdir}" | ||
if ! [ -d $ | if ! [ -d $_pkgname-fb.git ]; then | ||
git clone --bare $_giturl || return 1 | git clone --bare $_giturl || return 1 | ||
cd $ | cd $_pkgname-fb.git | ||
else | else | ||
cd $ | cd $_pkgname-fb.git | ||
git fetch || return 1 | git fetch || return 1 | ||
fi | fi | ||
git archive --prefix=$ | git archive --prefix=$_pkgname/ -o "$SRCDEST"/$_pkgname-$_pkgver.tar.gz $_gittag | ||
scp "$SRCDEST"/$ | scp "$SRCDEST"/$_pkgname-$_pkgver.tar.gz dev.alpinelinux.org:/archive/$_pkgname/ | ||
} | } | ||
</pre> | </pre> | ||
[[Category:Development]] | [[Category:Development]] |
Revision as of 18:18, 31 August 2016
source="http://dev.alpinelinux.org/archive/configshell/$_pkgname-$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-fb-v$_pkgver" _giturl="https://github.com/agrover/configshell-fb" _gittag="v$_pkgver" snapshot() { mkdir -p "$srcdir" cd "${SRCDEST:-$srcdir}" if ! [ -d $_pkgname-fb.git ]; then git clone --bare $_giturl || return 1 cd $_pkgname-fb.git else cd $_pkgname-fb.git git fetch || return 1 fi git archive --prefix=$_pkgname/ -o "$SRCDEST"/$_pkgname-$_pkgver.tar.gz $_gittag scp "$SRCDEST"/$_pkgname-$_pkgver.tar.gz dev.alpinelinux.org:/archive/$_pkgname/ }