dreambox-image: don't depend on openvpn
[opendreambox.git] / meta-opendreambox / recipes-dreambox / images / dreambox-image.bb
1 SUMMARY = "A Dreambox firmware image"
2
3 # packages to build for the feed
4 DEPENDS = " \
5         gdb \
6         lsof \
7         ltrace \
8         strace \
9 "
10
11 # packages to drag into the image
12 IMAGE_INSTALL = " \
13         task-core-boot ${ROOTFS_PKGMANAGE} \
14         task-opendreambox-base \
15         task-opendreambox-dvbapi3 \
16         task-opendreambox-enigma2 \
17 "
18
19 # enable online package management
20 IMAGE_FEATURES += "package-management"
21
22 # we don't want any locales, at least not in the common way.
23 IMAGE_LINGUAS = ""
24
25 inherit image
26
27 opendreambox_rootfs_postprocess() {
28     # generate /etc/image-version
29     IMAGE_DATE=`date +%Y%m%d%H%M`
30     # 0: Release, 1: Experimental
31     IMAGE_TYPE="1"
32     # e.g. 400 for release 4.0.0, if IMAGE_TYPE=0
33     IMAGE_VERSION="000"
34     echo "version=${IMAGE_TYPE}${IMAGE_VERSION}${IMAGE_DATE}" > ${IMAGE_ROOTFS}/etc/image-version
35 }
36
37 ROOTFS_POSTPROCESS_COMMAND += "opendreambox_rootfs_postprocess; "
38
39 do_rootfs_append() {
40     if [ -e ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi ]; then
41         VER=`grep ^Version: ${IMAGE_ROOTFS}${opkglibdir}/info/enigma2.control | cut -d ' ' -f 2`
42         DATE=`date -r ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi -u '+%F %R'`
43         MD5=`md5sum ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi | cut -d ' ' -f 1`
44         SHA256=`sha256sum ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfi | cut -d ' ' -f 1`
45         # In addition to the fields below, you may add 'Issuer' and 'Description'.
46         echo "Date: $DATE" > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
47         echo "Enigma2: $VER" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
48         echo "Distro: ${DISTRO_NAME} ${DISTRO_VERSION}" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
49         echo "Machine: Dreambox ${MACHINE}" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
50         echo "Link: ${DISTRO_FEED_URI}" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
51         echo "MD5: $MD5" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
52         echo "SHA256: $SHA256" >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.nfo
53     fi
54 }