omap3-pandora-kernel2: update
[openpandora.oe.git] / recipes / pandora-system / pandora-version.bb
1 DESCRIPTION = "Installs /etc/op-version file."
2 LICENSE = "Public Domain"
3
4 # a reminder: update the changelog!
5 PR = "r42"
6
7 SRC_URI = " \
8   file://changelog \
9 "
10
11 do_install() {
12   OLD_PWD=$PWD
13   cd `dirname "${FILE_DIRNAME}"`
14   tag=`git describe --abbrev=0`
15   commits=`git log --oneline ${tag}..HEAD | wc -l`
16   updv=""
17   test "$commits" = "0" || updv=" update $commits"
18   install -d ${D}${sysconfdir}/
19   opvf=${D}/${sysconfdir}/op-version
20   echo "Tag Name: `git describe`" > ${opvf}
21   echo "GIT-VERSION: `git log -n1 --pretty=oneline|awk '{print $1}'`" >> ${opvf}
22   echo "Branch: `git branch | awk '/*/{print $2}'`" >> ${opvf}
23   echo "Version: 1.9.7.6 - R1.76 Codename Super Zaxxon" >> ${opvf}
24   echo "Display Ver: SuperZaxxon 1.76${updv}" >> ${opvf}
25   echo "Image Builder: ${LOGNAME}@`cat /etc/hostname`" >> ${opvf}
26   echo "Time Stamp: `date -R`" >> ${opvf}
27
28   install -d ${D}${prefix}/pandora/
29   install -m 0644 ${WORKDIR}/changelog ${D}${prefix}/pandora/
30 }
31
32 FILES_${PN} += "${sysconfdir}/op-version ${prefix}/pandora"
33
34 COMPATIBLE_MACHINE = "omap3-pandora"