Set permissions of fontconfig cache files, fonts.dir and fons.scale

explicitly, so they don't depend on the umask.

push forward deraadt; no objections matthieu
This commit is contained in:
tb 2016-11-19 08:38:15 +00:00
parent 014a2c67d0
commit d1cd881611

View File

@ -1,22 +1,26 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2016/10/02 20:55:09 matthieu Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.5 2016/11/19 08:38:15 tb Exp $
afterinstall:
@if test -z "$(DESTDIR)"; then \
echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\
fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\
chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \
else \
echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\
fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\
chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \
chmod 644 ${DESTDIR}/var/cache/fontconfig/*; \
fi
.for fdir in 100dpi 75dpi OTF TTF Type1 cyrillic misc
rm -f ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
mkfontdir ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
chmod 644 ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
.endfor
.for fdir in OTF TTF Type1
mkfontscale ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale
chmod 644 ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale
.endfor
.include <bsd.xorg.mk>