summaryrefslogtreecommitdiffstats
path: root/newapkbuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-17 10:20:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-17 10:20:57 +0000
commitf20d7983ae120359a3fc459c74fc2b513380b504 (patch)
treec41f148a995b653f3d0b6125471c84de93ebffc1 /newapkbuild.in
parent149521f2dc8d9ca71d37fe287a7cc95c01f4cfd7 (diff)
downloadabuild-f20d7983ae120359a3fc459c74fc2b513380b504.tar.bz2
abuild-f20d7983ae120359a3fc459c74fc2b513380b504.tar.xz
newapkbuild: support for creating sourceforge source urls
Diffstat (limited to 'newapkbuild.in')
-rwxr-xr-xnewapkbuild.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/newapkbuild.in b/newapkbuild.in
index 474d5bb..e8b7ea5 100755
--- a/newapkbuild.in
+++ b/newapkbuild.in
@@ -52,6 +52,10 @@ newaport() {
mkdir -p "$pn"
cd "$pn"
+ if [ -z "$source" ] && [ -n "$sourceforge" ]; then
+ source="http://downloads.sourceforge.net/$pn/$pn-$pv.tar.gz"
+ fi
+
# replace pkgver in $source
if [ -n "$source" ]; then
source=$(echo "$source" | sed "s/$pv/\$pkgver/g")
@@ -167,11 +171,12 @@ usage() {
echo " -h Show this help"
echo " -l Set package license to LICENSE"
echo " -u Set package URL"
+ echo " -s Use sourceforge source url"
echo ""
exit 0
}
-while getopts "cd:fhl:u:" opt; do
+while getopts "cd:fhl:u:s" opt; do
case $opt in
'c') cpinitd=1;;
'd') pkgdesc="$OPTARG";;
@@ -179,6 +184,7 @@ while getopts "cd:fhl:u:" opt; do
'h') usage;;
'l') license="$OPTARG";;
'u') url="$OPTARG";;
+ 's') sourceforge=1;;
esac
done
shift $(( $OPTIND - 1 ))