b6dd89ca0bbe819b136b7df35d49a513f95333af
[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         // TODO uncomment these ones out of testing
54         /*$kos["apt"]["hardy"] = "Hardy Heron (8.04 LTS)";
55         $kos["apt"]["hardy-backports"] = "Hardy Heron (8.04 LTS) Backports";
56         $kos["apt"]["hardy-proposed"] = "Hardy Heron (8.04 LTS) Proposed";
57         $kos["apt"]["hardy-security"] = "Hardy Heron (8.04 LTS) Security";
58         $kos["apt"]["hardy-updates"] = "Hardy Heron (8.04 LTS) Updates";
59         $kos["apt"]["karmic"] = "Karmic Koala (9.10)";
60         $kos["apt"]["karmic-backports"] = "Karmic Koala (9.10) Backports";
61         $kos["apt"]["karmic-proposed"] = "Karmic Koala (9.10) Proposed";
62         $kos["apt"]["karmic-security"] = "Karmic Koala (9.10) Security";
63         $kos["apt"]["karmic-updates"] = "Karmic Koala (9.10) Updates";
64         $kos["apt"]["lucid"] = "Lucid Lynx (10.04 LTS)";
65         $kos["apt"]["lucid-backports"] = "Lucid Lynx (10.04 LTS) Backports";
66         $kos["apt"]["lucid-proposed"] = "Lucid Lynx (10.04 LTS) Proposed";
67         $kos["apt"]["lucid-security"] = "Lucid Lynx (10.04 LTS) Security";
68         $kos["apt"]["lucid-updates"] = "Lucid Lynx (10.04 LTS) Updates";
69         $kos["apt"]["maverick"] = "Maverick Meerkat (10.10)";
70         $kos["apt"]["maverick-backports"] = "Maverick Meerkat (10.10) Backports";
71         $kos["apt"]["maverick-proposed"] = "Maverick Meerkat (10.10) Proposed";
72         $kos["apt"]["maverick-security"] = "Maverick Meerkat (10.10) Security";
73         $kos["apt"]["maverick-updates"] = "Maverick Meerkat (10.10) Updates";*/
74         $kos["apt"]["natty"] = "Natty Narwhal (11.04)";
75         $kos["apt"]["natty-backports"] = "Natty Narwhal (11.04) Backports";
76         $kos["apt"]["natty-proposed"] = "Natty Narwhal (11.04) Proposed";
77         $kos["apt"]["natty-security"] = "Natty Narwhal (11.04) Security";
78         $kos["apt"]["natty-updates"] = "Natty Narwhal (11.04) Updates";
79         /*$kos["apt"]["oneiric"] = "Oneiric Ocelot (11.10)";
80         $kos["apt"]["oneiric-backports"] = "Oneiric Ocelot (11.10) Backports";
81         $kos["apt"]["oneiric-proposed"] = "Oneiric Ocelot (11.10) Proposed";
82         $kos["apt"]["oneiric-security"] = "Oneiric Ocelot (11.10) Security";
83         $kos["apt"]["oneiric-updates"] = "Oneiric Ocelot (11.10) Updates";
84         $kos["apt"]["lenny"] = "Debian Lenny";
85         $kos["apt"]["sid"] = "Debian Sid";
86         $kos["apt"]["squeeze"] = "Debian Squeeze";
87         $kos["apt"]["wheezy"] = "Debian Wheezy";
88         $kos["apt"]["stable"] = "Debian Stable";
89         $kos["apt"]["unstable"] = "Debian Unstable";*/
90         
91         
92
93                                 
94         
95         // Repo types per os
96         $kos["os"]["Fedora"]["repotype"] = "yum";
97         $kos["os"]["Debian"]["repotype"] = "apt";
98         $kos["os"]["RedHat"]["repotype"] = "yum";
99         $kos["os"]["Ubuntu"]["repotype"] = "apt";
100         $kos["os"]["CentOS"]["repotype"] = "yum";
101         
102         // architectyres
103         $kos["arch"]["intel32"] = "i386";
104         $kos["arch"]["amdcrazy"] = "i586";
105         $kos["arch"]["amd64"] = "x86_64";
106         $kos["arch"]["amd64_2"] = "amd64";
107         
108         
109         
110         return $kos;
111 }
112
113 ?>