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