source: BLFS/libs/func_packages@ fd3dcd4

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

Using the proper desktop-file-utils and shared-mime-info package files from the begining.

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