specfile: create (and own) the conf.d/ directory (for RHEL only)

This commit is contained in:
David Kaspar [Dee'Kej] 2018-01-15 16:17:29 +01:00
parent fe7ddccb26
commit e71e86bcf9

View File

@ -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