From e71e86bcf915a0ca319ca991aa6d5b9f5ffe26ef Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Mon, 15 Jan 2018 16:17:29 +0100 Subject: [PATCH] specfile: create (and own) the conf.d/ directory (for RHEL only) --- ghostscript.spec | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ghostscript.spec b/ghostscript.spec index 5045205..0cef9da 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -285,9 +285,18 @@ autoreconf -fv # ... according to upstream, strict aliasing optimization (enabled by # default with -O2 option) still causes parts of Ghostscript to # malfunction, so we need to disable this optimization technique +# +# NOTE: In RHEL we need to keep the /usr/share/ghostscript/conf.d/ folder +# for China's GB18030 official certification: +%if %{defined rhel} || %{defined centos} +%configure --enable-dynamic --disable-compile-inits --without-versioned-path \ + --with-fontpath="%{urw_base35_fontpath}:%{google_droid_fontpath}:%{_datadir}/%{name}/conf.d/" \ + CFLAGS="${CFLAGS} -fno-strict-aliasing" +%else %configure --enable-dynamic --disable-compile-inits --without-versioned-path \ --with-fontpath="%{urw_base35_fontpath}:%{google_droid_fontpath}" \ CFLAGS="${CFLAGS} -fno-strict-aliasing" +%endif %make_build so @@ -344,6 +353,11 @@ for file in $(basename --multiple %{buildroot}%{_datadir}/%{name}/Resource/CMap/ find %{adobe_mappings_rootpath} -type f -name ${file} -exec ln -fs {} %{buildroot}%{_datadir}/%{name}/Resource/CMap/${file} \; done +# Create the configuration folder fo RHEL: +%if %{defined rhel} || %{defined centos} + install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ +%endif + # === INSTALLATION INSTRUCTIONS =============================================== %post -n libgs -p /sbin/ldconfig @@ -360,6 +374,11 @@ done %{_libdir}/libgs.so.* %{_datadir}/%{name}/ +# Include the configuration folder for RHEL: +%if %{defined rhel} || %{defined centos} + %dir %{_datadir}/%{name}/conf.d/ +%endif + # --------------- %files -n libgs-devel