diff options
Diffstat (limited to 'user/kbuild/maintain')
-rwxr-xr-x | user/kbuild/maintain | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/user/kbuild/maintain b/user/kbuild/maintain new file mode 100755 index 000000000..95b8c0522 --- /dev/null +++ b/user/kbuild/maintain @@ -0,0 +1,72 @@ +#!/bin/sh -e + +## +# README +# ------ +# +# This script produces a tarball containing +# the kbuild source, including vendored deps, +# but without binaries that upstream provides. +# +# The result is a small tarball suitable for +# distribution. Note that line endings may be +# different between tarball and SVN checkout! +# +# (1) Edit APKBUILD to have the SVN revision +# that you want to target; +# +# (2) Run this script; +# +# (3) Upload the resulting tarball to a mirror +# suitable for your distribution; +# +# (4) Proceed as normal for package maintenance. +# + +HERE="$(dirname $(readlink -f ${0}))"; + +## +# Sanity checks. +# +command -v svn 2>&1 >/dev/null || (printf "E: 'svn' not found!\n" && exit 1); + + +## +# Pull version from APKBUILD, which +# must be updated first. +# +. "${HERE}"/APKBUILD; +REVISION=${pkgver##*.}; + + +## +# SVN branch to get. +# +CHECKOUT=trunk; + + +## +# Customize this at your own risk. +# +tmp=$(mktemp -d); +( +cd "${t}"; +svn co -r ${REVISION} http://svn.netlabs.org/repos/kbuild/${CHECKOUT}; +mv ${CHECKOUT} $pkgname-$pkgver; + +for k in .svn kBuild/bin; do + rm -fr $pkgname-$pkgver/${k}; +done + +tar -pczf "${HERE}"/$pkgname-$pkgver.tar.gz $pkgname-$pkgver; +) +rm -fr "${tmp}"; + + +## +# Done. +# +printf "Please upload '%s' to distfiles/source/%s/.\n" \ + "$pkgname-$pkgver.tar.gz" \ + "$pkgname" \ + ; |