[packages/satis] up to 1.0.0-release
glen
glen at pld-linux.org
Sun Mar 25 23:52:17 CEST 2018
commit b2641ed2a744a3e60bf89b80188b94ca60ca4917
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Fri Mar 9 02:03:56 2018 +0200
up to 1.0.0-release
uses php 5.4 syntax, php 5.6 recommended
autoload.patch | 44 ++++++++++++++++++++------------------------
satis.spec | 28 ++++++++++------------------
2 files changed, 30 insertions(+), 42 deletions(-)
---
diff --git a/satis.spec b/satis.spec
index 7dc826b..085a194 100644
--- a/satis.spec
+++ b/satis.spec
@@ -1,20 +1,14 @@
-%define rel 1
-%define githash 6a8e47e
-# $ git rev-list 1.0.0-alpha1..%{githash} --count
-%define commits 193
-%define subver alpha1
-%define php_min_version 5.3.4
+%define php_min_version 5.4.0
%include /usr/lib/rpm/macros.php
Summary: Package Repository Generator
Name: satis
Version: 1.0.0
-Release: 1.%{subver}%{?commits:.%{commits}}%{?githash:.g%{githash}}.%{rel}
+Release: 2
License: MIT
Group: Development/Languages/PHP
-#Source0: https://github.com/composer/satis/archive/%{version}-%{subver}/%{name}-%{version}%{subver}.tar.gz
-Source0: https://github.com/composer/satis/archive/%{githash}/%{name}-%{version}-%{subver}-%{commits}-g%{githash}.tar.gz
-# Source0-md5: 6983a32de40172f5a1b9332c00817d68
+Source0: https://github.com/composer/satis/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 884bf6850503c0cf5eff693b841b3f1b
Source1: autoload.php
Patch0: autoload.patch
URL: https://github.com/composer/satis
@@ -41,25 +35,23 @@ It uses any composer.json file as input and dumps all the required
Repository file.
%prep
-%setup -qc -n %{name}-%{version}-%{release}
-mv %{name}-*/* .
+%setup -q
%patch0 -p1
%{__sed} -i -e '1s,^#!.*env php,#!/usr/bin/php,' bin/*
-cp -p %{SOURCE1} src/Composer/Satis/autoload.php
+cp -p %{SOURCE1} src/autoload.php
# move to Source dir, eases packaging
-mv res views src/Composer/Satis
+mv res views src
# not needed runtime
-mv bin/compile .
-mv src/Composer/Satis/Compiler.php .
+mv bin/docker* bin/*.bat .
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{php_data_dir}/Composer}
-cp -a src/Composer $RPM_BUILD_ROOT%{php_data_dir}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{php_data_dir}/Composer/Satis}
+cp -a src/* $RPM_BUILD_ROOT%{php_data_dir}/Composer/Satis
install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
%clean
diff --git a/autoload.patch b/autoload.patch
index bc270ca..b905fe9 100644
--- a/autoload.patch
+++ b/autoload.patch
@@ -1,37 +1,33 @@
---- satis-1.0.0-1.alpha1.152.g48191ff.0.5/bin/satis~ 2016-01-06 22:35:05.000000000 +0200
-+++ satis-1.0.0-1.alpha1.152.g48191ff.0.5/bin/satis 2016-01-06 22:36:09.726705543 +0200
-@@ -1,7 +1,11 @@
- #!/usr/bin/php
- <?php
+--- satis-1.0.0/bin/satis~ 2017-08-10 09:25:40.000000000 +0300
++++ satis-1.0.0/bin/satis 2018-03-09 02:05:34.903992878 +0200
+@@ -17,7 +17,7 @@
+ }
+ }
--require __DIR__.'/../src/bootstrap.php';
-+if (file_exists($autoload = __DIR__ . '/../src/Composer/Satis/autoload.php')) {
-+ require $autoload;
-+} else {
-+ require '/usr/share/php/Composer/Satis/autoload.php';
-+}
-
- use Composer\Satis\Console\Application;
-
---- satis-1.0.0-1.alpha1.152.g48191ff.0.5/src/Composer/Satis/Command/BuildCommand.php~ 2016-01-06 09:33:13.000000000 +0200
-+++ satis-1.0.0-1.alpha1.152.g48191ff.0.5/src/Composer/Satis/Command/BuildCommand.php 2016-01-06 22:45:02.087397288 +0200
-@@ -254,7 +254,7 @@
+-if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
++if ((!$loader = includeIfExists(__DIR__ . '/../src/Composer/Satis/autoload.php')) && (!$loader = includeIfExists('/usr/share/php/Composer/Satis/autoload.php'))) {
+ print('You must set up the project dependencies using Composer before you can use Satis.');
+ exit(1);
+ }
+--- satis-1.0.0/src/Console/Command/BuildCommand.php~ 2017-08-10 09:25:40.000000000 +0300
++++ satis-1.0.0/src/Console/Command/BuildCommand.php 2018-03-09 02:07:34.756989967 +0200
+@@ -282,7 +282,7 @@
$data = json_decode($content);
-- $schemaFile = __DIR__.'/../../../../res/satis-schema.json';
-+ $schemaFile = __DIR__.'/../res/satis-schema.json';
+- $schemaFile = __DIR__ . '/../../../res/satis-schema.json';
++ $schemaFile = __DIR__ . '/../../res/satis-schema.json';
$schema = json_decode(file_get_contents($schemaFile));
$validator = new Validator();
$validator->check($data, $schema);
---- satis-1.0.0-1.alpha1.197.g6ddaf74.1/src/Composer/Satis/Builder/WebBuilder.php~ 2016-04-05 18:16:09.000000000 +0300
-+++ satis-1.0.0-1.alpha1.197.g6ddaf74.1/src/Composer/Satis/Builder/WebBuilder.php 2016-04-07 21:01:12.883296920 +0300
-@@ -103,7 +103,7 @@
+--- satis-1.0.0/src/Builder/WebBuilder.php~ 2017-08-10 09:25:40.000000000 +0300
++++ satis-1.0.0/src/Builder/WebBuilder.php 2018-03-09 02:08:33.493425654 +0200
+@@ -104,7 +104,7 @@
if (null === $this->twig) {
$twigTemplate = isset($this->config['twig-template']) ? $this->config['twig-template'] : null;
-- $templateDir = $twigTemplate ? pathinfo($twigTemplate, PATHINFO_DIRNAME) : __DIR__.'/../../../../views';
-+ $templateDir = $twigTemplate ? pathinfo($twigTemplate, PATHINFO_DIRNAME) : __DIR__.'/../views';
+- $templateDir = $twigTemplate ? pathinfo($twigTemplate, PATHINFO_DIRNAME) : __DIR__ . '/../../views';
++ $templateDir = $twigTemplate ? pathinfo($twigTemplate, PATHINFO_DIRNAME) : __DIR__ . '/../views';
$loader = new \Twig_Loader_Filesystem($templateDir);
$this->twig = new \Twig_Environment($loader);
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/satis.git/commitdiff/b2641ed2a744a3e60bf89b80188b94ca60ca4917
More information about the pld-cvs-commit
mailing list