diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-10-27 17:20:10 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-10-27 17:20:10 +0100 |
commit | 7c630b4a7d264a337b1fd103c62d701176f85d8c (patch) | |
tree | 5c3efad2ee681f5aa131f0493e5fb71e05c6d600 | |
parent | 6ed1bce6058c9655d4df1e028101385d0488b874 (diff) |
php-herrera-io-phar-update: fix resources installation
-rw-r--r-- | php-herrera-io-phar-update-autoload.php | 2 | ||||
-rw-r--r-- | 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 <?php +// Resources in build tree +define('PHAR_UPDATE_MANIFEST_SCHEMA', '%{buildroot}%{_datadir}/%{name}/res/schema.json'); // This library require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php'; // Dependencies @@ -131,10 +138,14 @@ rm -rf %{buildroot} %license LICENSE %doc README.md %doc composer.json +%{_datadir}/%{name}/res %dir %{php_home}/%{ns_vendor}/Phar %{php_home}/%{ns_vendor}/%{ns_project} %changelog +* Tue Oct 27 2015 Remi Collet <remi@fedoraproject.org> - 1.0.3-2 +- fix resources installation + * Wed Oct 21 2015 Remi Collet <remi@fedoraproject.org> - 1.0.3-1 - initial package
\ No newline at end of file |