summaryrefslogtreecommitdiff
path: root/minimo/minimo-cvs.oe
blob: 2ac1b139affc8cf777891fd05d132ab184806e08 (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
DEPENDS = "virtual/libc xt gtk+ libidl"
SRC_URI = "cvs://anonymous@cvs-mirror.mozilla.org/cvsroot;module=mozilla \
	   file://${FILESDIR}/xptcstubs.patch;patch=1"
S = "${WORKDIR}/mozilla"
MAINTAINER = "Phil Blundell <pb@handhelds.org>"
SECTION = "x11"
PRIORITY = "optional"
PV = "0.0cvs${CVSDATE}"
FILES_${PN} += " ${libdir}/mozilla-minimo"

export MINIMO=1
export CROSS_COMPILE=1
export CONFIGURE_ARGS="--target=${TARGET_SYS} --host=${BUILD_SYS} --build=${BUILD_SYS}"
export CXX=${CC}
export HOST_LIBIDL_CONFIG="libIDL-config-2"
export MOZ_OBJDIR="${WORKDIR}/build-${TARGET_SYS}"
export MOZCONFIG="${FILESDIR}/mozconfig"

do_fetch () {
	mkdir -p ${WORKDIR}
	cd ${WORKDIR}
	if [ ! -f ${DL_DIR}/mozilla_cvs-mirror.mozilla.org__${CVSDATE}.tar.gz ]; then
		cvs $CVSCOOPTS -d :pserver:anonymous@cvs-mirror.mozilla.org/cvsroot co mozilla/client.mk
		cd mozilla
		make -f client.mk checkout
		cd ..
		tar czf ${DL_DIR}/mozilla_cvs-mirror.mozilla.org__${CVSDATE}.tar.gz mozilla
	fi
}

do_configure () {
	cp embedding/minimo/mozconfig .
}

do_compile () {
	make -f client.mk build_all
	cd $MOZ_OBJDIR/embedding/minimo
	make
}

do_install () {
	mkdir -p ${D}/${libdir}/mozilla-minimo
	cp -rH $MOZ_OBJDIR/dist/bin/* ${D}/${libdir}/mozilla-minimo/
	mkdir -p ${D}/${datadir}/applications
	install -m 0644 embedding/minimo/ipkg/minimo.desktop ${D}/${datadir}/applications/minimo.desktop
	mkdir -p ${D}/${datadir}/pixmaps
	install -m 0644 embedding/minimo/ipkg/minimo.png ${D}/${datadir}/applications/minimo.png
	mkdir -p ${D}/${bindir}
	echo "#!/bin/sh" > ${D}/${bindir}/minimo
	cat >>${D}/${bindir}/minimo << EOF
cd ${libdir}/mozilla-minimo
export LD_LIBRARY_PATH=${libdir}/mozilla-minimo
exec ./Minimo http://www.mozilla.org/projects/minimo/home.html
EOF
	chmod 755 ${D}/${bindir}/minimo
}