summaryrefslogtreecommitdiff
path: root/index.php
blob: 2a3e93767833749a5cabf115886049d40f4aa8e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<?php
require_once "init.php";

require_once BASE . "/lib/mysql.php";
require_once BASE . "/lib/style.php";
require_once BASE . "/lib/format.php";

$result = mysql_run_query(
  'SELECT `binary_packages`.`pkgname`,' .
  '`binary_packages`.`epoch`,' .
  '`binary_packages`.`pkgver`,' .
  '`binary_packages`.`pkgrel`,' .
  '`binary_packages`.`sub_pkgrel`,' .
  '`binary_packages`.`sub_pkgrel_omitted`,' .
  '`repositories`.`name` AS `repo`,' .
  '`architectures`.`name` AS `arch`' .
  ' FROM `binary_packages`' .
  mysql_join_binary_packages_binary_packages_in_repositories() .
  mysql_join_binary_packages_in_repositories_repositories() .
  mysql_join_repositories_architectures() .
  mysql_join_repositories_repository_stabilities() .
  ' WHERE `repositories`.`is_on_master_mirror`' .
  ' AND `repository_stabilities`.`name` IN ("stable","testing")' .
  ' ORDER BY `last_moved` DESC' .
  ' LIMIT 15'
);
$package_updates = array();
while ($row = $result -> fetch_assoc())
  $package_updates[] = $row;

print_header("", "home");

?>
      <div id="content-left-wrapper">
        <div id="content-left">
          <div id="intro" class="box">
            <h2>
              A simple, lightweight distribution for 32-bit CPUs
            </h2>
            <p>
              You've reached the website for <strong>Arch Linux 32</strong>, the community maintained continuation of 32-bit support for <a href="https://archlinux.org">Arch Linux</a>, a lightweight and flexible Linux® distribution that tries to Keep It Simple.
            </p>
            <p>
              Currently we have official packages optimized for the i686 and pentium4 architectures.
              Also most(ly) non-graphical packages are available for i486, too.
              Have a look at <a href="/architecture/">the required cpu flags</a> to decide which architecture is the right one for you.
              Most packages from Arch Linux's
              <a href="https://aur.archlinux.org/" title="Arch User Repository (AUR)">community-operated package repository</a>
              are also compatible with Arch Linux 32.
            </p>
            <p>
              Instructions for the transition from Arch Linux to Arch Linux 32 can be found <a href="/download">here</a>.
            </p>
            <p>
              Installation media which boot on x86_64 and i686 can be found <a href="https://mirror.archlinux32.org/archisos">here</a>.
            </p>
            <p>
              Join us on <a href="https://webchat.freenode.net/">#archlinux32</a> IRC channel on Freenode, check out our
              <a href="https://bbs.archlinux32.org/" title="Arch 32 Forums">forums</a>
              or subscribe to the <a href="https://lists.archlinux.org/listinfo/arch-ports"
                  title="Arch-Ports Mailing Lists">mailing list</a>
              to get your feet wet.
              Also glance through <a href="https://wiki.archlinux.org/" title="Arch Wiki">the Arch Wiki</a> if you want to learn more about upstream Arch.
            </p>
          </div>
          <div id="news">
            <h3>
              <a href="https://news.archlinux32.org/" title="Browse the news archives">Latest News</a>
              <span class="arrow"></span>
            </h3>
            <a href="https://archlinux.org/feeds/news/" title="Arch News RSS Feed" class="rss-icon"><img width="16" height="16" src="/static/rss.c5ebdc5318d6.png" alt="RSS Feed" /></a>
            <a href="https://news.archlinux32.org/rss.php" title="Arch 32 News RSS Feed" class="rss-icon"><img width="16" height="16" src="/static/rss.c5ebdc5318d6.png" alt="RSS Feed" /></a>
<?php

$ch = curl_init("https://news.archlinux32.org/rss.php");
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$news32 = curl_exec($ch);
curl_close($ch);
$news32 = simplexml_load_string($news32);

