summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index d4614d1..ec1b798 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1596,13 +1596,31 @@ rootpkg() {
}
srcpkg() {
+ echo "Ensuring source is fetched"
+ fetch
getpkgver || return 1
local p="$pkgname-$pkgver-$pkgrel"
local prefix="${startdir##*/}"
local i files="$prefix/APKBUILD"
for i in $source; do
- files="$files $prefix/$(filename_from uri $i)"
+ echo "Packaging source file: $i"
+ if [ ! -e $(filename_from_uri $i) ]; then
+ cp $srcdir/$(filename_from_uri $i) $(filename_from_uri $i)
+ fi
+ files="$files $prefix/$(filename_from_uri $i)"
+ done
+
+ for i in $install; do
+ echo "Packaging install file: $i"
+ files="$files $prefix/$i"
done
+
+ for i in $triggers; do
+ local f=${i%=*}
+ echo "Packaging trigger file: $f"
+ files="$files $prefix/$f"
+ done
+
mkdir -p "$PKGDEST"
msg "Creating source package $p.src.tar.gz..."
(cd .. && tar -zcf "$PKGDEST/$p.src.tar.gz" $files)