1 |
package tmp::compssUsers; |
package tmp::compssUsers; |
2 |
|
|
3 |
use common; |
use common; |
4 |
|
use install::pkgs; |
5 |
|
|
6 |
my $low_resources = detect_devices::has_low_resources(); |
my $low_resources = detect_devices::has_low_resources(); |
7 |
my $netbook_desktop = detect_devices::is_netbook_nettop(); |
my $netbook_desktop = detect_devices::is_netbook_nettop(); |
18 |
N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"), |
N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"), |
19 |
flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ], |
flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ], |
20 |
default_selected => 1, |
default_selected => 1, |
21 |
|
required => [ qw(libreoffice-writer abiword) ], |
22 |
}, |
}, |
23 |
if_(!$server, |
if_(!$server, |
24 |
{ label => N_("Game station"), |
{ label => N_("Game station"), |
41 |
descr => N_("Clients for different protocols including ssh"), |
descr => N_("Clients for different protocols including ssh"), |
42 |
flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ], |
flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ], |
43 |
default_selected => $powerpack, |
default_selected => $powerpack, |
44 |
|
required => [ qw(openssh-clients samba-client) ], |
45 |
}, |
}, |
46 |
{ label => N_("Configuration"), |
{ label => N_("Configuration"), |
47 |
descr => N_("Tools to ease the configuration of your computer"), |
descr => N_("Tools to ease the configuration of your computer"), |
56 |
{ label => N_("Development"), |
{ label => N_("Development"), |
57 |
descr => N_("C and C++ development libraries, programs and include files"), |
descr => N_("C and C++ development libraries, programs and include files"), |
58 |
flags => [ qw(DEVELOPMENT EDITORS) ], |
flags => [ qw(DEVELOPMENT EDITORS) ], |
59 |
|
required => [ 'make' ], |
60 |
}, |
}, |
61 |
{ label => N_("Documentation"), |
{ label => N_("Documentation"), |
62 |
descr => N_("Books and Howto's on Linux and Free Software"), |
descr => N_("Books and Howto's on Linux and Free Software"), |
66 |
{ label => N_("LSB"), |
{ label => N_("LSB"), |
67 |
descr => N_("Linux Standard Base. Third party applications support"), |
descr => N_("Linux Standard Base. Third party applications support"), |
68 |
flags => [ qw(LSB) ], |
flags => [ qw(LSB) ], |
69 |
|
required => [ 'lsb-core' ], |
70 |
}, |
}, |
71 |
), |
), |
72 |
], |
], |
77 |
{ label => N_("Web Server"), |
{ label => N_("Web Server"), |
78 |
descr => N_("Apache"), |
descr => N_("Apache"), |
79 |
flags => [ qw(NETWORKING_WWW_SERVER) ], |
flags => [ qw(NETWORKING_WWW_SERVER) ], |
80 |
|
required => [ qw(apache lftp mirrordir rsync) ], |
81 |
}, |
}, |
82 |
{ label => N_("Groupware"), |
{ label => N_("Groupware"), |
83 |
descr => N_("Kolab Server"), |
descr => N_("Kolab Server"), |
90 |
{ label => N_("Mail/News"), |
{ label => N_("Mail/News"), |
91 |
descr => N_("Postfix mail server, Inn news server"), |
descr => N_("Postfix mail server, Inn news server"), |
92 |
flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ], |
flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ], |
93 |
|
required => [ 'postfix' ], |
94 |
}, |
}, |
95 |
{ label => N_("Directory Server"), |
{ label => N_("Directory Server"), |
96 |
descr => N_("LDAP Server"), |
descr => N_("LDAP Server"), |
97 |
flags => [ qw(NETWORKING_LDAP_SERVER) ], |
flags => [ qw(NETWORKING_LDAP_SERVER) ], |
98 |
|
required => [ 'openldap-servers' ], |
99 |
}, |
}, |
100 |
{ label => N_("FTP Server"), |
{ label => N_("FTP Server"), |
101 |
descr => N_("ProFTPd"), |
descr => N_("ProFTPd"), |
102 |
flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ], |
flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ], |
103 |
|
required => [ 'proftpd' ], |
104 |
}, |
}, |
105 |
{ label => N_("DNS/NIS"), |
{ label => N_("DNS/NIS"), |
106 |
descr => N_("Domain Name and Network Information Server"), |
descr => N_("Domain Name and Network Information Server"), |
107 |
flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ], |
flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ], |
108 |
|
required => [ 'bind' ], |
109 |
}, |
}, |
110 |
{ label => N_("File and Printer Sharing Server"), |
{ label => N_("File and Printer Sharing Server"), |
111 |
descr => N_("NFS Server, Samba server"), |
descr => N_("NFS Server, Samba server"), |
112 |
flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ], |
flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ], |
113 |
|
required => [ qw(nfs-utils cups samba-server) ], |
114 |
}, |
}, |
115 |
{ label => N_("Database"), |
{ label => N_("Database"), |
116 |
descr => N_("PostgreSQL and MariaDB Database Server"), |
descr => N_("PostgreSQL and MariaDB Database Server"), |
117 |
flags => [ qw(DATABASES DATABASES_SERVER) ], |
flags => [ qw(DATABASES DATABASES_SERVER) ], |
118 |
|
required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], |
119 |
}, |
}, |
120 |
) : ( |
) : ( |
121 |
{ label => N_("Web/FTP"), |
{ label => N_("Web/FTP"), |
122 |
descr => N_("Apache, Pro-ftpd"), |
descr => N_("Apache, Pro-ftpd"), |
123 |
flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ], |
flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ], |
124 |
|
required => [ qw(apache proftpd rsync) ], |
125 |
}, |
}, |
126 |
{ label => N_("Mail"), |
{ label => N_("Mail"), |
127 |
descr => N_("Postfix mail server"), |
descr => N_("Postfix mail server"), |
128 |
flags => [ qw(NETWORKING_MAIL_SERVER) ], |
flags => [ qw(NETWORKING_MAIL_SERVER) ], |
129 |
|
required => [ 'postfix' ], |
130 |
}, |
}, |
131 |
{ label => N_("Database"), |
{ label => N_("Database"), |
132 |
descr => N_("PostgreSQL or MariaDB database server"), |
descr => N_("PostgreSQL or MariaDB database server"), |
133 |
flags => [ qw(DATABASES DATABASES_SERVER) ], |
flags => [ qw(DATABASES DATABASES_SERVER) ], |
134 |
|
required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], |
135 |
}, |
}, |
136 |
{ label => N_("Firewall/Router"), |
{ label => N_("Firewall/Router"), |
137 |
descr => N_("Internet gateway"), |
descr => N_("Internet gateway"), |
140 |
{ label => N_("Network Computer server"), |
{ label => N_("Network Computer server"), |
141 |
descr => N_("NFS server, SMB server, Proxy server, ssh server"), |
descr => N_("NFS server, SMB server, Proxy server, ssh server"), |
142 |
flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ], |
flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ], |
143 |
|
required => [ qw(nfs-utils cups samba-server openssh-server) ], |
144 |
}, |
}, |
145 |
), |
), |
146 |
], |
], |
151 |
descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"), |
descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"), |
152 |
flags => [ qw(KDE X ACCESSIBILITY THEMES) ], |
flags => [ qw(KDE X ACCESSIBILITY THEMES) ], |
153 |
default_selected => !$light_desktop, |
default_selected => !$light_desktop, |
154 |
|
required => [ 'task-kde4-minimal' ], |
155 |
}, |
}, |
156 |
{ label => N_("GNOME Workstation"), |
{ label => N_("GNOME Workstation"), |
157 |
descr => N_("A graphical environment with user-friendly set of applications and desktop tools"), |
descr => N_("A graphical environment with user-friendly set of applications and desktop tools"), |
158 |
flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ], |
flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ], |
159 |
default_selected => $netbook_desktop, |
default_selected => $netbook_desktop, |
160 |
|
required => [ 'task-gnome-minimal' ], |
161 |
}, |
}, |
162 |
{ label => N_("LXDE Desktop"), |
{ label => N_("LXDE Desktop"), |
163 |
flags => [ qw(LXDE X ACCESSIBILITY) ], |
flags => [ qw(LXDE X ACCESSIBILITY) ], |
221 |
} |
} |
222 |
} |
} |
223 |
|
|
224 |
my $compssUsers = [ map { @$_ } values %$h ]; |
sub _filter { |
225 |
|
grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1 } map { @$_ } @_; |
226 |
|
} |
227 |
|
|
228 |
|
my $compssUsers = [ _filter(values %$h) ]; |
229 |
|
|
230 |
my $gtk_display_compssUsers = sub { |
my $gtk_display_compssUsers = sub { |
231 |
my ($entry) = @_; |
my ($entry) = @_; |
237 |
|
|
238 |
my $entries_in_path = sub { |
my $entries_in_path = sub { |
239 |
my ($path) = @_; |
my ($path) = @_; |
240 |
my @items = map { $entry->($_) } @{$h->{$path}}; |
my @items = map { $entry->($_) } @{ [ _filter($h->{$path}) ] }; |
241 |
|
|
242 |
# ensure we have an even number of items: |
# ensure we have an even number of items: |
243 |
if (@items % 2) { |
if (@items % 2) { |