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