2006-05-27 01:53:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
set -e
|
|
|
|
|
|
|
|
#-----------------------#
|
|
|
|
generate_packages() { # Master packages file
|
|
|
|
#-----------------------#
|
|
|
|
local pkg_id file
|
|
|
|
|
|
|
|
> packages.tmp
|
|
|
|
|
|
|
|
# Extract Id and path for sect1 files
|
|
|
|
for file in `find $BLFS_XML -name "*.xml"` ; do
|
|
|
|
pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'`
|
|
|
|
[[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp
|
|
|
|
done
|
|
|
|
|
|
|
|
# IDs clean-up (unuseful pages or commented-out packages, could be more)
|
2006-08-17 22:41:38 +02:00
|
|
|
sed -i '/template/d;/ntroduction/d;/preface/d;/alsa.xml/d' packages.tmp
|
|
|
|
sed -i '/obsolete/d;/postlfs-/d;/-client.xml/d;/xorg7.xml/d' packages.tmp
|
2006-08-17 21:57:38 +02:00
|
|
|
sed -i '/courier.xml/d;/-other\t/d;/others-/d;/other-/d' packages.tmp
|
|
|
|
sed -i '/fw-firewall/d;/gcc2/d;/cvsserver/d;/svnserver/d' packages.tmp
|
2006-05-27 01:53:13 +02:00
|
|
|
|
|
|
|
# Add header with meta-packages pseudo Id
|
|
|
|
{
|
|
|
|
cat << EOF
|
2006-08-17 22:41:38 +02:00
|
|
|
alsa $BLFS_XML
|
2006-05-27 01:53:13 +02:00
|
|
|
gnome-core $BLFS_XML
|
|
|
|
gnome-full $BLFS_XML
|
|
|
|
kde-core $BLFS_XML
|
|
|
|
kde-full $BLFS_XML
|
2006-05-27 12:08:22 +02:00
|
|
|
kde-koffice $BLFS_XML
|
2006-08-17 22:41:38 +02:00
|
|
|
xorg7 $BLFS_XML
|
2006-05-27 01:53:13 +02:00
|
|
|
EOF
|
|
|
|
} > packages
|
|
|
|
|
|
|
|
# Dump packages list
|
|
|
|
sort packages.tmp >> packages
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
rm packages.tmp
|
|
|
|
}
|
|
|
|
|
|
|
|
# Pre-made *.dep files for meta-packages
|
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_gnome_core() { # GNOME core
|
|
|
|
#--------------------------#
|
|
|
|
local line base_xml package
|
|
|
|
|
|
|
|
> gnome-core.dep.tmp
|
|
|
|
|
|
|
|
for line in `grep "xi:include" $BLFS_XML/gnome/core/core.xml` ; do
|
|
|
|
base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
|
|
|
package=`grep "gnome/core/$base_xml" packages | cut -f1`
|
|
|
|
[[ -n "$package" ]] && echo $package >> gnome-core.dep.tmp
|
|
|
|
done
|
|
|
|
|
2006-05-27 12:33:12 +02:00
|
|
|
tac gnome-core.dep.tmp > libs/gnome-core.dep
|
2006-05-27 01:53:13 +02:00
|
|
|
rm gnome-core.dep.tmp
|
|
|
|
}
|
|
|
|
|
2006-05-27 12:08:22 +02:00
|
|
|
#--------------------------#
|
|
|
|
generate_gnome_full() { # GNOME full
|
|
|
|
#--------------------------#
|
|
|
|
local line base_xml package
|
|
|
|
|
|
|
|
echo "gnome-core" > gnome-full.dep.tmp
|
|
|
|
|
|
|
|
for line in `grep "xi:include" $BLFS_XML/gnome/add/add.xml` ; do
|
|
|
|
base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
|
|
|
package=`grep "gnome/add/$base_xml" packages | cut -f1`
|
|
|
|
[[ -n "$package" ]] && echo $package >> gnome-full.dep.tmp
|
|
|
|
done
|
|
|
|
|
2006-05-27 12:33:12 +02:00
|
|
|
tac gnome-full.dep.tmp > libs/gnome-full.dep
|
2006-05-27 12:08:22 +02:00
|
|
|
rm gnome-full.dep.tmp
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_kde_core() { # KDE core
|
|
|
|
#--------------------------#
|
|
|
|
local line base_xml package
|
|
|
|
|
|
|
|
> kde-core.dep.tmp
|
|
|
|
|
|
|
|
for line in `grep "xi:include" $BLFS_XML/kde/core/core.xml` ; do
|
|
|
|
base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
|
|
|
package=`grep "kde/core/$base_xml" packages | cut -f1`
|
|
|
|
[[ -n "$package" ]] && echo $package >> kde-core.dep.tmp
|
|
|
|
done
|
|
|
|
|
2006-05-27 12:33:12 +02:00
|
|
|
tac kde-core.dep.tmp > libs/kde-core.dep
|
2006-05-27 12:08:22 +02:00
|
|
|
rm kde-core.dep.tmp
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_kde_full() { # KDE full
|
|
|
|
#--------------------------#
|
|
|
|
local line base_xml package
|
|
|
|
|
|
|
|
echo "kde-core" > kde-full.dep.tmp
|
|
|
|
|
|
|
|
for line in `grep "xi:include" $BLFS_XML/kde/add/add.xml` ; do
|
|
|
|
base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
|
|
|
package=`grep "kde/add/$base_xml" packages | cut -f1`
|
|
|
|
[[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
|
|
|
|
done
|
|
|
|
|
|
|
|
for line in `grep "xi:include" $BLFS_XML/kde/devel/devel.xml` ; do
|
|
|
|
base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
|
|
|
|
package=`grep "kde/devel/$base_xml" packages | cut -f1`
|
|
|
|
[[ -n "$package" ]] && echo $package >> kde-full.dep.tmp
|
|
|
|
done
|
|
|
|
|
2006-05-27 12:33:12 +02:00
|
|
|
tac kde-full.dep.tmp > libs/kde-full.dep
|
2006-05-27 12:08:22 +02:00
|
|
|
rm kde-full.dep.tmp
|
|
|
|
}
|
2006-08-17 22:41:38 +02:00
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_kde_koffice() { # KDE full + Koffice
|
|
|
|
#--------------------------#
|
|
|
|
echo -e "koffice\nkde-full\nkde-core" > libs/kde-koffice.dep
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_alsa() { # ALSA packages
|
|
|
|
#--------------------------#
|
|
|
|
echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
|
|
|
|
alsa-plugins\nalsa-lib" > libs/alsa.dep
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------#
|
|
|
|
generate_xorg7() { # Xorg7 packages
|
|
|
|
#--------------------------#
|
|
|
|
echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n \
|
|
|
|
xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \
|
|
|
|
xorg7-lib\nxorg7-util\nxorg7-proto" > libs/xorg7.dep
|
|
|
|
}
|