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