Move package revision into the version field using the standard ,REV=
notation. Seperate formatting of manpages and compression of manpages.
This commit is contained in:
parent
47cf7996bd
commit
d4accdc00b
@ -115,6 +115,7 @@ pkgdirdesig=${topinstalldir##/*/} # topinstalldir suffix
|
|||||||
|
|
||||||
# Functionality controls
|
# Functionality controls
|
||||||
catman=0 # Don't fix manpages pr. default
|
catman=0 # Don't fix manpages pr. default
|
||||||
|
gzman=0 # Don't compress man pages pr. default
|
||||||
dostrip=1
|
dostrip=1
|
||||||
dostrip_elf=1 # default to stripping binaries during the install stage
|
dostrip_elf=1 # default to stripping binaries during the install stage
|
||||||
dostrip_shared=1 # default to stripping shared objects during the install stage
|
dostrip_shared=1 # default to stripping shared objects during the install stage
|
||||||
@ -369,12 +370,11 @@ fix_man()
|
|||||||
do
|
do
|
||||||
if [ -L "$manpage" ]; then
|
if [ -L "$manpage" ]; then
|
||||||
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
||||||
$LN -sf "$TARGET".gz "$manpage".gz
|
$LN -sf "$TARGET" "$manpage"
|
||||||
$MV "$manpage".gz "../$catdir"
|
$MV "$manpage" "../$catdir"
|
||||||
$RM -f "$manpage"
|
$RM -f "$manpage"
|
||||||
else
|
else
|
||||||
$NEQN $NEQNOPTS "$manpage" | $TBL | $NROFF $NROFFOPTS > "../$catdir/$manpage"
|
$NEQN $NEQNOPTS "$manpage" | $TBL | $NROFF $NROFFOPTS > "../$catdir/$manpage"
|
||||||
$GZIP "../$catdir/$manpage"
|
|
||||||
$RM -f $manpage
|
$RM -f $manpage
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -384,6 +384,34 @@ fix_man()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# compress_man(): Compress raw manpages
|
||||||
|
# params: none
|
||||||
|
# Run from 'cwd' where 'cwd' contains manX subdirs
|
||||||
|
compress_man()
|
||||||
|
{
|
||||||
|
echo "Compressing manpages"
|
||||||
|
for i in [cm]a[nt]?
|
||||||
|
do
|
||||||
|
if [ -d $i ]; then
|
||||||
|
cd $i
|
||||||
|
for manpage in *
|
||||||
|
do
|
||||||
|
suffix="${manpage##*.}"
|
||||||
|
if [ "$suffix" != "gz" -a "$suffix" != "Z" ]; then #probably uncompressed...
|
||||||
|
if [ -L "$manpage" ]; then
|
||||||
|
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
||||||
|
$LN -sf "$TARGET".gz "$manpage".gz
|
||||||
|
$RM -f "$manpage"
|
||||||
|
else
|
||||||
|
$GZIP "$manpage"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# doc(): Add files from srcdir to 'docs' location
|
# doc(): Add files from srcdir to 'docs' location
|
||||||
# params: $1..$x
|
# params: $1..$x
|
||||||
# Copies files from $srcdir to $_docdir/$topdir-$version
|
# Copies files from $srcdir to $_docdir/$topdir-$version
|
||||||
|
@ -41,6 +41,9 @@ usedepend=1 # default to looking for a depend file in $metadir
|
|||||||
usescripts=1 # default to add pre/post scripts if available
|
usescripts=1 # default to add pre/post scripts if available
|
||||||
ignore_unpackaged_files=0 # default to check for unpackaged files in the stage area
|
ignore_unpackaged_files=0 # default to check for unpackaged files in the stage area
|
||||||
|
|
||||||
|
# Compress raw manpages...
|
||||||
|
gzman=1
|
||||||
|
|
||||||
# Host specific configuration
|
# Host specific configuration
|
||||||
[ -r $buildpkgbase/scripts/config.`hostname`.solaris ] && . $buildpkgbase/scripts/config.`hostname`.solaris
|
[ -r $buildpkgbase/scripts/config.`hostname`.solaris ] && . $buildpkgbase/scripts/config.`hostname`.solaris
|
||||||
|
|
||||||
@ -399,20 +402,20 @@ get_pkgname()
|
|||||||
echo $pname
|
echo $pname
|
||||||
}
|
}
|
||||||
|
|
||||||
# get_pkgrev(): Extract pkgrev (PSTAMP) from pkginfo file
|
# get_pkgrev(): Extract pkgrev (REV part of VERSION field) from pkginfo file
|
||||||
# params: $1 = metafile suffix
|
# params: $1 = metafile suffix
|
||||||
get_pkgrev()
|
get_pkgrev()
|
||||||
{
|
{
|
||||||
local secname=$1
|
local secname=$1
|
||||||
|
|
||||||
local pstamp=$($GREP PSTAMP $metadir/pkginfo.$secname)
|
local verfield="$($GREP VERSION $metadir/pkginfo.$secname|$SED -e 's/"//g')"
|
||||||
local secver=$(_upls ${pstamp##PSTAMP=})
|
local secver=$(_upls ${verfield#*REV=})
|
||||||
echo $secver
|
echo $secver
|
||||||
}
|
}
|
||||||
|
|
||||||
# do_strip_bin(): Strip binaries
|
# do_strip_bin(): Strip binaries
|
||||||
# params: none
|
# params: none
|
||||||
do_strip_binaries()
|
do_strip_bin()
|
||||||
{
|
{
|
||||||
echo "Stripping ELF binaries..."
|
echo "Stripping ELF binaries..."
|
||||||
for f in `$FIND . -type f \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -exec $FILE {} \; | \
|
for f in `$FIND . -type f \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -exec $FILE {} \; | \
|
||||||
@ -465,9 +468,19 @@ generic_pack()
|
|||||||
fi
|
fi
|
||||||
clean meta
|
clean meta
|
||||||
if [ "$shortroot" -eq 1 ]; then
|
if [ "$shortroot" -eq 1 ]; then
|
||||||
|
if [ -d "${stagedir}/${_mandir}" ]; then
|
||||||
|
setdir ${stagedir}/${_mandir}
|
||||||
|
[ "$catman" -eq 1 ] && fix_man
|
||||||
|
[ "$gzman" -eq 1 ] && compress_man
|
||||||
|
fi
|
||||||
setdir "$stagedir"
|
setdir "$stagedir"
|
||||||
else
|
else
|
||||||
setdir "$stagedir$prefix"
|
if [ -d "${stagedir}${topinstalldir}${dir_prefix}/${_mandir}" ]; then
|
||||||
|
setdir ${stagedir}${topinstalldir}${dir_prefix}/${_mandir}
|
||||||
|
[ "$catman" -eq 1 ] && fix_man
|
||||||
|
[ "$gzman" -eq 1 ] && compress_man
|
||||||
|
fi
|
||||||
|
setdir "${stagedir}${prefix}"
|
||||||
fi
|
fi
|
||||||
parse_def
|
parse_def
|
||||||
check_unpackaged
|
check_unpackaged
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
PKG="%%pkgname%%"
|
PKG="%%pkgname%%"
|
||||||
NAME="%%name%%"
|
NAME="%%name%%"
|
||||||
ARCH="sparc"
|
ARCH="sparc"
|
||||||
VERSION="%%version%%"
|
VERSION="%%version%%,REV=%%pkgver%%"
|
||||||
CATEGORY="%%pkgcat%%"
|
CATEGORY="%%pkgcat%%"
|
||||||
VENDOR="%%pkgvendor%%"
|
VENDOR="%%pkgvendor%% - packaged by Tom G. Christensen"
|
||||||
EMAIL="Tom G. Christensen - tgc@statsbiblioteket.dk"
|
EMAIL="swpkg@statsbiblioteket.dk"
|
||||||
PSTAMP="%%pkgver%%"
|
|
||||||
BASEDIR="%%topinstalldir%%"
|
BASEDIR="%%topinstalldir%%"
|
||||||
CLASSES="none"
|
CLASSES="none"
|
||||||
DESC="%%pkgdesc%%"
|
DESC="%%pkgdesc%%"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user