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