$ch = curl_init("https://www.archlinux.org/feeds/news/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$news64 = curl_exec($ch);
curl_close($ch);
$news64 = simplexml_load_string($news64);

$news = array();

if ($news32 === false) {
  print "            <h4>\n";
  print "              sorry, arch 32 news are currently unavailable\n";
  print "            </h4>\n";
} else {
  foreach($news32 -> {'entry'} as $entry) {
    $news[] = array (
      'content' => $entry -> {'content'},
      'date' => explode('T', $entry -> {'published'})[0],
      'link' => $entry -> {'link'} -> attributes() -> {'href'},
      'title' => $entry -> {'title'}
    );
  }
}
if ($news64 === false) {
  print "            <h4>\n";
  print "              sorry, upstream arch news are currently unavailable\n";
  print "            </h4>\n";
} else {
  foreach($news64 -> {'channel'} -> {'item'} as $entry) {
    $news[] = array (
      'content' => $entry -> {'description'},
      'date' => date('Y-m-d', strtotime($entry -> {'pubDate'})),
      'link' => $entry -> {'link'},
      'title' => $entry -> {'title'}
    );
  }
}

function cmp_news_date($a, $b) {
  return strtotime($b['date']) - strtotime($a['date']);
}
usort($news, 'cmp_news_date');

$news_count = -5;
foreach($news as $entry) {
  $news_count ++;
  if ($news_count == 0) {
    print "            <h3>\n";
    print "              <a href=\"https://news.archlinux32.org/\" title=\"Browse the news archives\">Older News</a>\n";
    print "              <span class=\"arrow\"></span>\n";
    print "            </h3>\n";
    print "            <dl class=\"newslist\">\n";
  }
  if ($news_count < 0) {
    print "            <h4>\n";
    print "              <a href=\"";
    print $entry['link'];
    print "\" title=\"View full article: ";
    print $entry['title'];
    print "\">";
    print $entry['title'];
    print "</a>\n";
    print "            </h4>\n";
    print "            <p class=\"timestamp\">\n";
    print "              " . $entry['date'] . "\n";
    print "            </p>\n";
    print "            <div class=\"article-content\">\n";
    print $entry['content'];
    print "            </div>\n";
  } else {
    print "              <dt>";
    print $entry['date'];
    print "</dt>\n";
    print "              <dd>\n";
    print "                <a href=\"";
    print $entry['link'];
    print "\" title=\"View full article: ";
    print $entry['title'];
    print "\">";
    print $entry['title'];
    print "</a>\n";
    print "              </dd>\n";
  }
}
if ($news_count >= 0) {
  print "            </dl>\n";
}

?>
          </div>
        </div>
      </div>
      <div id="content-right">
        <div id="pkgsearch" class="widget">
          <form id="pkgsearch-form" method="get" action="/packages/">
            <fieldset>
              <label for="pkgsearch-field">Package Search:</label>
              <input id="pkgsearch-field" type="text" name="q" size="18" maxlength="200">
            </fieldset>
          </form>
        </div>
        <div id="pkg-updates" class="widget box">
          <h3>
            Recent Updates <span class="more">(<a href="/packages/?sort=-move_date" title="Browse all of the latest packages">more</a>)</span>
          </h3>
          <a href="/feeds/packages/" title="Arch 32 Package Updates RSS Feed" class="rss-icon"><img width="16" height="16" src="/static/rss.c5ebdc5318d6.png" alt="RSS Feed" /></a>
          <table>
<?php

foreach($package_updates as $pkg) {

  print "            <tr>\n";
  print "              <td class=\"pkg-name\"><span class=\"";
  print $pkg['repo'];
  print "\">";
  print $pkg['pkgname'];
  print " ";
  if ($pkg['epoch'] != 0)
    print $pkg['epoch'] . ":";
  print $pkg['pkgver'] . "-" . $pkg['pkgrel'];
  if (!$pkg['sub_pkgrel_omitted'])
    print "." . $pkg['sub_pkgrel'];
  print "</span></td>\n";
  print "              <td class=\"pkg-arch\">\n";
  print "                <a href=\"/packages/" . $pkg['repo'] . "/" . $pkg['arch'] . "/" . $pkg['pkgname'] . "/\"";
  print " title=\"Details for " . $pkg['pkgname'] . " [" . $pkg['repo'] . "]\">" . $pkg['arch'] . "</a>\n";
  print "              </td>\n";
  print "            </tr>\n";

}

?>
          </table>
        </div>
        <div id="nav-sidebar" class="widget">
          <h4>
            Documentation
          </h4>
          <ul>
            <li><a href="https://wiki.archlinux.org/" title="Community documentation">upstream Wiki</a></li>
            <li><a href="https://wiki.archlinux.org/index.php/Installation_guide" title="Installation guide">upstream Installation Guide</a></li>
            <li><a href="/architecture/" title="List of supported architectures">supported Architectures</a></li>
          </ul>
<?php
 /* TODO: do we have links to put here?
          <h4>Community</h4>
          <ul>
            <li><a href="https://lists.archlinux.org/listinfo/arch-ports"
                  title="Arch-Ports mailing lists">Mailing List</a></li>
              <li><a href="https://wiki.archlinux.org/index.php/IRC_channels"
                  title="Official and regional IRC communities">IRC Channels</a></li>
              <li><a href="https://planet.archlinux.org/"
                  title="Arch in the blogosphere">Planet Arch</a></li>
              <li><a href="https://wiki.archlinux.org/index.php/International_communities"
                  title="Arch communities in your native language">International Communities</a></li>
          </ul>
    <h4>Support</h4>
    <ul>
        <li><a href="/donate/" title="Help support Arch Linux">Donate</a></li>
        <li><a href="https://www.zazzle.com/archlinux*"
            title="T-shirts, mugs, mouse pads, hoodies, posters, skateboards, shoes, etc.">Products via Zazzle</a></li>
        <li><a href="https://www.unixstickers.com/tag/archlinux" title="Arch
        Linux stickers, t-shirts, hoodies, mugs, posters and pins">Products via Unixstickers</li>
        <li><a href="https://www.freewear.org/?page=list_items&amp;org=Archlinux"
            title="T-shirts">T-shirts via Freewear</a></li>
        <li><a href="https://www.hellotux.com/arch"
            title="T-shirts">T-shirts via HELLOTUX</a></li>
    </ul>
  */
?>
          <h4>Tools</h4>
          <ul>
            <li><a href="/mirrorlist/"
              title="Get a custom mirrorlist from our database">Mirrorlist Updater</a></li>
            <li><a href="/mirrors/"
              title="See a listing of all available mirrors">Mirror List</a></li>
            <li><a href="/mirrors/status/"
              title="Check the status of all known mirrors">Mirror Status</a></li>
          </ul>
          <h4>Development</h4>
          <ul>
            <li><a href="https://git.archlinux32.org/archlinux32/" title="Official Arch 32 projects (git)">Projects in Git</a></li>
            <li><a href="/groups/" title="View the available package groups">Package Groups</a></li>
            <li><a href="/buildmaster/todos.php" title="Developer Todo Lists">Todo List</a></li>
            <li><a href="/buildmaster/" title="Build Master">Build Master</a></li>
            <li><a href="/releng/releases/" title="Release Engineering ISO listing"><s>ISO Release List</s> (not yet implemented)</a></li>
            <li><a href="/packages/differences/" title="See differences in packages between available architectures">Differences Reports</a></li>
          </ul>
<?php
/* TODO: do we want that?
    <h4>People</h4>
    <ul>

        <li><a href="/people/developers/" title="More info about Developers">Developers</a></li>

        <li><a href="/people/trusted-users/" title="More info about Trusted Users">Trusted Users</a></li>

        <li><a href="/people/support-staff/" title="More info about Support Staff">Support Staff</a></li>

        <li><a href="/people/developer-fellows/" title="More info about Developer Fellows">Developer Fellows</a></li>

        <li><a href="/people/trusted-user-fellows/" title="More info about Trusted User Fellows">Trusted User Fellows</a></li>

        <li><a href="/people/support-staff-fellows/" title="More info about Support Staff Fellows">Support Staff Fellows</a></li>

        <li><a href="/master-keys/"
            title="Package/Database signing master keys">Signing Master Keys</a></li>
    </ul>
*/
?>
          <h4>
            More Resources
          </h4>
          <ul>
            <li><a href="https://news.archlinux32.org/" title="News Archives">News Archives</a></li>
            <li><a href="/feeds/" title="Various RSS Feeds">RSS Feeds</a></li>
          </ul>
        </div>
      </div>
<?php

print_footer();