Get rid of varargs.h.
[dragonfly.git] / release / scripts / print-cdrom-packages.sh
1 #!/bin/sh
2 #
3 # Author:       Jordan Hubbard
4 # Date:         Mon Jul 10 01:18:20 2000
5 # Version:      $FreeBSD: src/release/scripts/print-cdrom-packages.sh,v 1.1.2.27 2003/03/19 16:56:52 obrien Exp $
6 # Version:      $DragonFly: src/release/scripts/Attic/print-cdrom-packages.sh,v 1.2 2003/06/17 04:27:21 dillon Exp $
7 #
8 # MAINTAINER:   re
9 #
10 # This script prints out the list of "minimum required packages" for
11 # a given CDROM number, that numer currently referring to the 4 CD
12 # "official set" published by BSDi.  If there is no minimum package
13 # set for the given CDROM, or none is known, the script will exit
14 # with an error code of 1.  At some point, this script should be extended
15 # to at least cope with other official CD distributions, like non-US ones.
16 #
17 # usage: print-cdrom-packages.sh cdrom-number
18 #
19 # example: ./print-cdrom-packages.sh 1
20 # will print the minimal package set for the first cdrom (what's generally
21 # referred to as the installation boot CD).
22 #
23 # This information is codified in script form so that some definitive
24 # reference for the package set info exists rather than having it
25 # be left up to everybody's best guess.  It's currently hard-coded directly
26 # into the script but may, at some point, switch to a more sophisticated
27 # data-extraction technique from the ports collection.  For now, add your
28 # packages to the appropriate CDROM_SET_<n> variable as /usr/ports/<your-entry>
29 # so that the package name and dependency list for each can be at least be
30 # obtained in an automated fashion.
31
32 # The following are required if you obtained your packages from one of the
33 # package building clusters or otherwise had these defined when the packages
34 # were built.
35 export BATCH=t
36 export PACKAGE_BUILDING=t
37
38 # Don't pick up installed packages from the host
39 export LOCALBASE=/nonexistentlocal
40 export X11BASE=/nonexistentx
41 export PKG_DBDIR=/nonexistentdb
42
43 if [ "X${PKG_ARCH}" = "X" ]; then
44 export PKG_ARCH=`uname -m`
45 fi
46
47 # usage: extract-names cd# [portsdir]
48 extract-names()
49 {
50         portsdir=${2-/usr/ports}
51         _FOO=`eval echo \\${CDROM_SET_$1}`
52         if [ "${_FOO}" ]; then
53                 TMPNAME="/tmp/_extract_names$$"
54                 rm -f ${TMPNAME}
55                 for i in ${_FOO}; do
56                         ( cd $portsdir/$i && PORTSDIR=$portsdir make package-name package-depends ) >> ${TMPNAME};
57                 done
58                 if [ -s "${TMPNAME}" ]; then
59                         sed -e 's/:.*$//' < ${TMPNAME} | sort -u
60                 fi
61                 rm -f ${TMPNAME}
62         else
63                 exit 1
64         fi
65 }
66
67
68 ## Start of set for CDROM #1
69 # This is the set required by sysinstall.
70 CDROM_SET_1=""
71 if [ "X${PKG_ARCH}" = "Xalpha" ]; then
72 CDROM_SET_1="${CDROM_SET_1} emulators/osf1_base"
73 elif [ "X${PKG_ARCH}" = "Xi386" ]; then
74 CDROM_SET_1="${CDROM_SET_1} emulators/linux_base"
75 fi
76 CDROM_SET_1="${CDROM_SET_1} net/pcnfsd"
77 CDROM_SET_1="${CDROM_SET_1} net/rsync"
78 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-font100dpi"
79 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-font75dpi"
80 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-fontCyrillic"
81 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-fontDefaultBitmaps"
82 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-fontEncodings"
83 CDROM_SET_1="${CDROM_SET_1} x11-fonts/XFree86-4-fontScalable"
84 CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-FontServer"
85 CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-NestServer"
86 CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-PrintServer"
87 CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-Server"
88 CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-VirtualFramebufferServer"
89 CDROM_SET_1="${CDROM_SET_1} x11-wm/afterstep"
90 CDROM_SET_1="${CDROM_SET_1} x11-wm/enlightenment"
91 CDROM_SET_1="${CDROM_SET_1} x11-wm/fvwm2"
92 CDROM_SET_1="${CDROM_SET_1} x11-wm/sawfish"
93 CDROM_SET_1="${CDROM_SET_1} x11-wm/windowmaker"
94 CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4"
95 CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-clients"
96 CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-documents"
97 CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-libraries"
98 CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-manuals"
99 CDROM_SET_1="${CDROM_SET_1} x11/gnome2"
100 CDROM_SET_1="${CDROM_SET_1} x11/kde3"
101 CDROM_SET_1="${CDROM_SET_1} www/links"
102
103 # This is the set of "people really want these" packages.  Please add to
104 # this list.
105 CDROM_SET_1="${CDROM_SET_1} astro/xearth"
106 CDROM_SET_1="${CDROM_SET_1} editors/emacs21"
107 CDROM_SET_1="${CDROM_SET_1} editors/vim-lite"
108 CDROM_SET_1="${CDROM_SET_1} editors/vim"
109 CDROM_SET_1="${CDROM_SET_1} emulators/mtools"
110 CDROM_SET_1="${CDROM_SET_1} ftp/ncftp"
111 CDROM_SET_1="${CDROM_SET_1} graphics/xpdf"
112 CDROM_SET_1="${CDROM_SET_1} graphics/xv"
113 CDROM_SET_1="${CDROM_SET_1} irc/xchat"
114 CDROM_SET_1="${CDROM_SET_1} mail/exim"
115 CDROM_SET_1="${CDROM_SET_1} mail/fetchmail"
116 CDROM_SET_1="${CDROM_SET_1} mail/mutt"
117 CDROM_SET_1="${CDROM_SET_1} mail/pine4"
118 CDROM_SET_1="${CDROM_SET_1} mail/popd"
119 CDROM_SET_1="${CDROM_SET_1} mail/xfmail"
120 CDROM_SET_1="${CDROM_SET_1} misc/screen"
121 CDROM_SET_1="${CDROM_SET_1} net/cvsup"
122 CDROM_SET_1="${CDROM_SET_1} net/samba"
123 CDROM_SET_1="${CDROM_SET_1} news/slrn"
124 CDROM_SET_1="${CDROM_SET_1} news/tin"
125 CDROM_SET_1="${CDROM_SET_1} print/a2ps-letter"
126 if [ "X${PKG_ARCH}" = "Xalpha" ]; then
127 CDROM_SET_1="${CDROM_SET_1} print/acroread4"
128 fi
129 if [ "X${PKG_ARCH}" = "Xi386" ]; then
130 CDROM_SET_1="${CDROM_SET_1} print/acroread5"
131 fi
132 CDROM_SET_1="${CDROM_SET_1} print/apsfilter"
133 CDROM_SET_1="${CDROM_SET_1} print/ghostscript-gnu-nox11"
134 CDROM_SET_1="${CDROM_SET_1} print/ghostview"
135 CDROM_SET_1="${CDROM_SET_1} print/gv"
136 CDROM_SET_1="${CDROM_SET_1} print/psutils-letter"
137 CDROM_SET_1="${CDROM_SET_1} security/sudo"
138 CDROM_SET_1="${CDROM_SET_1} shells/bash2"
139 CDROM_SET_1="${CDROM_SET_1} shells/pdksh"
140 CDROM_SET_1="${CDROM_SET_1} shells/zsh"
141 CDROM_SET_1="${CDROM_SET_1} sysutils/portupgrade"
142 CDROM_SET_1="${CDROM_SET_1} www/lynx"
143 CDROM_SET_1="${CDROM_SET_1} www/mozilla"
144 CDROM_SET_1="${CDROM_SET_1} www/netscape-remote"
145 CDROM_SET_1="${CDROM_SET_1} www/netscape-wrapper"
146 CDROM_SET_1="${CDROM_SET_1} www/netscape48-communicator"
147 CDROM_SET_1="${CDROM_SET_1} www/netscape48-navigator"
148 CDROM_SET_1="${CDROM_SET_1} www/opera"
149 CDROM_SET_1="${CDROM_SET_1} x11/rxvt"
150
151 # VERY common build dependencies
152 CDROM_SET_1="${CDROM_SET_1} archivers/unzip"
153 CDROM_SET_1="${CDROM_SET_1} devel/gmake"
154 CDROM_SET_1="${CDROM_SET_1} graphics/png"
155 if [ "X${PKG_ARCH}" = "Xi386" ]; then
156 CDROM_SET_1="${CDROM_SET_1} misc/compat22"
157 fi
158 if [ "X${PKG_ARCH}" = "Xi386" -o "X${PKG_ARCH}" = "Xalpha" ]; then
159 CDROM_SET_1="${CDROM_SET_1} misc/compat3x"
160 CDROM_SET_1="${CDROM_SET_1} misc/compat4x"
161 fi
162
163 ## End of set for CDROM #1
164
165 ## Start of set for CDROM #2
166 ## Live file system, CVS repositories, and commerical software demos
167 ## typically live on this disc.  Users do not expect to find packages
168 ## here.
169 ## End of set for CDROM #2
170
171 ## Start of set for CDROM #3
172 CDROM_SET_3="${CDROM_SET_3} editors/xemacs21"
173 CDROM_SET_3="${CDROM_SET_3} graphics/gimp1"
174 CDROM_SET_3="${CDROM_SET_3} lang/gnat"
175 CDROM_SET_3="${CDROM_SET_3} net/cvsup-without-gui"
176 CDROM_SET_3="${CDROM_SET_3} print/teTeX"
177 CDROM_SET_3="${CDROM_SET_3} textproc/docproj-jadetex"
178
179 ## End of set for CDROM #3
180
181 ## Start of set for CDROM #4
182 ## End of set for CDROM #4
183
184
185 ## Start of set that should not be included on any CDROM.
186 ## This should not contain packages that are already marked BROKEN or
187 ## RESTRICTED, it is only for packages that sysinstall(8) has trouble
188 ## with.
189 NO_CDROM_SET=""
190 NO_CDROM_SET="${NO_CDROM_SET} net/cvsupit"
191
192 # Start of actual script.
193 if [ $# -lt 1 ]; then
194         echo "usage: $0 cdrom-number [portsdir]"
195         exit 2
196 fi
197 if [ ${1} = 0 ]; then
198         echo $NO_CDROM_SET
199 else
200         extract-names $*
201 fi
202 exit 0