[packages/php-sassphp] new, version 0.2.1
glen
glen at pld-linux.org
Mon Oct 10 14:05:43 CEST 2016
commit ff2bb2db587fef0e2fcd4f206d10a3932c8be327
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Oct 10 15:05:17 2016 +0300
new, version 0.2.1
libsass.patch | 11 ++++++++
php-sassphp.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 95 insertions(+)
---
diff --git a/php-sassphp.spec b/php-sassphp.spec
new file mode 100644
index 0000000..9ac3ef2
--- /dev/null
+++ b/php-sassphp.spec
@@ -0,0 +1,84 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+
+%define php_name php%{?php_suffix}
+%define modname sass
+Summary: PHP bindings to libsass - fast, native Sass parsing in PHP
+Name: %{php_name}-sassphp
+Version: 0.2.1
+Release: 1
+License: PHP 3.01
+Group: Development/Languages/PHP
+Source0: https://github.com/sensational/sassphp/archive/v%{version}/sassphp-%{version}.tar.gz
+# Source0-md5: be9ad5c0c0780e64641729540dfee41c
+Patch0: libsass.patch
+URL: https://github.com/sensational/sassphp
+%{?with_tests:BuildRequires: %{php_name}-cli}
+BuildRequires: %{php_name}-devel
+BuildRequires: libsass-devel >= 3.2.2
+BuildRequires: rpmbuild(macros) >= 1.666
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-pcre
+%endif
+%{?requires_php_extension}
+Provides: php(%{modname}) = %{version}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The sass extension for PHP gives you an object-oriented system of
+parsing Sass from within your PHP applications. Under the hood it uses
+libsass to provide super speedy and compatible Sass parsing.
+
+%prep
+%setup -q -n sassphp-%{version}
+%patch0 -p1
+
+%build
+phpize
+%configure
+%{__make}
+
+%if %{with tests}
+# simple module load test
+%{__php} -n -q \
+ -d extension_dir=modules \
+ -d extension=%{modname}.so \
+ -m > modules.log
+grep %{modname} modules.log
+
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+%{__make} test \
+ PHP_EXECUTABLE=%{__php} \
+ PHP_TEST_SHARED_SYSTEM_EXTENSIONS="spl" \
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+ EXTENSION_DIR=%{php_extensiondir} \
+ INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%php_webserver_restart
+
+%postun
+if [ "$1" = 0 ]; then
+ %php_webserver_restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
diff --git a/libsass.patch b/libsass.patch
new file mode 100644
index 0000000..95acd26
--- /dev/null
+++ b/libsass.patch
@@ -0,0 +1,11 @@
+--- sassphp-0.2.1/src/php_sass.h~ 2015-05-18 17:18:24.000000000 +0300
++++ sassphp-0.2.1/src/php_sass.h 2016-10-10 15:00:10.627915640 +0300
+@@ -21,7 +21,7 @@
+ #include <Zend/zend_extensions.h>
+ #include <Zend/zend_exceptions.h>
+
+-#include "lib/libsass/sass_context.h"
++#include <sass/context.h>
+
+ zend_class_entry *sass_ce;
+ zend_class_entry *sass_exception_ce;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-sassphp.git/commitdiff/ff2bb2db587fef0e2fcd4f206d10a3932c8be327
More information about the pld-cvs-commit
mailing list