/[packages]/cauldron/meta-task/current/SOURCES/compssUsers.pl
ViewVC logotype

Annotation of /cauldron/meta-task/current/SOURCES/compssUsers.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1672712 - (hide annotations) (download)
Thu Jan 21 00:13:10 2021 UTC (3 years, 2 months ago) by tmb
File MIME type: text/plain
File size: 9868 byte(s)
restore database section again, as its not a duplicate, its by design
1 ennael 37571 package tmp::compssUsers;
2    
3 tv 555755 use lib qw(/usr/lib/libDrakX);
4 ennael 37571 use common;
5 tv 388363 use install::pkgs;
6 tv 555755 # perl_checker: use detect_devices
7 ennael 37571
8     my $low_resources = detect_devices::has_low_resources();
9     my $netbook_desktop = detect_devices::is_netbook_nettop();
10     my $light_desktop = detect_devices::need_light_desktop();
11     my $meta_class = $::o->{meta_class};
12     my $powerpack = $meta_class eq 'powerpack';
13     my $server = $meta_class eq 'server';
14    
15     my $h = {
16     N_("Workstation") =>
17     [
18     { label => N_("Office Workstation"),
19     descr =>
20 tv 99702 N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"),
21 ennael 37571 flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ],
22     default_selected => 1,
23 tv 388363 required => [ qw(libreoffice-writer abiword) ],
24 ennael 37571 },
25     if_(!$server,
26     { label => N_("Game station"),
27     descr => N_("Amusement programs: arcade, boards, strategy, etc"),
28     flags => [ qw(GAMES) ],
29     },
30     { label => N_("Multimedia station"),
31     descr => N_("Sound and video playing/editing programs"),
32     flags => [ qw(AUDIO VIDEO GRAPHICS VIDEO_EDITING) ],
33     default_selected => 1,
34     },
35     ),
36     { label => N_("Internet station"),
37     descr => N_("Set of tools to read and send mail and news (mutt, tin..) and to browse the Web"),
38     flags => [ qw(NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS) ],
39     default_selected => 1,
40     },
41     if_(!$server,
42     { label => N_("Network Computer (client)"),
43     descr => N_("Clients for different protocols including ssh"),
44     flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ],
45     default_selected => $powerpack,
46 tv 388363 required => [ qw(openssh-clients samba-client) ],
47 ennael 37571 },
48     { label => N_("Configuration"),
49     descr => N_("Tools to ease the configuration of your computer"),
50     flags => [ qw(CONFIG) ],
51     default_selected => 1,
52     },
53     { label => N_("Console Tools"),
54     descr => N_("Editors, shells, file tools, terminals"),
55     flags => [ qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS) ],
56     default_selected => 1,
57     },
58     { label => N_("Development"),
59     descr => N_("C and C++ development libraries, programs and include files"),
60     flags => [ qw(DEVELOPMENT EDITORS) ],
61 tv 388363 required => [ 'make' ],
62 ennael 37571 },
63     { label => N_("Documentation"),
64     descr => N_("Books and Howto's on Linux and Free Software"),
65     flags => [ qw(BOOKS) ],
66     default_selected => !$light_desktop,
67     },
68     { label => N_("LSB"),
69     descr => N_("Linux Standard Base. Third party applications support"),
70     flags => [ qw(LSB) ],
71 tv 1037420 required => [ 'lsb-core-' . get_libdir() ],
72 ennael 37571 },
73     ),
74     ],
75    
76     N_("Server") =>
77     [
78     $server ? (
79     { label => N_("Web Server"),
80     descr => N_("Apache"),
81     flags => [ qw(NETWORKING_WWW_SERVER) ],
82 tv 388363 required => [ qw(apache lftp mirrordir rsync) ],
83 ennael 37571 },
84     { label => N_("Groupware"),
85     descr => N_("Kolab Server"),
86     flags => [ qw(NETWORKING_GROUPWARE_SERVER) ],
87     },
88     { label => N_("Firewall/Router"),
89     descr => N_("Internet gateway"),
90     flags => [ qw(NETWORKING_FIREWALLING_SERVER) ],
91     },
92     { label => N_("Mail/News"),
93     descr => N_("Postfix mail server, Inn news server"),
94     flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ],
95 tv 388363 required => [ 'postfix' ],
96 ennael 37571 },
97     { label => N_("Directory Server"),
98     descr => N_("LDAP Server"),
99     flags => [ qw(NETWORKING_LDAP_SERVER) ],
100 tv 388363 required => [ 'openldap-servers' ],
101 ennael 37571 },
102     { label => N_("FTP Server"),
103     descr => N_("ProFTPd"),
104     flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ],
105 tv 388363 required => [ 'proftpd' ],
106 ennael 37571 },
107     { label => N_("DNS/NIS"),
108     descr => N_("Domain Name and Network Information Server"),
109     flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ],
110 tv 388363 required => [ 'bind' ],
111 ennael 37571 },
112     { label => N_("File and Printer Sharing Server"),
113     descr => N_("NFS Server, Samba server"),
114     flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ],
115 tv 1037194 required => [ qw(nfs-utils cups samba) ],
116 ennael 37571 },
117     { label => N_("Database"),
118 ennael 235001 descr => N_("PostgreSQL and MariaDB Database Server"),
119 ennael 37571 flags => [ qw(DATABASES DATABASES_SERVER) ],
120 luigiwalser 1646659 required => [ qw(postgresql13 mariadb) ],
121 ennael 37571 },
122     ) : (
123     { label => N_("Web/FTP"),
124     descr => N_("Apache, Pro-ftpd"),
125     flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ],
126 tv 388363 required => [ qw(apache proftpd rsync) ],
127 ennael 37571 },
128     { label => N_("Mail"),
129     descr => N_("Postfix mail server"),
130     flags => [ qw(NETWORKING_MAIL_SERVER) ],
131 tv 388363 required => [ 'postfix' ],
132 ennael 37571 },
133 tmb 1672712 { label => N_("Database"),
134     descr => N_("PostgreSQL or MariaDB database server"),
135     flags => [ qw(DATABASES DATABASES_SERVER) ],
136     required => [ qw(postgresql13 mariadb) ],
137     },
138 ennael 37571 { label => N_("Firewall/Router"),
139     descr => N_("Internet gateway"),
140     flags => [ qw(NETWORKING_FIREWALLING_SERVER) ],
141     },
142     { label => N_("Network Computer server"),
143     descr => N_("NFS server, SMB server, Proxy server, ssh server"),
144     flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],
145 tv 388363 required => [ qw(nfs-utils cups samba-server openssh-server) ],
146 ennael 37571 },
147     ),
148     ],
149    
150     N_("Graphical Environment") =>
151     [
152 neoclust 870527 { label => N_("Plasma Workstation"),
153 ennael 37571 descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"),
154 neoclust 873836 flags => [ qw(PLASMA5 X ACCESSIBILITY THEMES) ],
155 ennael 1081012 default_selected => !$light_desktop,
156 neoclust 870527 required => [ 'task-plasma5-minimal' ],
157 ennael 37571 },
158     { label => N_("GNOME Workstation"),
159     descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
160     flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ],
161     default_selected => $netbook_desktop,
162 tv 388363 required => [ 'task-gnome-minimal' ],
163 ennael 37571 },
164 marja 1318180 { label => N_("Xfce Workstation"),
165 djennings 468960 descr => N_("A lighter graphical environment with user-friendly set of applications and desktop tools"),
166     flags => [ qw(XFCE X THEMES ACCESSIBILITY) ],
167     required => [ 'task-xfce-minimal' ],
168     },
169     { label => N_("MATE Workstation"),
170     descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
171     flags => [ qw(MATE X THEMES ACCESSIBILITY) ],
172     required => [ 'task-mate-minimal' ],
173     },
174 djennings 470893 { label => N_("Cinnamon Workstation"),
175     descr => N_("A graphical environment based on GNOME"),
176     flags => [ qw(CINNAMON X THEMES ACCESSIBILITY) ],
177     required => [ 'task-cinnamon-minimal' ],
178     },
179 doktor5000 942205 { label => N_("LXQt Desktop"),
180 doktor5000 656028 flags => [ qw(LXQT X ACCESSIBILITY) ],
181     descr => N_("A next generation QT port of the lightweight desktop environment"),
182     required => [ 'task-lxqt' ],
183 djennings 468960 },
184 martinw 1332553 { label => N_("Enlightenment Desktop"),
185 wally 1090974 flags => [ qw(ENLIGHTENMENT X ACCESSIBILITY) ],
186 djennings 468960 descr => N_("A lightweight fast graphical environment with a dedicated following"),
187 tv 1037195 required => [ 'task-enlightenment-minimal' ],
188 djennings 468960 },
189 ennael 568542 { label => N_("LXDE Desktop"),
190     flags => [ qw(LXDE X ACCESSIBILITY) ],
191     descr => N_("A lightweight fast graphical environment"),
192     required => [ 'task-lxde' ],
193     },
194 ennael 37571 { label => N_("Other Graphical Desktops"),
195 djennings 468960 descr => N_("Window Maker, Fvwm, etc"),
196     flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY) ],
197 ennael 37571 },
198     ],
199    
200     if_($server,
201     N_("Development") =>
202     [
203     { label => N_("Development"),
204     descr => N_("C and C++ development libraries, programs and include files"),
205     flags => [ qw(DEVELOPMENT EDITORS) ],
206     default_selected => 1,
207     },
208     { label => N_("Documentation"),
209     descr => N_("Books and Howto's on Linux and Free Software"),
210     flags => [ qw(BOOKS) ],
211     },
212     { label => N_("LSB"),
213     descr => N_("Linux Standard Base. Third party applications support"),
214     flags => [ qw(LSB) ],
215     },
216     ],
217    
218     N_("Utilities") =>
219     [
220     { label => N_("SSH Server"),
221     descr => N_("SSH Server"),
222     flags => [ qw(NETWORKING_REMOTE_ACCESS_SERVER) ],
223     default_selected => 1,
224     },
225     { label => N_("Webmin"),
226     descr => N_("Webmin Remote Configuration Server"),
227     flags => [ qw(WEBMIN) ],
228     default_selected => 1,
229     },
230     { label => N_("Network Utilities/Monitoring"),
231     descr => N_("Monitoring tools, processes accounting, tcpdump, nmap, ..."),
232     flags => [ qw(MONITORING NETWORKING_FILE) ],
233     default_selected => 1,
234     },
235 ennael 38828 { label => N_("Mageia Wizards"),
236 ennael 37571 descr => N_("Wizards to configure server"),
237     flags => [ qw(WIZARDS) ],
238     default_selected => 1,
239     },
240     ],
241     ),
242     };
243    
244     foreach my $path (keys %$h) {
245     foreach (@{$h->{$path}}) {
246     $_->{path} = $path;
247     $_->{uid} = join('|', $path, $_->{label});
248     }
249     }
250    
251 tv 388363 sub _filter {
252 tv 555751 grep { $_->{required} ? (any { install::pkgs::packageByName($::o->{packages}, $_) } @{$_->{required}}) : 1 } map { @$_ } @_;
253 tv 388363 }
254 ennael 37571
255 tv 388363 my $compssUsers = [ _filter(values %$h) ];
256    
257 ennael 37571 my $gtk_display_compssUsers = sub {
258     my ($entry) = @_;
259    
260 tv 553062 require ugtk3;
261     ugtk3->import(qw(:helpers :wrappers :create));
262     require mygtk3;
263     mygtk3->import(qw(gtknew));
264 ennael 37571
265     my $entries_in_path = sub {
266     my ($path) = @_;
267 tv 389193 my @items = map { $entry->($_) } _filter($h->{$path});
268 ennael 37571
269     # ensure we have an even number of items:
270     if (@items % 2) {
271     my @last_items = (pop @items, gtknew('Label'));
272     # RTL support:
273     @last_items = reverse @last_items if lang::text_direction_rtl();
274     push @items, @last_items;
275     }
276    
277 tv 555687 gtknew('Expander', use_markup => 1, text => mygtk3::title1_to_markup(translate($path)), child =>
278     gtknew('Table', children => [ group_by2(@items) ], homogeneous => 1)),
279 tv 553062 Gtk3::HSeparator->new;
280 ennael 37571 };
281    
282 tv 553062 gtkpack__(Gtk3::VBox->new,
283 tv 555753 $entries_in_path->('Workstation'),
284 tv 555754 $entries_in_path->('Server'),
285 tv 555753 $entries_in_path->('Graphical Environment'),
286     $server ? (
287     $entries_in_path->('Development'),
288     $entries_in_path->('Utilities'),
289     ) : (
290     ),
291 ennael 37571 );
292     };
293    
294     $compssUsers, $gtk_display_compssUsers;

  ViewVC Help
Powered by ViewVC 1.1.30