/[soft]/build_system/web/unmaintained.php
ViewVC logotype

Contents of /build_system/web/unmaintained.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6186 - (show annotations) (download)
Wed Oct 10 11:11:21 2012 UTC (11 years, 6 months ago) by rda
File size: 2054 byte(s)
show/list unmaintained packages & biggest maintainers
1 <?php
2 /**
3 * Mageia build-system quick status report script.
4 * List unmaintained packages, with a twist.
5 *
6 * @copyright Copyright (C) 2012 Mageia.Org
7 *
8 * @author Romain d'Alverny
9 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL v2
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License aspublished by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17 $data = file('data/unmaintained.txt');
18 //$data = array_slice($data, 0, 10);
19
20 $groups = array();
21
22 foreach ($data as $package) {
23 $package = trim($package);
24 if (substr($package, 0, 8) == 'libgnome') {
25 $groups['gnome'][] = $package;
26 } elseif (substr($package, 0, 3) == 'lib') {
27 $p = substr($package, 3);
28 $groups[$p][] = $package;
29 } else {
30 $p = explode('-', $package);
31 if (count($p) > 1) {
32 $groups[$p[0]][] = $package;
33 } else {
34 $groups[$package][] = $package;
35 }
36 }
37 }
38
39 $s = count($groups) . ' groups for ' . count($data) . ' packages.';
40 $s .= '<ul class="groups">';
41
42 $s .= array_reduce($groups, function ($res, $el) {
43 return $res . '<li>' . implode(', ', array_map(function ($ela) {
44 $spec_url = sprintf('http://svnweb.mageia.org/packages/cauldron/%s/current/SPECS/%s.spec?view=markup', $ela, $ela);
45 return sprintf('<a href="%s">%s</a>', $spec_url, $ela);
46 }, $el)) . '</li>';
47 });
48 $s .= '</<ul>';
49
50 echo <<<S
51 <style>
52 ul.groups { list-style: none; margin: 0; padding: 0; }
53 ul.groups li { display: inline-block; padding: 1em; background: #eee; margin: 1px; font-family: Verdana; font-size: 70%; }
54 </style>
55
56 <h1>Unmaintained packages</h1>
57 <p>Pick one and become a Mageia packager super-hero! (TODO how? why?)</p>
58 <p>A group means that you may want to pick all packages within the same group, for consistency and efficiency.</p>
59 <p>Don't hesitate to ask on #mageia-dev, and to notify if you take maintenance of one package.</p>
60 $s
61 S;

  ViewVC Help
Powered by ViewVC 1.1.30