index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-08 12:17:53 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-08 12:17:53 +0100 |
commit | 5b9eb821e590859c3baaac9d08b07019f383eed2 (patch) | |
tree | a3cd2c108a59218eca592f6e65ff7601ad3df1f0 /feeds | |
parent | b4fcb4c27b058dd417ef1a225915ef305493bf7f (diff) |
-rw-r--r-- | feeds/feed.php | 43 |
diff --git a/feeds/feed.php b/feeds/feed.php index 177071b..fd6ae49 100644 --- a/feeds/feed.php +++ b/feeds/feed.php @@ -104,7 +104,7 @@ if ($uri_parts[0] == 'packages') { print "Recent removed packages"; break; } - if ($arch != '') + if ($arch != 'all') print " (" . $arch; if ($repo != '') print " [" . $repo . "]"; @@ -112,12 +112,51 @@ if ($uri_parts[0] == 'packages') { print ")"; print "</title>"; print "<link>"; - print "https://archlinux32.org" . $_SERVER['REQUEST_URI']; + print "https://archlinux32.org/packages/"; print "</link>"; print "<description>"; + switch ($action) { + case '': + print "Recently updated packages in the Arch Linux 32 package repositories"; + break; + case 'added': + print "Recently added packages to the Arch Linux 32 package repositories"; + break; + case 'removes': + print "Recently removed packages from the Arch Linux 32 package repositories"; + break; + } + if ($arch != 'all') + print " for the " . $arch . " architecture (including 'any' packages)"; + else + print " for all architectures"; + if ($repo != '') + print " for the " . $repo . " repository"; print "</description>"; + print "<atom:link href=\"https://archlinux32.org" . $_SERVER['REQUEST_URI'] . "\" rel=\"self\">"; + print "</link>"; + print "<language>"; + print "en-us"; + print "</language>"; + print "<lastBuildDate>"; +# TODO + print "</lastBuildDate>"; + foreach ($packages as $package) { + print "<item>"; + print "<title>"; + print $package['pkgname']; + if (array_key_exists('epoch',$package)) + print $package['epoch'] . ":"; + print $package['pkgver'] . "-" . $package['pkgrel']; + if (!$package['sub_pkgrel_omitted']) + print '.' . $package['sub_pkgrel']; + pinrt ' ' . $package['architecture']; + print "</title>"; # TODO + print "</item>"; + } print "</channel>"; + print "</rss>"; die(); |