hello
[glcas.git] / plugins / knownos.php
1 <?php
2
3 // this class will provide OS knowledge - though how i have no idea yet
4 class GLCASKnownOS {
5         
6         function __construct()
7         {
8                 $knownOS = getKnownOSList();
9         }
10         
11         function getOSList()
12         {
13         }
14         
15         function getRepoTypeForOS($os)
16         {
17                 
18         }
19         
20         function getRepoTypes()
21         {
22                 
23         }
24         
25         public $knownOS;
26 }
27
28 function getKnownOSList()
29 {
30         // repo types
31         $kos["repotype"]["yum"] = "Yellowdog Updater Modified";
32         $kos["repotype"]["apt"] = "APT";
33
34         // repo providers
35         $kos["repotype"]["yum"][0] = "baseurl";
36         $kos["repotype"]["yum"][1] = "mirrorlist";
37         $kos["repotype"]["apt"][0] = "baseurl";
38         
39         // OS's
40         $kos["os"]["short"]["fedora"] = "Fedora";
41         $kos["os"]["short"]["debian"] = "Debian";
42         $kos["os"]["short"]["redhat"] = "RedHat";
43         $kos["os"]["short"]["ubuntu"] = "Ubuntu";
44         $kos["os"]["short"]["centos"] = "CentOS";
45         $kos["os"]["fedora"]["long"] = "Fedora";
46         $kos["os"]["debian"]["long"] = "Debian";
47         $kos["os"]["redhat"]["long"] = "RedHat Enterprise Linux";
48         $kos["os"]["ubuntu"]["long"] = "Ubuntu";
49         $kos["os"]["centos"]["long"] = "Community Enterprise OS";
50         
51         
52         // ubuntu bit for apt
53         $kos["apt"]["hardy"] = "Hardy Heron (8.04)";
54         $kos["apt"]["hardy-backports"] = "Hardy Heron (8.04) Backports";
55         $kos["apt"]["hardy-proposed"] = "Hardy Heron (8.04) Proposed";
56         $kos["apt"]["hardy-security"] = "Hardy Heron (8.04) Security";
57         $kos["apt"]["hardy-updates"] = "Hardy Heron (8.04) Updates";
58         $kos["apt"]["karmic"] = "Karmic Koala (9.10)";
59         $kos["apt"]["karmic-backports"] = "Karmic Koala (9.10) Backports";
60         $kos["apt"]["karmic-proposed"] = "Karmic Koala (9.10) Proposed";
61         $kos["apt"]["karmic-security"] = "Karmic Koala (9.10) Security";
62         $kos["apt"]["karmic-updates"] = "Karmic Koala (9.10) Updates";
63         $kos["apt"]["lucid"] = "Lucid Lynx (10.04 LTS)";
64         $kos["apt"]["lucid-backports"] = "Lucid Lynx (10.04 LTS) Backports";
65         $kos["apt"]["lucid-proposed"] = "Lucid Lynx (10.04 LTS) Proposed";
66         $kos["apt"]["lucid-security"] = "Lucid Lynx (10.04 LTS) Security";
67         $kos["apt"]["lucid-updates"] = "Lucid Lynx (10.04 LTS) Updates";
68         $kos["apt"]["maverick"] = "Maverick Meerkat (10.10)";
69         $kos["apt"]["maverick-backports"] = "Maverick Meerkat (10.10) Backports";
70         $kos["apt"]["maverick-proposed"] = "Maverick Meerkat (10.10) Proposed";
71         $kos["apt"]["maverick-security"] = "Maverick Meerkat (10.10) Security";
72         $kos["apt"]["maverick-updates"] = "Maverick Meerkat (10.10) Updates";
73         $kos["apt"]["natty"] = "Natty Narwhal (11.04)";
74         $kos["apt"]["natty-backports"] = "Natty Narwhal (11.04) Backports";
75         $kos["apt"]["natty-proposed"] = "Natty Narwhal (11.04) Proposed";
76         $kos["apt"]["natty-security"] = "Natty Narwhal (11.04) Security";
77         $kos["apt"]["natty-updates"] = "Natty Narwhal (11.04) Updates";
78         $kos["apt"]["oneiric"] = "Oneiric Ocelot (11.10)";
79         $kos["apt"]["oneiric-backports"] = "Oneiric Ocelot (11.10) Backports";
80         $kos["apt"]["oneiric-proposed"] = "Oneiric Ocelot (11.10) Proposed";
81         $kos["apt"]["oneiric-security"] = "Oneiric Ocelot (11.10) Security";
82         $kos["apt"]["oneiric-updates"] = "Oneiric Ocelot (11.10) Updates";
83         $kos["apt"]["lenny"] = "Debian Lenny";
84         $kos["apt"]["sid"] = "Debian Sid";
85         $kos["apt"]["squeeze"] = "Debian Squeeze";
86         $kos["apt"]["wheezy"] = "Debian Wheezy";
87         $kos["apt"]["stable"] = "Debian Stable";
88         $kos["apt"]["unstable"] = "Debian Unstable";
89         
90         
91
92                                 
93         
94         // Repo types per os
95         $kos["os"]["Fedora"]["repotype"] = "yum";
96         $kos["os"]["Debian"]["repotype"] = "apt";
97         $kos["os"]["RedHat"]["repotype"] = "yum";
98         $kos["os"]["Ubuntu"]["repotype"] = "apt";
99         $kos["os"]["CentOS"]["repotype"] = "yum";
100         
101         // architectyres
102         $kos["arch"]["intel32"] = "i386";
103         $kos["arch"]["amdcrazy"] = "i586";
104         $kos["arch"]["amd64"] = "x86_64";
105         $kos["arch"]["amd64_2"] = "amd64";
106         
107         
108         
109         return $kos;
110 }
111
112 ?>