--- /dev/null
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
+Date: Wed, 16 Oct 2013 15:47:22 -0400
+Subject: Adapt main path
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Don’t try to guess the actual path from the configuration file moved in
+/etc for the Debian package.
+---
+ dompdf_config.inc.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dompdf_config.inc.php b/dompdf_config.inc.php
+index 51fbcb5..a6593ee 100644
+--- a/dompdf_config.inc.php
++++ b/dompdf_config.inc.php
+@@ -16,7 +16,7 @@ PHP_VERSION >= 5.0 or die("DOMPDF requires PHP 5.0+");
+ /**
+ * The root of your DOMPDF installation
+ */
+-define("DOMPDF_DIR", str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__))));
++define("DOMPDF_DIR", "/usr/share/php/dompdf");
+
+ /**
+ * The location of the DOMPDF include directory
Group: Development/Languages/PHP
Source0: https://github.com/dompdf/dompdf/releases/download/v%{version}/dompdf-%{version}.zip
# Source0-md5: 7ac81b1a96d4311cd47d756b48d01de4
+Patch0: config.patch
URL: http://dompdf.github.io/
BuildRequires: /usr/bin/php
BuildRequires: rpm-php-pearprov >= 4.4.2-11
%define _noautoreq %{?_noautophp} %{?_noautopear}
%define _appdir %{php_data_dir}/%{pkgname}
+%define _sysconfdir /etc/%{pkgname}
%description
dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly)
%prep
%setup -qc
mv %{pkgname}/* .
+%patch0 -p1
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
cp -a dompdf.php load_font.php include lib $RPM_BUILD_ROOT%{_appdir}
+cp -p dompdf_config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
+ln -s %{_sysconfdir}/dompdf_config.inc.php $RPM_BUILD_ROOT%{_appdir}
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cp -a www/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%files
%defattr(644,root,root,755)
%doc README.md CONTRIBUTING.md
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dompdf_config.inc.php
%{_appdir}
%{_examplesdir}/%{name}-%{version}