First, install the dependencies:
apt-get install libcurl4-openssl-dev libx11-dev libxt-dev libimlib2-dev libxinerama-dev libjpeg-progs
$ tree ../imlib2/
../imlib2/
├── imlib2
│ ├── copyright
│ └── imlib2-1.4.9.tar.bz2
└── imlib2_1.4.9.bb
1 directory, 3 files
DESCRIPTION = "im lib2"
RDEPENDS_${PN} = "freetype libxdmcp tiff libx11 jpeg libbz2 libxext libxcb libpng liblzma zlib libxau"
SECTION = "libs"
LICENSE = "MIT"
#PV = "1"
#PR = "r0"
SRC_URI = "
file://imlib2-${PV}.tar.bz2
file://copyright
"
LIC_FILES_CHKSUM = "file://${WORKDIR}/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
S = "${WORKDIR}/imlib2-${PV}"
inherit autotools pkgconfig
FILES_${PN}-dbg += "
${libdir}/${BPN}/loaders/.debug
${libdir}/${BPN}/filters/.debug
"
FILES_${PN} = "
${bindir}
${sbindir}
${libexecdir}
${libdir}/lib*.so.*
${sysconfdir}
${sharedstatedir}
${localstatedir}
/bin
/sbin
/lib/*.so*
/usr/share/*
${libdir}/${BPN}
${libdir}/${BPN}/*
"
22:45 hexiongjun:feh $ tree
.
├── feh
│ ├── copyright
│ └── Makefile
└── feh.bb
1 directory, 3 files
RDEPENDS_${PN} = "curl libx11 libpng libxinerama imlib2"如果出现DESCRIPTION错误的提示,那么我们再继续添加DESCRIPTION即可。
SECTION = "libs"
LICENSE = "MIT"
SRCREV = "${AUTOREV}"
SRC_URI = "
git://github.com/derf/feh.git;protocol=https;branch=master
file://copyright
"
LIC_FILES_CHKSUM = "file://${WORKDIR}/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
S = "${WORKDIR}/git"
do_configure () {
}
do_compile () {
make
}
do_install () {
install -d ${D}
install -d ${D}${bindir}/
install -m 0755 ${S}/src/feh ${D}${bindir}/
install -d ${D}/usr/share
install -d ${D}/usr/share/${BPN}
install -d ${D}/usr/share/${BPN}/fonts
install -d ${D}/usr/share/${BPN}/images
cp ${S}/share/fonts/* ${D}/usr/share/${BPN}/fonts/
cp ${S}/share/images/* ${D}/usr/share/${BPN}/images/
}
root@beaglebone:~# feh -x -Z -D 3 -F /Pics关于feh的参数可以看man手册,需要注意的是/Pics目录中存放的是图片文件。
feh ERROR: Can't open X display. It *is* running, yeah?
export DISPLAY=:0然后继续运行即可正确运行:
feh -x -Z -D 3 -F /Pics/