]> git.pld-linux.org Git - packages/php-sassphp.git/commitdiff
new, version 0.2.1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 10 Oct 2016 12:05:17 +0000 (15:05 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 10 Oct 2016 12:05:17 +0000 (15:05 +0300)
libsass.patch [new file with mode: 0644]
php-sassphp.spec [new file with mode: 0644]

diff --git a/libsass.patch b/libsass.patch
new file mode 100644 (file)
index 0000000..95acd26
--- /dev/null
@@ -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;
diff --git a/php-sassphp.spec b/php-sassphp.spec
new file mode 100644 (file)
index 0000000..9ac3ef2
--- /dev/null
@@ -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
This page took 0.094405 seconds and 4 git commands to generate.