Add support for specifying MAXINST in the pkgdef file. Defaults to 1.

This commit is contained in:
Tom G. Christensen 2008-03-09 10:31:58 +00:00
parent c1242c5ed7
commit 0f8e3a0c89
2 changed files with 7 additions and 0 deletions

View File

@ -117,6 +117,7 @@ pack_info()
-e "s#%%pkgdesc%%#$pkgdesc#g" \ -e "s#%%pkgdesc%%#$pkgdesc#g" \
-e "s#%%pstamp%%#$pstamp#g" \ -e "s#%%pstamp%%#$pstamp#g" \
-e "s#%%email%%#$email#g" \ -e "s#%%email%%#$email#g" \
-e "s#%%maxinst%%#$maxinst#g" \
$pkginfo > $metadir/pkginfo.$secname $pkginfo > $metadir/pkginfo.$secname
} }
@ -317,6 +318,8 @@ parse_def()
section=1 section=1
secname="${line:1:((${#line}-2))}" secname="${line:1:((${#line}-2))}"
legalend=0 legalend=0
# Set default value for maxinst for the new section
maxinst=1
fi fi
;; ;;
'') '')
@ -353,6 +356,9 @@ parse_def()
'pkgver') 'pkgver')
pkgver="$(_upls ${line:$equalindex:${#line}})" pkgver="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'maxinst')
maxinst="$(_upls ${line:$equalindex:${#line}})"
;;
esac esac
else # Perhaps we hit 'files'? else # Perhaps we hit 'files'?
if [ "${line:0:5}" == "files" ]; then if [ "${line:0:5}" == "files" ]; then

View File

@ -9,3 +9,4 @@ PSTAMP="%%pstamp%%"
BASEDIR="%%topinstalldir%%" BASEDIR="%%topinstalldir%%"
CLASSES="none" CLASSES="none"
DESC="%%pkgdesc%%" DESC="%%pkgdesc%%"
MAXINST="%%maxinst%%"