Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/mksrcinfo
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mksrcinfo')
-rwxr-xr-xbin/mksrcinfo22
1 files changed, 14 insertions, 8 deletions
diff --git a/bin/mksrcinfo b/bin/mksrcinfo
index 7dc62e1..e412178 100755
--- a/bin/mksrcinfo
+++ b/bin/mksrcinfo
@@ -3,12 +3,18 @@
# generate .SRCINFO from PKGBUILD
# bleh - this should really be handled by makepkg!
-# TODO:
+(
+ . ./PKGBUILD
-# maybe source PKGBUILD instead of 'makepkg --printsrcinfo' and
-# 'mksrcinfo'?
-
-grep -q '\$CARCH' 'PKGBUILD' && \
- CARCH=i686 makepkg --printsrcinfo > \
- '.SRCINFO' || \
- mksrcinfo -o .SRCINFO
+ if [ -z "${pkgbase}" ]; then
+ printf 'pkgbase = %s\n' "${pkgname}"
+ else
+ printf 'pkgbase = %s\n' "${pkgbase}"
+ fi
+ printf '\tarch = %s\n' "${arch[@]}"
+ printf '\tmakedepends = %s\n' "${makedepends[@]}"
+ printf '\tcheckdepends = %s\n' "${checkdepends[@]}"
+ printf '\tdepends = %s\n' "${depends[@]}"
+ printf '\tprovides = %s\n' "${provides[@]}"
+ printf 'pkgname = %s\n' "${pkgname[@]}"
+) > .SRCINFO