APKBUILD examples:Git checkout: Difference between revisions

From Alpine Linux
(Update example)
(use cat template)
 
Line 1: Line 1:


<pre>
{{cat|APKBUILD|<nowiki>...
source="http://dev.alpinelinux.org/archive/configshell/$_pkgname-$_pkgver.tar.gz"
source="http://dev.alpinelinux.org/archive/configshell/$_pkgname-$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-fb-v$_pkgver"
builddir="$srcdir/$_pkgname-fb-v$_pkgver"
Line 22: Line 22:
scp "$SRCDEST"/$_pkgname-$_pkgver.tar.gz dev.alpinelinux.org:/archive/$_pkgname/
scp "$SRCDEST"/$_pkgname-$_pkgver.tar.gz dev.alpinelinux.org:/archive/$_pkgname/
}
}
</pre>
...</nowiki>}}


[[Category:Development]]
[[Category:Development]]

Latest revision as of 22:26, 16 September 2023

Contents of APKBUILD

... 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/ } ...