blob: 95b8c0522dbff419f681336be4ac8e274c1cb5a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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" \
;
|