host info updates
[distro-setup] / distro-pkgs
1 #!/bin/bash
2 # I, Ian Kelling, follow the GNU license recommendations at
3 # https://www.gnu.org/licenses/license-recommendations.en.html. They
4 # recommend that small programs, < 300 lines, be licensed under the
5 # Apache License 2.0. This file contains or is part of one or more small
6 # programs. If a small program grows beyond 300 lines, I plan to switch
7 # its license to GPL.
8
9 # Copyright 2024 Ian Kelling
10
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
14
15 # http://www.apache.org/licenses/LICENSE-2.0
16
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22
23 # shellcheck source=/a/bin/ds/.bashrc
24 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
25
26
27 usage() {
28 cat <<EOF
29 Usage: ${0##*/} [DISTRO_NAME]
30 Print packages to install for each distro.
31 Default DISTRO_NAME is the one currently running.
32
33
34 -h|--help Print help and exit.
35
36 Note: Uses GNU getopt options parsing style
37 EOF
38 exit $1
39 }
40
41 if [[ $1 ]]; then
42 distro=$1
43 else
44 distro=$(distro-name)
45 fi
46
47 isdeb() {
48 case $distro in
49 debian|trisquel|ubuntu)
50 return 0
51 ;;
52 esac
53 return 1
54 }
55
56 temp=$(getopt -l help h "$@") || usage 1
57 eval set -- "$temp"
58 while true; do
59 case $1 in
60 -h|--help) usage ;;
61 --) shift; break ;;
62 *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
63 esac
64 done
65
66
67 case $distro in
68 arch)
69 # ubuntu 14.04 uses b-cron,
70 # but its not maintained in arch.
71 # of the ones in the main repos, cronie is only one maintained.
72 # fcron appears abandoned software.
73 e cronie
74 ;;
75 *) : ;; # other distros come with cron.
76 esac
77
78 case $distro in
79 arch) e tk ;;
80 *) : ;; # other distros come with tk from git
81 esac
82
83 case $distro in
84 arch) e the_silver_searcher ;;
85 debian|trisquel|ubuntu) e silversearcher-ag ;;
86 # fedora unknown
87 esac
88
89 if isdeb; then
90 # for debconf-get-selections
91 e debconf-utils
92 fi
93
94 if isdeb; then
95 e debian-goodies
96 fi
97
98 ###### quit now for li/lj
99 case $HOSTNAME in
100 lj|li)
101 exit 0
102 ;;
103 esac
104
105 case $distro in
106 debian) e gnome-session-flashback ;;
107 # flidas is missing dependency gnome-panel. others unknown
108 esac
109
110 case $distro in
111 debian)
112 e cpio-doc ;;
113 # not packaged in flidas. in ubuntu it is in multiverse
114 esac
115
116 case $distro in
117 fedora) e unrar ;;
118 *) e unrar-free ;;
119 esac
120
121 case $distro in
122 arch) e nfs-utils ;;
123 trisquel|ubuntu|debian) e nfs-common ;;
124 esac
125
126 case $distro in
127 trisquel|ubuntu|debian) e par2 ;;
128 arch|fedora) e par2cmdline ;;
129 esac
130
131 # for my tex resume. commented, due to t9 gnome causing package version conflict
132 # case $distro in
133 # trisquel|ubuntu|debian) e texlive-full ;;
134 # esac
135
136 case $distro in
137 # optional dep for firefox for h.264 video
138 arch) e gst-libav ;;
139 # other distros, probably come by default
140 esac
141
142 case $distro in
143 fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
144 arch) : ;;
145 esac
146
147
148 case $distro in
149 fedora) e pinentry-gtk ;;
150 *) : ;; # comes default or with other packages
151 esac
152
153
154 case $distro in
155 arch) e ttf-dejavu ;;
156 debian|trisquel|ubuntu) e fonts-dejavu ;;
157 # others unknown
158 esac
159
160
161 case $distro in
162 arch) e xorg-xev;;
163 debian|trisquel|ubuntu) e x11-utils ;;
164 # others unknown
165 esac
166
167 case $distro in
168 arch) e cdrkit;;
169 debian|trisquel|ubuntu) e genisoimage;;
170 # others unknown
171 esac
172
173 case $distro in
174 arch) e spice-gtk3 ;;
175 debian|trisquel|ubuntu) e spice-client-gtk;;
176 # others unknown
177 esac
178
179
180 ### stuff brought in through deps in other distros
181 case $distro in
182 arch)
183 # for nat networking in libvirt
184 e ebtables
185 # dmidecode just because syslog complains
186 e dmidecode
187 e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
188 # for dig
189 e bind-tools
190 ;;
191 esac
192
193 case $distro in
194 arch|debian|trisquel|ubuntu) e pumpa ;;
195 # others unknown. do have a buildscript:
196 # /a/bin/buildscripts/pumpa ;;
197 esac
198
199 case $distro in
200 debian|trisquel|ubuntu)
201 e libosinfo-bin;
202 ;;
203 # others unknown
204 esac
205
206 case $distro in
207 ubuntu|debian)
208 e spacefm-gtk3 ;;
209 arch)
210 e spacefm ;;
211 esac
212
213
214 case $(debian-codename) in
215 aramo)
216 e ncal ;;
217 esac