LFS/lfs.xsl: Update directory layout of PKG_DEST
- Do not symlink /{usr/,}lib64->lib - Do not symlink /usr/{man,info}->share - Create /lib64 on x86_64 - Create /usr/lib/pkgconfig - do not create /usr/lib/rpcsvc - check that a directory exists before testing its emptyness (for example, attr removes empty manx dirs)
This commit is contained in:
parent
eabfc593e5
commit
adbd09b06c
1 changed files with 14 additions and 38 deletions
52
LFS/lfs.xsl
52
LFS/lfs.xsl
|
@ -221,32 +221,19 @@
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
|
<!-- We cannot know which directory(ies) are needed by the package. Create a
|
||||||
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
|
reasonable bunch of them. Should be close to "Creating Directories".-->
|
||||||
|
<xsl:text>mkdir -pv $PKG_DEST/{bin,boot,etc,lib,sbin}
|
||||||
|
mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin}
|
||||||
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
||||||
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
|
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
|
||||||
ln -sv share/{man,doc,info} $PKG_DEST/usr
|
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
x86_64) mkdir -v $PKG_DEST/lib64 ;;
|
||||||
esac
|
esac
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="../@id = 'ch-system-glibc' and
|
|
||||||
@role='installation' and
|
|
||||||
$pkgmngt = 'y' and
|
|
||||||
$wrap-install = 'n'">
|
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="../@id = 'ch-system-libelf' and
|
|
||||||
@role='installation' and
|
|
||||||
$pkgmngt = 'y' and
|
|
||||||
$wrap-install = 'n'">
|
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/usr/lib/pkgconfig
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[(not(@role) or
|
select=".//screen[(not(@role) or
|
||||||
@role != 'nodump') and
|
@role != 'nodump') and
|
||||||
|
@ -306,20 +293,16 @@ rm -fv $PKG_DEST/usr/share/man/man5/*
|
||||||
rm -fv $PKG_DEST/sbin/nologin
|
rm -fv $PKG_DEST/sbin/nologin
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
|
<!-- remove empty directories -->
|
||||||
rm -fv $PKG_DEST/usr/{man,doc,info}
|
<xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \
|
||||||
for dir in $PKG_DEST/usr/share/man/man{1..8}; do
|
$PKG_DEST/usr/share/{doc,info,man} \
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
$PKG_DEST/usr/lib/pkgconfig \
|
||||||
done
|
$PKG_DEST/usr/{lib,bin,sbin,include} \
|
||||||
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
|
$PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
[ -d "$dir" ] && [ -z "$(ls $dir)" ] && rmdir -v $dir
|
||||||
done
|
|
||||||
for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
|
||||||
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
done
|
||||||
|
[ -d $PKG_DEST/lib64 ] && [ -z "$(ls $PKG_DEST/lib64)" ] &&
|
||||||
|
rmdir -v $PKG_DEST/lib64
|
||||||
PREV_SEC=${SECONDS}
|
PREV_SEC=${SECONDS}
|
||||||
packInstall
|
packInstall
|
||||||
SECONDS=${PREV_SEC}
|
SECONDS=${PREV_SEC}
|
||||||
|
@ -947,13 +930,6 @@ LOGLEVEL="</xsl:text>
|
||||||
'install')"/>
|
'install')"/>
|
||||||
<xsl:text>install
</xsl:text>
|
<xsl:text>install
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-attr']">
|
|
||||||
<xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
|
|
||||||
<xsl:call-template name="outputpkgdest">
|
|
||||||
<xsl:with-param name="outputstring"
|
|
||||||
select="substring-after($outputstring,'make')"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
|
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
|
||||||
<xsl:call-template name="outputpkgdest">
|
<xsl:call-template name="outputpkgdest">
|
||||||
|
|
Reference in a new issue