various fixes
[distro-setup] / distro-pkgs
1 #!/bin/bash
2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
5
6
7 usage() {
8 cat <<EOF
9 Usage: ${0##*/} [DISTRO_NAME]
10 Print packages to install for each distro.
11 Default DISTRO_NAME is the one currently running.
12
13
14 -h|--help Print help and exit.
15
16 Note: Uses GNU getopt options parsing style
17 EOF
18 exit $1
19 }
20
21 if [[ $1 ]]; then
22 distro=$1
23 else
24 distro=$(distro-name)
25 fi
26
27 isdeb() {
28 case $distro in
29 debian|trisquel|ubuntu)
30 return 0
31 ;;
32 esac
33 return 1
34 }
35
36 bool_opt=false # default
37 long_opt=foo # default
38 temp=$(getopt -l help,long-opt: hso: "$@") || usage 1
39 eval set -- "$temp"
40 while true; do
41 case $1 in
42 -s) bool_opt=true; shift ;;
43 -o|--long-opt) long_opt="$2"; shift 2 ;;
44 -h|--help) usage ;;
45 --) shift; break ;;
46 *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
47 esac
48 done
49
50
51 case $distro in
52 arch)
53 # ubuntu 14.04 uses b-cron,
54 # but its not maintained in arch.
55 # of the ones in the main repos, cronie is only one maintained.
56 # fcron appears abandoned software.
57 e cronie
58 ;;
59 *) : ;; # other distros come with cron.
60 esac
61
62 case $distro in
63 arch) e tk ;;
64 *) : ;; # other distros come with tk from git
65 esac
66
67 case $distro in
68 arch) e the_silver_searcher ;;
69 debian|trisquel|ubuntu) e silversearcher-ag ;;
70 # fedora unknown
71 esac
72
73 if isdeb; then
74 # for debconf-get-selections
75 e debconf-utils
76 fi
77
78 # needed for checkrestart
79 if isdeb; then
80 e debian-goodies
81 fi
82
83 ###### quit now for li/lj
84 case $HOSTNAME in
85 lj|li)
86 exit 0
87 ;;
88 esac
89
90 case $distro in
91 debian) e gnome-session-flashback ;;
92 # flidas is missing dependency gnome-panel. others unknown
93 esac
94
95 case $distro in
96 trisquel|ubuntu|debian) e ack-grep ;;
97 arch|fedora) e ack ;;
98 # fedora unknown
99 esac
100
101 case $distro in
102 debian)
103 e cpio-doc ;;
104 # not packaged in flidas. in ubuntu it is in multiverse
105 esac
106
107 case $distro in
108 fedora) e unrar ;;
109 *) e unrar-free ;;
110 esac
111
112 case $distro in
113 trisquel|ubuntu)
114 # for gui bug reporting
115 e python-vte
116 ;;
117 debian)
118 e reportbug-gtk
119 ;;
120 # no equivalent in other distros:
121 esac
122
123 case $distro in
124 arch) e nfs-utils ;;
125 trisquel|ubuntu|debian) e nfs-common ;;
126 esac
127
128 case $distro in
129 trisquel|ubuntu|debian) e par2 ;;
130 arch|fedora) e par2cmdline ;;
131 esac
132
133 # needed for my tex resume
134 case $distro in
135 trisquel|ubuntu|debian) e texlive-full ;;
136 arch) e texlive-most ;;
137 # fedora unknown
138 esac
139
140 case $distro in
141 # optional dep for firefox for h.264 video
142 arch) e gst-libav ;;
143 # other distros, probably come by default
144 esac
145
146 case $distro in
147 fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
148 arch) : ;;
149 esac
150
151
152 case $distro in
153 fedora) e pinentry-gtk ;;
154 *) : ;; # comes default or with other packages
155 esac
156
157
158 case $distro in
159 arch) e ttf-dejavu ;;
160 debian|trisquel|ubuntu) e fonts-dejavu ;;
161 # others unknown
162 esac
163
164
165 case $distro in
166 arch) e xorg-xev;;
167 debian|trisquel|ubuntu) e x11-utils ;;
168 # others unknown
169 esac
170
171 case $distro in
172 arch) e cdrkit;;
173 debian|trisquel|ubuntu) e genisoimage;;
174 # others unknown
175 esac
176
177 case $distro in
178 arch) e spice-gtk3 ;;
179 debian|trisquel|ubuntu) e spice-client-gtk;;
180 # others unknown
181 esac
182
183
184 ### stuff brought in through deps in other distros
185 case $distro in
186 arch)
187 # for nat networking in libvirt
188 e ebtables
189 # dmidecode just because syslog complains
190 e dmidecode
191 e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
192 # for dig
193 e bind-tools
194 ;;
195 esac
196
197 case $distro in
198 arch|debian|trisquel|ubuntu) e pumpa ;;
199 # others unknown. do have a buildscript:
200 # /a/bin/buildscripts/pumpa ;;
201 esac
202
203 case $distro in
204 debian) e adb ;;
205 debian|trisquel|ubuntu) e android-tools-adbd ;;
206 # todo: not sure this is needed anymore, or if trisqel etc works even
207 # debian) e android-tools-adbd/unstable ;;
208 arch) e android-tools ;;
209 # other distros unknown
210 esac
211
212
213 case $distro in
214 debian|trisquel|ubuntu)
215 e libosinfo-bin;
216 ;;
217 # others unknown
218 esac
219
220 case $distro in
221 ubuntu|debian)
222 e spacefm-gtk3 ;;
223 arch)
224 e spacefm ;;
225 esac