source: BLFS/libs/func_packages@ 456c2de

experimental
Last change on this file since 456c2de 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
RevLine 
[5769ccd]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)
[323f805]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
[de14f6a]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
[5769ccd]25
26 # Add header with meta-packages pseudo Id
27{
28 cat << EOF
[323f805]29alsa $BLFS_XML
[5769ccd]30gnome-core $BLFS_XML
31gnome-full $BLFS_XML
32kde-core $BLFS_XML
33kde-full $BLFS_XML
[ea72d77]34kde-koffice $BLFS_XML
[323f805]35xorg7 $BLFS_XML
[5769ccd]36EOF
[ee8dc26]37} >> packages.tmp
[5769ccd]38
39 # Dump packages list
[ee8dc26]40 sort packages.tmp -b --key=2 --field-separator=/ --output=packages
[5769ccd]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
[c704412]61 # Replace dummy packages with the proper ones
62 sed -i 's/GNOME-//g' gnome-core.dep.tmp
63
[2ca2992]64 tac gnome-core.dep.tmp > libs/gnome-core.dep
[5769ccd]65 rm gnome-core.dep.tmp
66}
67
[ea72d77]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
[2ca2992]81 tac gnome-full.dep.tmp > libs/gnome-full.dep
[ea72d77]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
[2ca2992]98 tac kde-core.dep.tmp > libs/kde-core.dep
[ea72d77]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
[2ca2992]121 tac kde-full.dep.tmp > libs/kde-full.dep
[ea72d77]122 rm kde-full.dep.tmp
123}
[323f805]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#--------------------------#
[2f16dbe]134 echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n\
[323f805]135alsa-plugins\nalsa-lib" > libs/alsa.dep
136}
137
138#--------------------------#
139generate_xorg7() { # Xorg7 packages
140#--------------------------#
[2f16dbe]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\
[323f805]143xorg7-lib\nxorg7-util\nxorg7-proto" > libs/xorg7.dep
144}
Note: See TracBrowser for help on using the repository browser.