diff options
-rw-r--r-- | checkpkgist/.gitignore | 1 | ||||
-rw-r--r-- | checkpkgist/checkpkgist.json | 92 | ||||
-rwxr-xr-x | checkpkgist/checkpkgist.php | 29 | ||||
-rwxr-xr-x | checkpkgist/get | 2 |
4 files changed, 46 insertions, 78 deletions
diff --git a/checkpkgist/.gitignore b/checkpkgist/.gitignore new file mode 100644 index 0000000..6ebac36 --- /dev/null +++ b/checkpkgist/.gitignore @@ -0,0 +1 @@ +rpmphp.json diff --git a/checkpkgist/checkpkgist.json b/checkpkgist/checkpkgist.json index d525450..23f2f8c 100644 --- a/checkpkgist/checkpkgist.json +++ b/checkpkgist/checkpkgist.json @@ -1,76 +1,18 @@ -/* - CheckPkgist configuration file - - Key: packagist name - Value: RPM name - - Last update: 2014-07-17 -*/ { - "bartlett/php-compatinfo": "php-bartlett-PHP-CompatInfo", - "bartlett/php-reflect": "php-bartlett-PHP-Reflect", - "doctrine/annotations": "php-doctrine-annotations", - "doctrine/cache": "php-doctrine-cache", - "doctrine/collections": "php-doctrine-collections", - "doctrine/common": "php-doctrine-common", - "doctrine/data-fixtures": "php-doctrine-datafixtures", - "doctrine/dbal": "php-doctrine-dbal", - "doctrine/inflector": "php-doctrine-inflector", - "doctrine/lexer": "php-doctrine-lexer", - "doctrine/orm": "php-doctrine-orm", - "fabpot/goutte": "php-goutte", - "fzaninotto/faker": "php-Faker", - "jms/metadata": "php-Metadata", - "jms/parser-lib": "php-JMSParser", - "justinrainbow/json-schema": "php-JsonSchema", - "kriswallsmith/assetic": "php-Assetic", - "klaussilveira/gitter": "php-gitter", - "leafo/scssphp": "php-scssphp", - "michelf/php-markdown": "php-markdown", - "mikey179/vfsStream": "php-mikey179-vfsstream", - "mockery/mockery": "php-deepend-Mockery", - "monolog/monolog": "php-Monolog", - "ocramius/instantiator": "php-ocramius-instantiator", - "ocramius/lazy-map": "php-ocramius-lazy-map", - "psr/log": "php-PsrLog", - "raven/raven": "php-Raven", - "sabberworm/php-css-parser": "php-PHP-CSS-Parser", - "sdboyer/gliph": "php-gliph", - "seld/jsonlint": "php-jsonlint", - "solarium/solarium": "php-solarium", - "symfony/symfony": "php-symfony", - "twig/twig": "php-twig-Twig", - "zendframework/zendframework1": "php-ZendFramework", - "zendframework/zendframework": "php-ZendFramework2", - - "sabre/dav": "php-sabre-dav", - "sabre/event": "php-sabre-event", - "sabre/http": "php-sabre-http", - "sabre/vobject": "php-sabre-vobject", - - "phploc/phploc": "php-phpunit-phploc", - - "phpunit/dbunit": "php-phpunit-DbUnit", - "phpunit/phpcov": "php-phpunit-phpcov", - "phpunit/php-code-coverage": "php-phpunit-PHP-CodeCoverage", - "phpunit/php-file-iterator": "php-phpunit-File-Iterator", - "phpunit/php-invoker": "php-phpunit-PHP-Invoker", - "phpunit/php-text-template": "php-phpunit-Text-Template", - "phpunit/php-timer": "php-phpunit-PHP-Timer", - "phpunit/php-token-stream": "php-phpunit-PHP-TokenStream", - "phpunit/phpunit": "php-phpunit-PHPUnit", - "phpunit/phpunit-mock-objects": "php-phpunit-PHPUnit-MockObject", - "phpunit/phpunit-selenium": "php-phpunit-PHPUnit-Selenium", - "phpunit/phpunit-skeleton-generator": "php-phpunit-PHPUnit-SkeletonGenerator", - "phpunit/phpunit-story": "php-phpunit-PHPUnit-Story", - - "sebastian/comparator": "php-phpunit-comparator", - "sebastian/diff": "php-phpunit-diff", - "sebastian/environment": "php-phpunit-environment", - "sebastian/exporter": "php-phpunit-exporter", - "sebastian/finder-facade": "php-phpunit-FinderFacade", - "sebastian/git": "php-phpunit-git", - "sebastian/phpcpd": "php-phpunit-phpcpd", - "sebastian/phpdcd": "php-phpunit-phpdcd", - "sebastian/version": "php-phpunit-Version", -} + "fabpot\/goutte": "php-goutte", + "jms\/parser-lib": "php-JMSParser", + "justinrainbow\/json-schema": "php-JsonSchema", + "kriswallsmith\/assetic": "php-Assetic", + "michelf\/php-markdown": "php-markdown", + "sabberworm\/php-css-parser": "php-PHP-CSS-Parser", + "solarium\/solarium": "php-solarium", + "twig\/twig": "php-twig-Twig", + "zendframework\/zendframework1": "php-ZendFramework", + "sabre\/dav": "php-sabre-dav", + "phpunit\/phpunit-selenium": "php-phpunit-PHPUnit-Selenium", + "phpunit\/phpunit-story": "php-phpunit-PHPUnit-Story", + "sebastian\/phpcpd": "php-phpunit-phpcpd", + "sebastian\/phpdcd": "php-phpunit-phpdcd", + "ircmaxell/password-compat": "php-password-compat", + "jasig\/phpcas": "php-pear-CAS" +}
\ No newline at end of file diff --git a/checkpkgist/checkpkgist.php b/checkpkgist/checkpkgist.php index 77c52b2..f1257c7 100755 --- a/checkpkgist/checkpkgist.php +++ b/checkpkgist/checkpkgist.php @@ -88,13 +88,36 @@ $verb = (in_array('-v', $_SERVER['argv']) || in_array('--verbose', $_SERVER['a $quiet = (in_array('-q', $_SERVER['argv']) || in_array('--quiet', $_SERVER['argv'])); $client = new PkgClient(); -$pkgs = file_get_contents(__DIR__."/checkpkgist.json"); +$pkgs = file_get_contents(__DIR__."/rpmphp.json"); if (!$pkgs) { - die("Missing configuration file\n"); + die("Missing configuration file rpmphp\n"); } $pkgs = json_decode($pkgs, true, 5, JSON_PARSER_NOTSTRICT); if (!$pkgs) { - die("Bad configuration file\n"); + die("Bad configuration file rpmphp\n"); +} +$pkg2 = file_get_contents(__DIR__."/checkpkgist.json"); +if (!$pkg2) { + die("Missing configuration file checkpkgist\n"); +} +$pkg2 = json_decode($pkg2, true, 5, JSON_PARSER_NOTSTRICT); +if (!$pkg2) { + die("Bad configuration file checkpkgist\n"); +} + +$change = false; +foreach ($pkg2 as $pkg => $rpm) { + if (isset($pkgs[$pkg])) { + unset($pkg2[$pkg]); + $change = true; + } else { + $pkgs[$pkg] = $pkg2[$pkg]; + } +} +if ($change) { + if (file_put_contents(__DIR__."/checkpkgist.json", json_encode($pkg2, JSON_PRETTY_PRINT))) { + printf("Configuration file changes saved\n"); + } } if ($sort) { diff --git a/checkpkgist/get b/checkpkgist/get new file mode 100755 index 0000000..8aebab7 --- /dev/null +++ b/checkpkgist/get @@ -0,0 +1,2 @@ +#!/bin/sh +wget 'http://rpms.famillecollet.com/rpmphp/get.php?table=packagist' -O rpmphp.json |