# fedora spec file for php-microsoft-azure-storage-file # # Copyright (c) 2020 Christopher Engelhard # License: MIT # # Please preserve the changelog entries # package and composer name %global vendor microsoft %global project azure-storage-file # PHP namespace and directory %global ns_project MicrosoftAzure\\Storage\\File %global ns_dir %( echo "%{ns_project}" | sed 's|\\\\|\/|g' ) # Github %global gh_vendor Azure %global gh_project azure-storage-file-php %global commit 067a41d588ebb8f2dd3b6657a35c155d7f45c06d %global scommit %(c=%{commit}; echo ${c:0:7}) # tests %global with_tests 1 #-- PREAMBLE ------------------------------------------------------------------# Name: php-%{vendor}-%{project} Version: 1.2.4 Release: %autorelease Summary: PHP client libraries to easily access Microsoft Azure Storage File APIs License: MIT URL: https://github.com/%{gh_vendor}/%{gh_project} Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{commit}/%{gh_project}-%{version}-%{scommit}.tar.gz BuildArch: noarch # for the autoloader Requires: php-composer(fedora/autoloader) # from composer.json Requires: php(language) >= 5.6.0 Requires: php-composer(microsoft/azure-storage-common) >= 1.5 # from phpcompatinfo Requires: php-date Requires: php-hash # for autoloader check BuildRequires: php-composer(fedora/autoloader) BuildRequires: %{_bindir}/php BuildRequires: php(language) >= 5.6.0 BuildRequires: php-composer(microsoft/azure-storage-common) >= 1.5 %if 0%{?with_tests} # for tests %endif # composer provides Provides: php-composer(%{vendor}/%{project}) = %{version} %description A PHP client library that makes it easy to access Microsoft Azure Storage File services. Autoloader: %{_datadir}/php/%{ns_dir}/autoload.php #-- PREP, BUILD & INSTALL -----------------------------------------------------# %prep %setup -q -n %{gh_project}-%{commit} %build : Nothing to build. %install : Create a PSR-0 tree mkdir -p %{buildroot}%{_datadir}/php/%{ns_dir} cp -pr src/File/* %{buildroot}%{_datadir}/php/%{ns_dir} : Generate an autoloader cat <<'EOF' | tee %{buildroot}%{_datadir}/php/%{ns_dir}/autoload.php