summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--Makefile3
-rw-r--r--composer.json26
-rw-r--r--php-laminas-mvc-form.spec113
4 files changed, 150 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a2cd659
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,3 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..cfd7287
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "zendframework/zend-mvc-form",
+ "description": "Metapackage with all requirements needed to use zend-form with zend-mvc.",
+ "type": "metapackage",
+ "license": "BSD-3-Clause",
+ "keywords": [
+ "zf2",
+ "mvc",
+ "form"
+ ],
+ "homepage": "https://github.com/zendframework/zend-mvc-form",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ },
+ "zf": {
+ "component": "Zend\\Form"
+ }
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "zendframework/zend-code": "^2.6.3 || ^3.0.2",
+ "zendframework/zend-form": "^2.8.4",
+ "zendframework/zend-i18n": "^2.7.2"
+ }
+}
diff --git a/php-laminas-mvc-form.spec b/php-laminas-mvc-form.spec
new file mode 100644
index 0000000..1028b5e
--- /dev/null
+++ b/php-laminas-mvc-form.spec
@@ -0,0 +1,113 @@
+# remirepo/Fedora spec file for php-zendframework-zend-mvc-form
+#
+# Copyright (c) 2016-2018 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+%global gh_commit 28bf47ce6661fd71f1b8d68f9b6bc8f841f6aeb0
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner zendframework
+%global gh_project zend-mvc-form
+%global php_home %{_datadir}/php
+%global library Form
+
+Name: php-%{gh_owner}-%{gh_project}
+Version: 1.0.0
+Release: 5%{?dist}
+Summary: Zend Framework Mvc-Form component
+
+License: BSD
+URL: https://framework.zend.com/
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+
+BuildArch: noarch
+# For test
+BuildRequires: php-cli
+BuildRequires: php-autoloader(%{gh_owner}/zend-code) >= 2.6.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-form) >= 2.8.4
+BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.7.2
+# Because of polyfill
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager)
+
+# From composer, "require": {
+# "php": "^5.6 || ^7.0",
+# "zendframework/zend-code": "^2.6.3 || ^3.0.2",
+# "zendframework/zend-form": "^2.8.4",
+# "zendframework/zend-i18n": "^2.7.2"
+Requires: php(language) >= 5.6
+Requires: php-autoloader(%{gh_owner}/zend-code) >= 2.6.3
+Requires: php-autoloader(%{gh_owner}/zend-code) < 4
+Requires: php-autoloader(%{gh_owner}/zend-form) >= 2.8.4
+Requires: php-autoloader(%{gh_owner}/zend-form) < 3
+Requires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.7.2
+Requires: php-autoloader(%{gh_owner}/zend-i18n) < 3
+# Autoloader
+Requires: php-composer(fedora/autoloader)
+
+Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
+
+
+%description
+zend-mvc-form is a metapackage that provides a single package for installing
+all packages necessary to fully use zend-form under zend-mvc, including:
+
+* zendframework/zend-code
+* zendframework/zend-form
+* zendframework/zend-i18n
+
+i18n integration: this package only requires zend-i18n, and not zend-mvc-i18n.
+This is to allow providing the bare minimum required to use zend-form, as its
+base view helper extends from the base zend-i18n view helper. If you want to
+provide translations for your form elements, please install zend-mvc-i18n as
+well.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+mv LICENSE.md LICENSE
+
+
+%build
+: Create autoloader
+cat << 'EOF' | tee autoload.php
+<?php
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Code/autoload.php',
+ '%{php_home}/Zend/Form/autoload.php',
+ '%{php_home}/Zend/I18n/autoload.php',
+]);
+EOF
+
+
+%install
+install -Dpm 644 autoload.php %{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php
+
+
+%check
+: Ensure autoloader works
+php -r 'require "%{buildroot}%{php_home}/Zend/Mvc/%{library}/autoload.php";'
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc *.md
+%doc composer.json
+%{php_home}/Zend/Mvc/%{library}
+
+
+%changelog
+* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 1.0.0-5
+- switch from zend-loader to fedora/autoloader
+
+* Tue Jul 26 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-2
+- fix summary
+
+* Wed Jun 29 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
+- initial package
+