Fix adding of patches to opt.src
Add spec & idb files to a opt.dist subsystem
This commit is contained in:
parent
46d02dd6db
commit
a6559259a0
@ -392,7 +392,18 @@ create_idb()
|
|||||||
if [ -d relnotes ]; then # We have releasenotes, add them to idb file
|
if [ -d relnotes ]; then # We have releasenotes, add them to idb file
|
||||||
add_files "relnotes" opt.relnotes - root sys ""
|
add_files "relnotes" opt.relnotes - root sys ""
|
||||||
pc[$pcpos]="opt.relnotes"
|
pc[$pcpos]="opt.relnotes"
|
||||||
|
let "pcpos = pcpos + 1"
|
||||||
fi
|
fi
|
||||||
|
if [ -d dist ]; then # We have spec & idb files
|
||||||
|
add_files "dist" opt.dist - root sys ""
|
||||||
|
pc[$pcpos]="opt.dist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add entries for the spec & idb files (opt.dist), they will be installed later, after they've actually been created
|
||||||
|
echo "f 644 root sys ${topinstalldir:1}/dist/$topdir-$version-$pkgver/$topdir.idb dist/$topdir-$version-$pkgver/$topdir.idb ${pkgname}.opt.dist" >>$idbfile
|
||||||
|
echo "f 644 root sys ${topinstalldir:1}/dist/$topdir-$version-$pkgver/$topdir.spec dist/$topdir-$version-$pkgver/$topdir.spec ${pkgname}.opt.dist" >>$idbfile
|
||||||
|
echo "dist/$topdir-$version-$pkgver/$topdir.idb" >> $metadir/files.tmp
|
||||||
|
echo "dist/$topdir-$version-$pkgver/$topdir.spec" >> $metadir/files.tmp
|
||||||
|
|
||||||
$SORT +4u -6 < $idbfile > $metadir/idbtemp
|
$SORT +4u -6 < $idbfile > $metadir/idbtemp
|
||||||
lines=$(wc -l < $metadir/idbtemp)
|
lines=$(wc -l < $metadir/idbtemp)
|
||||||
@ -637,28 +648,30 @@ check_unpackaged()
|
|||||||
# for adding to the opt.src subsystem
|
# for adding to the opt.src subsystem
|
||||||
auto_src()
|
auto_src()
|
||||||
{
|
{
|
||||||
local distsrcdir="src/$topdir-$version-$pkgver"
|
|
||||||
$MKDIR -p $distsrcdir
|
|
||||||
|
|
||||||
local numpatch=${#patch[@]}
|
local numpatch=${#patch[@]}
|
||||||
local pnum=0
|
local pnum=0
|
||||||
for ((pnum=0; pnum < $numpatch; pnum++))
|
if [ "$numpatch" -gt 0 ]; then
|
||||||
do
|
local distsrcdir="src/$topdir-$version-$pkgver"
|
||||||
if [ ! -z ${patch[$pnum]} ]; then # They didn't give us an empty string
|
$MKDIR -p $distsrcdir
|
||||||
if [ "${patch[$pnum]:0:1}" != "/" ]; then # We have a relative pathname
|
for ((pnum=0; pnum < $numpatch; pnum++))
|
||||||
# expand to absolute
|
do
|
||||||
patch[$pnum]=$patchdir/${patch[$pnum]}
|
if [ ! -z ${patch[$pnum]} ]; then # They didn't give us an empty string
|
||||||
fi # We are now sure that $patch[$pnum] contains file with absolute path
|
if [ "${patch[$pnum]:0:1}" != "/" ]; then # We have a relative pathname
|
||||||
echo "Processing patch[$pnum] - ${patch[$pnum]}"
|
# expand to absolute
|
||||||
if [ -r ${patch[$pnum]} ]; then # file is readable
|
patch[$pnum]=$patchdir/${patch[$pnum]}
|
||||||
$CP ${patch[$pnum]} $distsrcdir
|
fi # We are now sure that $patch[$pnum] contains file with absolute path
|
||||||
|
echo "Processing patch[$pnum] - ${patch[$pnum]}"
|
||||||
|
if [ -r ${patch[$pnum]} ]; then # file is readable
|
||||||
|
$CP ${patch[$pnum]} $distsrcdir
|
||||||
|
else
|
||||||
|
error $E_BAD_FILE patch
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
error $E_BAD_FILE patch
|
echo "Patch $pnum has empty filename"
|
||||||
fi
|
fi
|
||||||
else
|
done
|
||||||
echo "Patch $pnum has empty filename"
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# auto_rel(): Fix up and add releasenotes to stagedir
|
# auto_rel(): Fix up and add releasenotes to stagedir
|
||||||
@ -670,6 +683,18 @@ auto_rel()
|
|||||||
echo "auto_rel() is unimplemented"
|
echo "auto_rel() is unimplemented"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# auto_dist(): Add idb & spec files to stagedir
|
||||||
|
# params: none
|
||||||
|
# This will copy the newly created idb & spec files to
|
||||||
|
# the stagedir under dist/$topdir-$version-$pkgver
|
||||||
|
auto_dist()
|
||||||
|
{
|
||||||
|
local distmetadir=dist/$topdir-$version-$pkgver
|
||||||
|
$MKDIR -p $distmetadir
|
||||||
|
$CP $idbfile $distmetadir
|
||||||
|
$CP $specfile $distmetadir
|
||||||
|
}
|
||||||
|
|
||||||
# generic_pack(): Build package using files from 'install' stage
|
# generic_pack(): Build package using files from 'install' stage
|
||||||
# params: $1 - indicating whether or not the root is complete as described below
|
# params: $1 - indicating whether or not the root is complete as described below
|
||||||
# We expect generic_install to have made $stagedir the "root" dir
|
# We expect generic_install to have made $stagedir the "root" dir
|
||||||
@ -699,6 +724,7 @@ generic_pack()
|
|||||||
auto_rel # Fix up and add releasenotes
|
auto_rel # Fix up and add releasenotes
|
||||||
create_idb
|
create_idb
|
||||||
create_spec
|
create_spec
|
||||||
|
auto_dist # Add idb & specfiles to stagedir
|
||||||
check_unpackaged
|
check_unpackaged
|
||||||
make_dist
|
make_dist
|
||||||
}
|
}
|
||||||
|
@ -5,3 +5,4 @@ man.doc other documentation
|
|||||||
man.man manpages, infopages
|
man.man manpages, infopages
|
||||||
opt.relnotes release notes
|
opt.relnotes release notes
|
||||||
opt.src source
|
opt.src source
|
||||||
|
opt.dist idb & spec files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user