blob: 1046d63410b3f80ba0fd48223f1b858f3c686ebc [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "User support binary for the uvesafb kernel module"
2HOMEPAGE = "http://dev.gentoo.org/~spock/projects/uvesafb/"
3
4# the copyright info is at the bottom of README, expect break
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://README;md5=94ac1971e4f2309dc322d598e7b1f7dd"
7
8DEPENDS = "virtual/kernel"
9RRECOMMENDS_${PN} = "kernel-module-uvesafb"
10PR = "r2"
11
12SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
13 file://Update-x86emu-from-X.org.patch \
14 file://fbsetup \
15 file://uvesafb.conf \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016 file://ar-from-env.patch \
17 file://aarch64-host.patch \
18"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
20SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
21SRC_URI[sha256sum] = "634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c"
22
23PACKAGE_ARCH = "${MACHINE_ARCH}"
24COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
25
26INITSCRIPT_NAME = "fbsetup"
27INITSCRIPT_PARAMS = "start 0 S ."
28
29do_configure () {
30 ./configure --with-x86emu
31}
32
33do_compile () {
34 KDIR="${STAGING_DIR_HOST}/usr" make
35}
36
37do_install () {
38 install -d ${D}${base_sbindir}
39 install v86d ${D}${base_sbindir}/
40
41 # Only install fbsetup script if 'sysvinit' is in DISTRO_FEATURES
42 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
43 install -d ${D}${sysconfdir}/init.d/
44 install -m 0755 ${WORKDIR}/fbsetup ${D}${sysconfdir}/init.d/fbsetup
45 fi
46
47 # Install systemd related configuration file
48 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
49 install -d ${D}${sysconfdir}/modules-load.d
50 install -m 0644 ${WORKDIR}/uvesafb.conf ${D}${sysconfdir}/modules-load.d
51 fi
52}
53
54# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
55# manually to avoid unnecessary postinst/preinst generated.
56python __anonymous() {
57 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
58 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
59}
60
61inherit update-rc.d
62
63DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
64pkg_postinst_${PN} () {
65 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
66 if [ -n "$D" ]; then
67 OPTS="--root=$D"
68 fi
69 systemctl $OPTS mask fbsetup.service
70 fi
71}