summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-24 15:45:17 +0100
committerRemi Collet <remi@remirepo.net>2020-03-24 15:45:17 +0100
commitc12fd3e1e921f5ca7dab87b311ee4b3ccdc5cf07 (patch)
tree05fa9c607f9227c2763d8e83b44ff99cd894a1ee
parent556588463443444e7814e9d225b93628778c8d15 (diff)
backport for remirepo
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--composer.json38
-rw-r--r--php-marcusschwarz-lesserphp.spec22
4 files changed, 70 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..d32a5d4
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,38 @@
+{
+ "name": "marcusschwarz/lesserphp",
+ "type": "library",
+ "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.",
+ "homepage": "http://leafo.net/lessphp/",
+ "license": [
+ "MIT",
+ "GPL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Leaf Corcoran",
+ "email": "leafot@gmail.com",
+ "homepage": "http://leafo.net"
+ },
+ {
+ "name": "Marcus Schwarz",
+ "email": "github@maswaba.de",
+ "homepage": "https://www.maswaba.de"
+ }
+
+ ],
+ "bin": ["plessc"],
+ "autoload": {
+ "classmap": ["lessc.inc.php"]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.5.1-dev"
+ }
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.3"
+ },
+ "scripts": {
+ "test": "phpunit"
+ }
+}
diff --git a/php-marcusschwarz-lesserphp.spec b/php-marcusschwarz-lesserphp.spec
index 1edeaae..1cefd29 100644
--- a/php-marcusschwarz-lesserphp.spec
+++ b/php-marcusschwarz-lesserphp.spec
@@ -1,3 +1,10 @@
+# remirepo spec file for php-marcusschwarz-lesserphp, from
+#
+# Fedora spec file for php-marcusschwarz-lesserphp
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
%global composer_vendor marcusschwarz
%global composer_project lesserphp
@@ -27,7 +34,7 @@ Patch0: lesserphp--pullrequest-18.patch
BuildArch: noarch
%if 0%{?with_tests}
-BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35
+BuildRequires: phpunit7
%endif
BuildRequires: php-fedora-autoloader-devel
@@ -58,7 +65,8 @@ Autoloader: %{pkgdir}/autoload.php
%prep
-%autosetup -p1 -n %{repo_name}-%{version}
+%setup -n %{repo_name}-%{version}
+%patch0 -p1
# Lessify is broken upstream and we don't want to install it
rm lessify lessify.inc.php
@@ -91,11 +99,16 @@ install -m 0755 -p plessc %{buildroot}%{_bindir}/plessc
%check
%if 0%{?with_tests}
-phpunit --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php
+for cmd in php php72 php73 php74; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit7 --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php
+ fi
+done
%endif
%files
+%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
%doc composer.json
@@ -104,6 +117,9 @@ phpunit --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php
%changelog
+* Tue Mar 24 2020 Remi Collet <remi@remirepo.net> - 0.5.4-5
+- backport for remirepo
+
* Fri Mar 13 2020 Artur Iwicki <fedora@svgames.pl> - 0.5.4-5
- Fix FedoraAutoloader-related Requires/BuildRequires