[5769ccd] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | set -e
|
---|
| 6 |
|
---|
| 7 | #-----------------------#
|
---|
| 8 | generate_packages() { # Master packages file
|
---|
| 9 | #-----------------------#
|
---|
| 10 | local pkg_id file
|
---|
| 11 |
|
---|
| 12 | > packages.tmp
|
---|
| 13 |
|
---|
| 14 | # Extract Id and path for sect1 files
|
---|
| 15 | for file in `find $BLFS_XML -name "*.xml"` ; do
|
---|
| 16 | pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'`
|
---|
| 17 | [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp
|
---|
| 18 | done
|
---|
| 19 |
|
---|
| 20 | # IDs clean-up (unuseful pages or commented-out packages, could be more)
|
---|
| 21 | sed -i '/template/d;/ntroduction/d;/preface/d' packages.tmp
|
---|
| 22 | sed -i '/courier.xml/d' packages.tmp
|
---|
| 23 | sed -i '/nautilus-media.xml/d;/gal.xml/d;/gpdf.xml/d;/gv.xml/d' packages.tmp
|
---|
| 24 |
|
---|
| 25 | # Add header with meta-packages pseudo Id
|
---|
| 26 | {
|
---|
| 27 | cat << EOF
|
---|
| 28 |
|
---|
| 29 | === GNOME META-PACKAGES ===
|
---|
| 30 | # GNOME base packages
|
---|
| 31 | gnome-core $BLFS_XML
|
---|
| 32 | # All GNOME packages
|
---|
| 33 | gnome-full $BLFS_XML
|
---|
| 34 |
|
---|
| 35 | === KDE META-PACKAGES ===
|
---|
| 36 | # KDE base packages
|
---|
| 37 | kde-core $BLFS_XML
|
---|
| 38 | # All KDE packages
|
---|
| 39 | kde-full $BLFS_XML
|
---|
[ea72d77] | 40 | # All KDE packages plus Koffice
|
---|
| 41 | kde-koffice $BLFS_XML
|
---|
[5769ccd] | 42 |
|
---|
| 43 | === INDIVIDUAL PACKAGES ===
|
---|
| 44 |
|
---|
| 45 | EOF
|
---|
| 46 | } > packages
|
---|
| 47 |
|
---|
| 48 | # Dump packages list
|
---|
| 49 | sort packages.tmp >> packages
|
---|
| 50 |
|
---|
| 51 | # Clean up
|
---|
| 52 | rm packages.tmp
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | # Pre-made *.dep files for meta-packages
|
---|
| 56 |
|
---|
| 57 | #--------------------------#
|
---|
| 58 | generate_gnome_core() { # GNOME core
|
---|
| 59 | #--------------------------#
|
---|
| 60 | local line base_xml package
|
---|
| 61 |
|
---|
| 62 | > gnome-core.dep.tmp
|
---|
| 63 |
|
---|
| 64 | for line in `grep "xi:include" $BLFS_XML/gnome/core/core.xml` ; do
|
---|
| 65 | base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
---|
| 66 | package=`grep "gnome/core/$base_xml" packages | cut -f1`
|
---|
| 67 | [[ -n "$package" ]] && echo $package >> gnome-core.dep.tmp
|
---|
| 68 | done
|
---|
| 69 |
|
---|
| 70 | tac gnome-core.dep.tmp > gnome-core.dep
|
---|
| 71 | rm gnome-core.dep.tmp
|
---|
| 72 | }
|
---|
| 73 |
|
---|
[ea72d77] | 74 | #--------------------------#
|
---|
| 75 | generate_gnome_full() { # GNOME full
|
---|
| 76 | #--------------------------#
|
---|
| 77 | local line base_xml package
|
---|
| 78 |
|
---|
| 79 | echo "gnome-core" > gnome-full.dep.tmp
|
---|
| 80 |
|
---|
| 81 | for line in `grep "xi:include" $BLFS_XML/gnome/add/add.xml` ; do
|
---|
| 82 | base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
---|
| 83 | package=`grep "gnome/add/$base_xml" packages | cut -f1`
|
---|
| 84 | [[ -n "$package" ]] && echo $package >> gnome-full.dep.tmp
|
---|
| 85 | done
|
---|
| 86 |
|
---|
| 87 | tac gnome-full.dep.tmp > gnome-full.dep
|
---|
| 88 | rm gnome-full.dep.tmp
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 | #--------------------------#
|
---|
| 92 | generate_kde_core() { # KDE core
|
---|
| 93 | #--------------------------#
|
---|
| 94 | local line base_xml package
|
---|
| 95 |
|
---|
| 96 | > kde-core.dep.tmp
|
---|
| 97 |
|
---|
| 98 | for line in `grep "xi:include" $BLFS_XML/kde/core/core.xml` ; do
|
---|
| 99 | base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
---|
| 100 | package=`grep "kde/core/$base_xml" packages | cut -f1`
|
---|
| 101 | [[ -n "$package" ]] && echo $package >> kde-core.dep.tmp
|
---|
| 102 | done
|
---|
| 103 |
|
---|
| 104 | tac kde-core.dep.tmp > kde-core.dep
|
---|
| 105 | rm kde-core.dep.tmp
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | #--------------------------#
|
---|
| 109 | generate_kde_full() { # KDE full
|
---|
| 110 | #--------------------------#
|
---|
| 111 | local line base_xml package
|
---|
| 112 |
|
---|
| 113 | echo "kde-core" > kde-full.dep.tmp
|
---|
| 114 |
|
---|
| 115 | for line in `grep "xi:include" $BLFS_XML/kde/add/add.xml` ; do
|
---|
| 116 | base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
---|
| 117 | package=`grep "kde/add/$base_xml" packages | cut -f1`
|
---|
| 118 | [[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
|
---|
| 119 | done
|
---|
| 120 |
|
---|
| 121 | for line in `grep "xi:include" $BLFS_XML/kde/devel/devel.xml` ; do
|
---|
| 122 | base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
---|
| 123 | package=`grep "kde/devel/$base_xml" packages | cut -f1`
|
---|
| 124 | [[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
|
---|
| 125 | done
|
---|
| 126 |
|
---|
| 127 | tac kde-full.dep.tmp > kde-full.dep
|
---|
| 128 | rm kde-full.dep.tmp
|
---|
| 129 | }
|
---|