1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

simplify install target

This commit is contained in:
Andrey A. Chernov 1998-08-03 08:49:00 +00:00
parent 2bb6d97578
commit 96e55b94b4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=12263

View File

@ -28,8 +28,6 @@ USE_X11= YES
PKGTMP = ${X11BASE}/.Xinstmp
XLIB = ${X11BASE}/lib/X11
CYRF = ${XLIB}/fonts/cyrillic
T1DIR = ${XLIB}/fonts/Type1/fonts.dir
T1SCALE = ${XLIB}/fonts/Type1/fonts.scale
#Be careful to not delete embedded tab characters
do-install:
@ -41,33 +39,11 @@ do-install:
-mkdir -p ${CYRF}/misc
cd ${WRKSRC}; \
${INSTALL_DATA} *.pfb ${XLIB}/fonts/Type1
for i in ${T1DIR} ${T1SCALE}; do \
grep -q cokoi8n $$i || { \
cp $$i $$i.bak; \
d_cnt=`grep '^[1-9][0-9]*$$' $$i.bak`; \
d_add=`wc -l < ${WRKSRC}/fonts.dir-scale.add`; \
d_new=`expr $$d_cnt + $$d_add`; \
sed 's/^[1-9][0-9]*$$/'$$d_new/ < $$i.bak > $$i; \
cat ${WRKSRC}/fonts.dir-scale.add >> $$i; \
}; \
done
cd ${WRKSRC}/cyrillic; \
${INSTALL_DATA} xrus.info ${CYRF}; \
for i in 100dpi 75dpi misc; do \
${INSTALL_DATA} $$i/* ${CYRF}/$$i; \
done
if [ -f /etc/XF86Config ]; then \
grep -q ${CYRF}/misc /etc/XF86Config || { \
cp /etc/XF86Config /etc/XF86Config.old; \
(echo "/^[ ]*FontPath/i"; \
echo " FontPath \"${CYRF}/75dpi\""; \
echo " FontPath \"${CYRF}/100dpi\""; \
echo " FontPath \"${CYRF}/misc\""; \
echo "."; echo "w"; echo "q"; ) > /tmp/ed.$$$$; \
ed - /etc/XF86Config < /tmp/ed.$$$$; \
rm -f /tmp/ed.$$$$; \
}; \
fi
# ${INSTALL_DATA} ${FILESDIR}/xmodmap ${XLIB}/xinit/.Xmodmap
if [ ! -d ${XLIB}/nls ] ; then \
mkdir ${XLIB}/nls; \
@ -80,40 +56,9 @@ do-install:
if [ ! -f ${XLIB}/nls/C ] ; then \
${INSTALL_DATA} ${FILESDIR}/nls_C ${XLIB}/nls/C; \
fi
if [ ! -f ${XLIB}/nls/nls.dir ] ; then \
dl=`wc -l < ${FILESDIR}/nls_dir_list`; \
echo $$dl > ${XLIB}/nls/nls.dir; \
cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir; \
chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.dir; \
chmod 644 ${XLIB}/nls/nls.dir; \
else \
grep -q KOI8-R ${XLIB}/nls/nls.dir || { \
cp ${XLIB}/nls/nls.dir ${XLIB}/nls/nls.dir.bak; \
d_sub=`grep -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | wc -l`; \
d_cnt=`grep '^[1-9][0-9]*$$' ${XLIB}/nls/nls.dir.bak`; \
d_add=`wc -l < ${FILESDIR}/nls_dir_list`; \
d_new=`expr $$d_cnt + $$d_add - $$d_sub`; \
grep -v -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | \
sed 's/^[1-9][0-9]*$$/'$$d_new/ > ${XLIB}/nls/nls.dir; \
cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir; \
}; \
fi
if [ ! -f ${XLIB}/nls/nls.alias ] ; then \
al=`wc -l < ${FILESDIR}/nls_alias_list`; \
echo $$al > ${XLIB}/nls/nls.alias; \
cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias; \
chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.alias; \
chmod 644 ${XLIB}/nls/nls.alias; \
else \
grep -q KOI8-R ${XLIB}/nls/nls.alias || { \
a_cnt=`grep '^[1-9][0-9]*$$' ${XLIB}/nls/nls.alias`; \
a_add=`wc -l < ${FILESDIR}/nls_alias_list`; \
a_new=`expr $$a_cnt + $$a_add`; \
cp ${XLIB}/nls/nls.alias ${XLIB}/nls/nls.alias.bak; \
sed "s/^[1-9][0-9]*$$/$$a_new/;q" < ${XLIB}/nls/nls.alias.bak > ${XLIB}/nls/nls.alias; \
cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias; \
}; \
fi
${MAKE} pre-package
${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
${MAKE} post-package
pre-package:
-mkdir -p ${PKGTMP}