]> git.pld-linux.org Git - packages/php-dompdf.git/commitdiff
install config to /etc auto/ac/php-dompdf-0.6.1-1
authorElan Ruusamäe <glen@delfi.ee>
Tue, 31 Mar 2015 14:02:18 +0000 (17:02 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 31 Mar 2015 14:02:18 +0000 (17:02 +0300)
config.patch [new file with mode: 0644]
php-dompdf.spec

diff --git a/config.patch b/config.patch
new file mode 100644 (file)
index 0000000..d2c8657
--- /dev/null
@@ -0,0 +1,26 @@
+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
index e3039abdb3b96879e8dac084668255fc776859ad..436375c402c45e7603de9aa433b1d5c4c6db9f0b 100644 (file)
@@ -12,6 +12,7 @@ License:      LGPL v2.1
 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
@@ -39,6 +40,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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)
@@ -50,11 +52,14 @@ HTML elements. It also supports most presentational HTML attributes.
 %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}
@@ -65,5 +70,7 @@ rm -rf $RPM_BUILD_ROOT
 %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}
This page took 0.040131 seconds and 4 git commands to generate.