summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdefault-fonts-fc-sdk.init.sh3
-rw-r--r--packaging/default-fonts-fc-sdk.spec33
2 files changed, 19 insertions, 17 deletions
diff --git a/default-fonts-fc-sdk.init.sh b/default-fonts-fc-sdk.init.sh
index e615626..b659f69 100755
--- a/default-fonts-fc-sdk.init.sh
+++ b/default-fonts-fc-sdk.init.sh
@@ -1 +1,2 @@
-cp -p /usr/opt/etc/fonts/conf.avail/*.conf /opt/etc/fonts/conf.avail/
+## Copy conf files from %{TZ_SYS_ETC}/fonts/conf.avail/ to %{TZ_SYS_RO_ETC}/fonts/conf.avail/
+cp -p /opt/etc/fonts/conf.avail/*.conf /etc/fonts/conf.avail/
diff --git a/packaging/default-fonts-fc-sdk.spec b/packaging/default-fonts-fc-sdk.spec
index da009a8..4d449cc 100644
--- a/packaging/default-fonts-fc-sdk.spec
+++ b/packaging/default-fonts-fc-sdk.spec
@@ -7,6 +7,7 @@ Group: TO_BE/FILLED_IN
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: packaging/default-fonts-fc-sdk.manifest
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Font configuration package for SDK
@@ -22,26 +23,26 @@ cp %{SOURCE1001} .
export FONT_CONF_FILE_1="99-slp.conf"
export FONT_CONF_FILE_2="10-hinting-slight.conf"
+## TZ_SYS_RO_ETC: /etc, TZ_SYS_ETC: /opt/etc/
rm -rf %{buildroot}
-mkdir -p %{buildroot}/opt/etc/fonts/conf.avail/
-mkdir -p %{buildroot}/etc/opt/init/ && cp -a default-fonts-fc-sdk.init.sh %{buildroot}/etc/opt/init/
-mkdir -p %{buildroot}/usr/etc/fonts/conf.d/
-mkdir -p %{buildroot}/usr/opt/etc/fonts/conf.avail/ && cp -a sdk_fonts_fc/* %{buildroot}/usr/opt/etc/fonts/conf.avail/
-cd %{buildroot}/usr/etc/fonts/conf.d/
-ln -s ../../../../opt/etc/fonts/conf.avail/$FONT_CONF_FILE_1 %{buildroot}/usr/etc/fonts/conf.d/$FONT_CONF_FILE_1
-ln -s ../../../../opt/etc/fonts/conf.avail/$FONT_CONF_FILE_2 %{buildroot}/usr/etc/fonts/conf.d/$FONT_CONF_FILE_2
+mkdir -p %{buildroot}%{TZ_SYS_RO_ETC}/fonts/conf.avail/
+mkdir -p %{buildroot}%{TZ_SYS_RO_ETC}/opt/init/ && cp -a default-fonts-fc-sdk.init.sh %{buildroot}%{TZ_SYS_RO_ETC}/opt/init/
+mkdir -p %{buildroot}%{TZ_SYS_RO_ETC}/fonts/conf.d/
+mkdir -p %{buildroot}%{TZ_SYS_ETC}/fonts/conf.avail/ && cp -a sdk_fonts_fc/* %{buildroot}%{TZ_SYS_ETC}/fonts/conf.avail/
+ln -s %{TZ_SYS_ETC}/fonts/conf.avail/$FONT_CONF_FILE_1 %{buildroot}%{TZ_SYS_RO_ETC}/fonts/conf.d/$FONT_CONF_FILE_1
+ln -s %{TZ_SYS_ETC}/fonts/conf.avail/$FONT_CONF_FILE_2 %{buildroot}%{TZ_SYS_RO_ETC}/fonts/conf.d/$FONT_CONF_FILE_2
%post
-chown root:app /usr/opt/etc/fonts/conf.avail/*.conf
-chmod 664 /usr/opt/etc/fonts/conf.avail/*.conf
-/etc/opt/init/default-fonts-fc-sdk.init.sh
-chsmack -a '*' /opt/etc/fonts/conf.avail/*.conf
+chown root:users %{TZ_SYS_ETC}/fonts/conf.avail/*.conf
+chmod 664 %{TZ_SYS_ETC}/fonts/conf.avail/*.conf
+%{TZ_SYS_RO_ETC}/opt/init/default-fonts-fc-sdk.init.sh
+chsmack -a '*' %{TZ_SYS_ETC}/fonts/conf.avail/*.conf
%files
%manifest default-fonts-fc-sdk.manifest
%defattr(-,root,root,-)
-/usr/opt/etc/fonts/conf.avail/*.conf
-/usr/etc/fonts/conf.d/*.conf
-/etc/opt/init/default-fonts-fc-sdk.init.sh
-/opt/etc/fonts/conf.avail/
-%exclude /usr/etc/fonts/conf.d/documentation.list
+%{TZ_SYS_ETC}/fonts/conf.avail/*.conf
+%{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
+%{TZ_SYS_RO_ETC}/opt/init/default-fonts-fc-sdk.init.sh
+%{TZ_SYS_RO_ETC}/fonts/conf.avail/
+%exclude %{TZ_SYS_RO_ETC}/fonts/conf.d/documentation.list