From 7c630b4a7d264a337b1fd103c62d701176f85d8c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 27 Oct 2015 17:20:10 +0100 Subject: php-herrera-io-phar-update: fix resources installation --- php-herrera-io-phar-update-autoload.php | 2 +- php-herrera-io-phar-update.spec | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/php-herrera-io-phar-update-autoload.php b/php-herrera-io-phar-update-autoload.php index 424a564..dff41cc 100644 --- a/php-herrera-io-phar-update-autoload.php +++ b/php-herrera-io-phar-update-autoload.php @@ -20,5 +20,5 @@ require_once $vendorDir . '/Herrera/Version/autoload.php'; // Adpated from upstream constants.php if (!defined('PHAR_UPDATE_MANIFEST_SCHEMA')) { - define('PHAR_UPDATE_MANIFEST_SCHEMA', __DIR__ . '/schema.json'); + define('PHAR_UPDATE_MANIFEST_SCHEMA', '/usr/share/php-herrera-io-phar-update/res/schema.json'); } \ No newline at end of file diff --git a/php-herrera-io-phar-update.spec b/php-herrera-io-phar-update.spec index 6c0755b..312448f 100644 --- a/php-herrera-io-phar-update.spec +++ b/php-herrera-io-phar-update.spec @@ -20,7 +20,7 @@ Name: php-%{c_vendor}-%{c_project} Version: 2.0.0 -%global specrel 1 +%global specrel 2 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: A library for self-updating Phars @@ -91,15 +91,22 @@ cp %{SOURCE1} src/lib/%{ns_vendor}/%{ns_project}/autoload.php %install rm -rf %{buildroot} + +: library mkdir -p %{buildroot}%{php_home} cp -pr src/lib/%{ns_vendor} %{buildroot}%{php_home}/%{ns_vendor} -# yes, ugly -cp res/schema.json %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/ + +: resources +mkdir -p %{buildroot}%{_datadir}/%{name} +cp -pr res %{buildroot}%{_datadir}/%{name}/res + %check %if %{with_tests} cat << 'EOF' | tee src/tests/bootstrap.php - 1.0.3-2 +- fix resources installation + * Wed Oct 21 2015 Remi Collet - 1.0.3-1 - initial package \ No newline at end of file -- cgit