summaryrefslogtreecommitdiff
path: root/pkgtools/url2pkg
diff options
context:
space:
mode:
authorrh <rh>2003-04-22 00:35:08 +0000
committerrh <rh>2003-04-22 00:35:08 +0000
commita145e4246008ce9270280b09a9dd026b4d2119b2 (patch)
tree1434059f6eca4f13c4272c63678d6af708f5de6d /pkgtools/url2pkg
parent11b47983238a3e883066c0b66a55bf8b3da07b50 (diff)
downloadpkgsrc-a145e4246008ce9270280b09a9dd026b4d2119b2.tar.gz
Update url2pkg to 1.22. Notable changes include:
- conversion of prdownloads.sourceforge.net URLs to MASTER_SITE_SOURCEFORGE - pre-fill CATEGORIES from the directory name - educated guess about the HOMEPAGE
Diffstat (limited to 'pkgtools/url2pkg')
-rw-r--r--pkgtools/url2pkg/Makefile4
-rwxr-xr-xpkgtools/url2pkg/files/url2pkg28
2 files changed, 21 insertions, 11 deletions
diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile
index fca281c5cad..4c6501adc9d 100644
--- a/pkgtools/url2pkg/Makefile
+++ b/pkgtools/url2pkg/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.24 2003/04/21 23:31:14 rh Exp $
+# $NetBSD: Makefile,v 1.25 2003/04/22 00:35:08 rh Exp $
#
-DISTNAME= url2pkg-1.21
+DISTNAME= url2pkg-1.22
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools sysutils
MASTER_SITES= # Nothing
diff --git a/pkgtools/url2pkg/files/url2pkg b/pkgtools/url2pkg/files/url2pkg
index 288a11e4415..34736d20cc5 100755
--- a/pkgtools/url2pkg/files/url2pkg
+++ b/pkgtools/url2pkg/files/url2pkg
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: url2pkg,v 1.22 2003/04/21 23:31:15 rh Exp $
+# $NetBSD: url2pkg,v 1.23 2003/04/22 00:35:09 rh Exp $
#
# url2pkg
# (c) 1999-2002 Hubert Feyrer <hubert@feyrer.de>
@@ -38,9 +38,18 @@ if [ ! -f w*/.extract_done ]; then
else
url="$1"
fi
-
- DISTNAME=`expr "$url" : '.*/\([^/]*\)\$''`
- MASTER_SITES=`expr "$url" : '\(.*\)/[^/]*\$'`
+
+ sourceforge="http://prdownloads.sourceforge.net/"
+ if [ `expr "$url" : "$sourceforge"` -gt 0 ]; then
+ DISTNAME=`expr "$url" : '.*/\([^/]*\)?'`
+ sfname=`expr "$url" : "${sourceforge}\(.*\)/[^/]*\$"`
+ MASTER_SITES='${MASTER_SITE_SOURCEFORGE:='"$sfname"'/}'
+ HOMEPAGE="http://$sfname.sourceforge.net/"
+ else
+ DISTNAME=`expr "$url" : '.*/\([^/]*\)$'`
+ MASTER_SITES=`expr "$url" : '\(.*/\)[^/]*$'`
+ HOMEPAGE=$MASTER_SITES
+ fi
case "$DISTNAME" in
*.tgz) EXTRACT_SUFX=".tgz"
@@ -63,20 +72,21 @@ if [ ! -f w*/.extract_done ]; then
if [ -f Makefile ]; then
mv Makefile Makefile.BAK
fi
-
+
+ category=`pwd | sed 's|^.*/\([^/]*\)/[^/]*$|\1|'`
(
echo '# $'NetBSD'$'
echo '#'
echo ""
echo "DISTNAME= $DISTNAME"
- echo "CATEGORIES= FILLTHISINPLEASE"
- echo "MASTER_SITES= $MASTER_SITES/"
+ echo "CATEGORIES= $category"
+ echo "MASTER_SITES= $MASTER_SITES"
if [ "$EXTRACT_SUFX" != ".tar.gz" ]; then
echo "EXTRACT_SUFX= ${EXTRACT_SUFX}"
fi
echo ""
echo "MAINTAINER= $email_maintainer"
- echo "HOMEPAGE= "
+ echo "HOMEPAGE= $HOMEPAGE"
echo "COMMENT= SHORT_DESCRIPTION_OF_THE_PACKAGE"
echo ""
echo '.include "../../mk/bsd.pkg.mk"'
@@ -193,6 +203,6 @@ if [ ! -f DESCR ]; then
touch DESCR
fi
echo ""
-echo "Remember to fill in CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!"
+echo "Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!"
echo ""
echo "Good luck! (See pkgsrc/Packages.txt for some more help :-)"