Ignore:
Timestamp:
09/19/2023 08:11:11 PM (13 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
e6a1ec3
Parents:
b39f283
Message:

Add automation for kf5 and plasma5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen-special.sh

    rb39f283 r0cd09c6  
    9999    <xsl:choose>
    100100EOF
    101 for file in $(ls ${BLFS_DIR}/x/installing/x7* | grep -v x7driver); do
     101for file in $(ls ${BLFS_DIR}/x/installing/x7* | grep -v x7driver) \
     102            ${BLFS_DIR}/kde/kf5/kf5-frameworks.xml                \
     103            ${BLFS_DIR}/kde/plasma5/plasma-all.xml; do
    102104  id=$(grep xreflabel $file | sed 's@.*id="\([^"]*\).*@\1@')
    103105  cat >>$SPECIAL_FILE << EOF
     
    117119# that the preceding package is a dependency of the following,
    118120# except the first.
    119   list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF\|#' |
     121list_cat="$(sed -n '/>cat.*\.\(md5\|dat\)/,/EOF</p' $file | grep -v 'cat\|EOF\|#' |
    120122              awk '{ print $NF }' | sed 's/-&.*//')"
    121123
    122 # Rationale for the sed below: the following for breaks words at spaces (unless
    123 # we tweak IFS). So replace spaces with commas in lines so that only newlines
    124 # are separators.
    125   for pack in \
    126       $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do
    127     packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')
    128     packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')
    129     precpack=NONE
    130     for i in $list_cat; do
    131       if [ "$i" = "$packname" ]; then break; fi
    132       precpack=$i
    133     done
    134 # It may happen that packname is not in list_cat, because its entity
    135 # is commented out in the xml, but we do not check that (too complicated).
    136 # In that case, the whole list is scanned, and $precpack=$i at the end.
    137 # when packname is found in the list $precpack!=$i.
    138     if [ "$precpack" = "$i" ]; then continue; fi
     124  precpack=NONE
     125  for pack in $list_cat; do
     126    if grep -q x7 $file; then # this is an xorg package
     127      packname=$pack
     128      packversion=$(grep "ENTITY ${pack}-version" $file | \
     129                    sed 's@[^"]*"\([^"]*\).*@\1@')
     130    else
     131      packname=${pack%%-[[:digit:]]*}
     132      packversion=$(echo $pack | sed 's/[^.]*-\([.[:digit:]]*\)\.tar.*/\1/')
     133    fi
     134## Rationale for the sed below: the following for breaks words at spaces (unless
     135## we tweak IFS). So replace spaces with commas in lines so that only newlines
     136## are separators.
     137#  for pack in \
     138#      $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do
     139#    packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')
     140#    packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')
     141#    for i in $list_cat; do
     142#      if [ "$i" = "$packname" ]; then break; fi
     143#      precpack=$i
     144#    done
     145## It may happen that packname is not in list_cat, because its entity
     146## is commented out in the xml, but we do not check that (too complicated).
     147## In that case, the whole list is scanned, and $precpack=$i at the end.
     148## when packname is found in the list $precpack!=$i.
     149#    if [ "$precpack" = "$i" ]; then continue; fi
    139150    cat >>$SPECIAL_FILE << EOF
    140151        <module><xsl:text>&#xA;          </xsl:text>
     
    183194        </xsl:element>
    184195EOF
     196    precpack=$packname
    185197  done
    186198  cat >>$SPECIAL_FILE << EOF
Note: See TracChangeset for help on using the changeset viewer.