pkgsrc/www/seamonkey/files/moz-install
2009-06-14 22:57:58 +00:00

81 lines
3.5 KiB
Bash
Executable file

#!/bin/sh
#
# $NetBSD: moz-install,v 1.9 2009/06/14 22:58:10 joerg Exp $
${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin
${SED} -e "s,@PREFIX@,${PREFIX},g" -e "s,@MOZILLA@,${MOZILLA}," -e "s,@MOZILLA_BIN@,${MOZILLA_BIN}," ${FILESDIR}/mozilla-${OBJECT_FMT}.in > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
${CHOWN} ${BINOWN} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
${CHGRP} ${BINGRP} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
#
# Substitute variables
#
TMP_PLIST=${WRKDIR}/TMP_PLIST.$$
trap "${RM} -f ${TMP_PLIST}" 1 2 15
${SED} -e "s/\${MOZILLA}/${MOZILLA}/g" -e "s/\${SO_SUFFIX}/${SO_SUFFIX}/" -e "s/\${MOZILLA_BIN}/${MOZILLA_BIN}/g" -e "s/\${JEMALLOC}/${JEMALLOC}/g" < ${PLIST_SRC} > ${TMP_PLIST}
# install programs
for i in `${SED} -n -e '/^@comment begin PROGRAMS$/,/^@comment end PROGRAMS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_PROGRAM} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install scripts
for i in `${SED} -n -e '/^@comment begin SCRIPTS$/,/^@comment end SCRIPTS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_SCRIPT} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install DSO
for i in `${SED} -n -e '/^@comment begin DSO$/,/^@comment end DSO$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${MOZ_INSTALL_LIB} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install PKGCONFIG
${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/pkgconfig
for i in `${SED} -n -e '/^@comment begin PKGCONFIG$/,/^@comment end PKGCONFIG$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@lib/pkgconfig@build/unix@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install DATA
for i in `${SED} -n -e '/^@comment begin DATA$/,/^@comment end DATA$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install INCLUDE
for i in `${SED} -n -e '/^@comment begin INCLUDE$/,/^@comment end INCLUDE$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/include@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install INCLUDE-PUBLIC
for i in `${SED} -n -e '/^@comment begin INCLUDE-PUBLIC$/,/^@comment end INCLUDE-PUBLIC$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/public@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
# install INCLUDE-SDK
for i in `${SED} -n -e '/^@comment begin INCLUDE-SDK$/,/^@comment end INCLUDE-SDK$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/sdk/include@"`;
${BSD_INSTALL_DATA_DIR} `dirname ${DESTDIR}${PREFIX}/$i`
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
done
${RM} -f ${TMP_PLIST}
#
# remove generated user conf directory ${WRKDIR}/.mozilla
#
${RM} -rf ${WRKDIR}/.mozilla