source: BLFS/libs/func_packages@ ec12033

experimental
Last change on this file since ec12033 was ec12033, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Finished packages clean-up and version fixes.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1#!/bin/bash
2#
3# $Id$
4#
5set -e
6
7#-----------------------#
8generate_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;/alsa.xml/d' packages.tmp
22 sed -i '/obsolete/d;/postlfs-/d;/-client.xml/d;/xorg7.xml/d' packages.tmp
23 sed -i '/courier.xml/d;/-other\t/d;/others-/d;/other-/d' packages.tmp
24 sed -i '/fw-firewall/d;/gcc2/d;/cvsserver/d;/svnserver/d' packages.tmp
25 sed -i '/fam\t/d;/libungif\t/d;/ncpfs\t/d;/slrn\t/d;/konq\t/d' packages.tmp
26 sed -i '/gst-plugins\t/d;/openquicktime\t/d;/compressdoc\t/d' packages.tmp
27
28 # Add header with meta-packages pseudo Id
29{
30 cat << EOF
31alsa $BLFS_XML
32gnome-core $BLFS_XML
33gnome-full $BLFS_XML
34kde-core $BLFS_XML
35kde-full $BLFS_XML
36kde-koffice $BLFS_XML
37xorg7 $BLFS_XML
38EOF
39} >> packages.tmp
40
41 # Dump packages list
42 sort packages.tmp -b --key=2 --field-separator=/ --output=packages
43
44 # Clean up
45 rm packages.tmp
46}
47
48# Pre-made *.dep files for meta-packages
49
50#--------------------------#
51generate_gnome_core() { # GNOME core
52#--------------------------#
53 local line base_xml package
54
55 > gnome-core.dep.tmp
56
57 for line in `grep "xi:include" $BLFS_XML/gnome/core/core.xml` ; do
58 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
59 package=`grep "gnome/core/$base_xml" packages | cut -f1`
60 [[ -n "$package" ]] && echo $package >> gnome-core.dep.tmp
61 done
62
63 # Replace dummy packages with the proper ones
64 sed -i 's/GNOME-//g' gnome-core.dep.tmp
65
66 tac gnome-core.dep.tmp > libs/gnome-core.dep
67 rm gnome-core.dep.tmp
68}
69
70#--------------------------#
71generate_gnome_full() { # GNOME full
72#--------------------------#
73 local line base_xml package
74
75 echo "gnome-core" > gnome-full.dep.tmp
76
77 for line in `grep "xi:include" $BLFS_XML/gnome/add/add.xml` ; do
78 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
79 package=`grep "gnome/add/$base_xml" packages | cut -f1`
80 [[ -n "$package" ]] && echo $package >> gnome-full.dep.tmp
81 done
82
83 tac gnome-full.dep.tmp > libs/gnome-full.dep
84 rm gnome-full.dep.tmp
85}
86
87#--------------------------#
88generate_kde_core() { # KDE core
89#--------------------------#
90 local line base_xml package
91
92 > kde-core.dep.tmp
93
94 for line in `grep "xi:include" $BLFS_XML/kde/core/core.xml` ; do
95 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
96 package=`grep "kde/core/$base_xml" packages | cut -f1`
97 [[ -n "$package" ]] && echo $package >> kde-core.dep.tmp
98 done
99
100 tac kde-core.dep.tmp > libs/kde-core.dep
101 rm kde-core.dep.tmp
102}
103
104#--------------------------#
105generate_kde_full() { # KDE full
106#--------------------------#
107 local line base_xml package
108
109 echo "kde-core" > kde-full.dep.tmp
110
111 for line in `grep "xi:include" $BLFS_XML/kde/add/add.xml` ; do
112 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
113 package=`grep "kde/add/$base_xml" packages | cut -f1`
114 [[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
115 done
116
117 for line in `grep "xi:include" $BLFS_XML/kde/devel/devel.xml` ; do
118 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
119 package=`grep "kde/devel/$base_xml" packages | cut -f1`
120 [[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
121 done
122
123 tac kde-full.dep.tmp > libs/kde-full.dep
124 rm kde-full.dep.tmp
125}
126
127#--------------------------#
128generate_kde_koffice() { # KDE full + Koffice
129#--------------------------#
130 echo -e "koffice\nkde-full\nkde-core" > libs/kde-koffice.dep
131}
132
133#--------------------------#
134generate_alsa() { # ALSA packages
135#--------------------------#
136 echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n\
137alsa-plugins\nalsa-lib" > libs/alsa.dep
138}
139
140#--------------------------#
141generate_xorg7() { # Xorg7 packages
142#--------------------------#
143 echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n\
144xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n\
145xorg7-lib\nxorg7-util\nxorg7-proto" > libs/xorg7.dep
146}
Note: See TracBrowser for help on using the repository browser.