606fc5d8321e2196fb37af0ce85104522bad2f11
[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 # needed for checkrestart
76 if isdeb; then
77 e debian-goodies
78 fi
79
80 ###### quit now for li/lj
81 case $HOSTNAME in
82 lj|li)
83 exit 0
84 ;;
85 esac
86
87 case $distro in
88 debian) e gnome-session-flashback ;;
89 # flidas is missing dependency gnome-panel. others unknown
90 esac
91
92 case $distro in
93 trisquel|ubuntu|debian) e ack-grep ;;
94 arch|fedora) e ack ;;
95 # fedora unknown
96 esac
97
98 case $distro in
99 debian)
100 e cpio-doc ;;
101 # not packaged in flidas. in ubuntu it is in multiverse
102 esac
103
104 case $distro in
105 fedora) e unrar ;;
106 *) e unrar-free ;;
107 esac
108
109 case $distro in
110 arch) e nfs-utils ;;
111 trisquel|ubuntu|debian) e nfs-common ;;
112 esac
113
114 case $distro in
115 trisquel|ubuntu|debian) e par2 ;;
116 arch|fedora) e par2cmdline ;;
117 esac
118
119 # for my tex resume. commented, due to t9 gnome causing package version conflict
120 # case $distro in
121 # trisquel|ubuntu|debian) e texlive-full ;;
122 # esac
123
124 case $distro in
125 # optional dep for firefox for h.264 video
126 arch) e gst-libav ;;
127 # other distros, probably come by default
128 esac
129
130 case $distro in
131 fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
132 arch) : ;;
133 esac
134
135
136 case $distro in
137 fedora) e pinentry-gtk ;;
138 *) : ;; # comes default or with other packages
139 esac
140
141
142 case $distro in
143 arch) e ttf-dejavu ;;
144 debian|trisquel|ubuntu) e fonts-dejavu ;;
145 # others unknown
146 esac
147
148
149 case $distro in
150 arch) e xorg-xev;;
151 debian|trisquel|ubuntu) e x11-utils ;;
152 # others unknown
153 esac
154
155 case $distro in
156 arch) e cdrkit;;
157 debian|trisquel|ubuntu) e genisoimage;;
158 # others unknown
159 esac
160
161 case $distro in
162 arch) e spice-gtk3 ;;
163 debian|trisquel|ubuntu) e spice-client-gtk;;
164 # others unknown
165 esac
166
167
168 ### stuff brought in through deps in other distros
169 case $distro in
170 arch)
171 # for nat networking in libvirt
172 e ebtables
173 # dmidecode just because syslog complains
174 e dmidecode
175 e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
176 # for dig
177 e bind-tools
178 ;;
179 esac
180
181 case $distro in
182 arch|debian|trisquel|ubuntu) e pumpa ;;
183 # others unknown. do have a buildscript:
184 # /a/bin/buildscripts/pumpa ;;
185 esac
186
187 case $distro in
188 debian|trisquel|ubuntu)
189 e libosinfo-bin;
190 ;;
191 # others unknown
192 esac
193
194 case $distro in
195 ubuntu|debian)
196 e spacefm-gtk3 ;;
197 arch)
198 e spacefm ;;
199 esac