summaryrefslogtreecommitdiff
path: root/www/mozilla/files/moz-install
blob: 0d15cfc4cbf448ebff48d78e8a38f0fb531c4085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
#
# $NetBSD: moz-install,v 1.3 2002/10/19 15:00:02 taya Exp $

${SED} -e "s,@PREFIX@,${PREFIX},g" -e "s,@MOZILLA@,${MOZILLA}," -e "s,@MOZILLA_BIN@,${MOZILLA_BIN}," ${FILESDIR}/mozilla-${OBJECT_FMT}.in > ${PREFIX}/bin/${MOZILLA}
${CHOWN} ${BINOWN} ${PREFIX}/bin/${MOZILLA}
${CHGRP} ${BINGRP} ${PREFIX}/bin/${MOZILLA}
${CHMOD} ${BINMODE} ${PREFIX}/bin/${MOZILLA}

#
#	Substitute variables
#
TMP_PLIST=/tmp/TMP_PLIST.$$
trap "${RM} -f ${TMP_PLIST}" 1 2 3 10 11

${SED} -e "s/\${MOZILLA}/${MOZILLA}/g" -e "s/\${SO_SUFFIX}/${SO_SUFFIX}/" -e "s/\${MOZILLA_BIN}/${MOZILLA_BIN}/g" < ${PLIST_SRC} > ${TMP_PLIST}

# make directories 
for i in `${SED} -n -e '/^@comment begin DIRS$/,/^@comment end DIRS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment | ${SED} -e 's/^@dirrm//'` ; do
	${BSD_INSTALL_DATA_DIR} ${PREFIX}/$i
done

# 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_PROGRAM} ${WRKSRC}/${src} ${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_SCRIPT} ${WRKSRC}/${src} ${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_PROGRAM} ${WRKSRC}/${src} ${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} ${WRKSRC}/${src} ${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} ${WRKSRC}/${src} ${PREFIX}/$i
done

#${RM} -f ${TMP_PLIST}
#
#
#
cd ${PREFIX}/lib/${MOZILLA}
${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom
${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regchrome