summaryrefslogtreecommitdiffstats
path: root/php-pecl-md4c.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-md4c.spec')
-rw-r--r--php-pecl-md4c.spec28
1 files changed, 21 insertions, 7 deletions
diff --git a/php-pecl-md4c.spec b/php-pecl-md4c.spec
index d19ed5e..a0b04f9 100644
--- a/php-pecl-md4c.spec
+++ b/php-pecl-md4c.spec
@@ -9,12 +9,16 @@
%{?scl:%scl_package php-pecl-md4c}
+%bcond_without libmd4c
+
%global pecl_name md4c
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 1.0.0
-%global upstream_prever dev
-%global upstream_rpmrel DEV
+%global upstream_version 1.1
+#global upstream_prever dev
+#global upstream_rpmrel DEV
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global bundledver 0.5.2
+%global buildver %(pkg-config --silence-errors --modversion md4c-html 2>/dev/null || echo 65536)
Summary: Convert Markdown to HTML
Name: %{?scl_prefix}php-pecl-%{pecl_name}
@@ -28,14 +32,19 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstr
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-# See https://github.com/eklausme/php-md4c/issues/13
BuildRequires: %{?scl_prefix}php-devel >= 8.0
BuildRequires: %{?scl_prefix}php-pear
+%if %{with libmd4c}
+BuildRequires: md4c-devel >= %{bundledver}
+Requires: md4c%{?_isa} >= %{buildver}
+%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Provides: bundled(md4c) = 0.5.2
+%if %{without libmd4c}
+Provides: bundled(md4c) = %{bundledver}
+%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
@@ -72,11 +81,11 @@ EOF
cd %{sources}
%{__phpize}
-[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
-sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
%configure \
--enable-md4c \
+ --enable-system-libmd4c \
--with-php-config=%{__phpconfig}
%make_build
@@ -117,7 +126,12 @@ done
%changelog
+* Mon Dec 2 2024 Remi Collet <remi@remirepo.net> - 1.1-1
+- update to 1.1
+- use system libmd4c
+
* Mon Dec 2 2024 Remi Collet <remi@remirepo.net> - 1.0.0~DEV-1
- initial package, version 1.0.0dev
- open https://github.com/eklausme/php-md4c/issues/12 version inconsistency
- open https://github.com/eklausme/php-md4c/issues/13 PHP version compatibility
+- open https://github.com/eklausme/php-md4c/pull/14 build with system libmd4c