File php-bartlett-umlwriter-rpm.patch of Package php-bartlett-umlwriter
diff -up ./bin/umlwriter.rpm ./bin/umlwriter
--- ./bin/umlwriter.rpm 2015-04-02 13:07:20.000000000 +0200
+++ ./bin/umlwriter 2015-06-26 10:34:32.782633902 +0200
@@ -2,23 +2,14 @@
<?php
$appName = 'umlWriter';
-if (\Phar::running()) {
- $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor';
-} else {
- $baseDir = dirname(__DIR__);
- $vendorDir = $baseDir . '/vendor';
-
- if (!file_exists($vendorDir . '/autoload.php')) {
- $vendorDir = dirname(dirname($baseDir));
- }
-}
-require_once $vendorDir . '/autoload.php';
-
if (PHP_SAPI !== 'cli') {
return;
}
+$vendorDir = '/usr/share/php';
+require_once $vendorDir . '/Bartlett/UmlWriter/autoload.php';
+
use Bartlett\UmlWriter\Console\Application;
-$application = new Application($appName, '1.0');
+$application = new Application($appName, '@package_version@');
$application->run();