# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: http://ftp.pingwho.org/pub/gentoo/ftp/overlay/sci-electronics/openobd/openobd-0.5.0-r3.ebuild revision 3 10/09/2018 jay Exp $ EAPI=5 inherit cmake-utils eutils xdg-utils DESCRIPTION="OBD-II Scan Tool supporting ELM327 devices" HOMEPAGE="https://sourceforge.net/projects/openobd/" SRC_URI="mirror://sourceforge/project/${PN}/Sources/${PV}/${P}.tar.gz" RESTRICT="mirror" WX_GTK_VER="3.0" LICENSE="GPL-3" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+X" RDEPEND="${DEPEND}" DEPEND=">=dev-util/cmake-3.9.6 >=sys-devel/gettext-0.19.8.1 x11-libs/wxGTK:${WX_GTK_VER}[X?] >=dev-db/sqlite-3.24.0" src_prepare () { epatch "${FILESDIR}/wxgtk-3.0_compatibility_gentoo_fix.diff" || die "epatch failed !" } pkg_preinst () { doicon "${FILESDIR}/openOBD.png" || die "Add icon failed !" domenu "${FILESDIR}/openOBD.desktop" || die "Do menu failed !" } pkg_postinst () { einfo xdg_desktop_database_update || die "Update .desktop database failed !" einfo einfo "In order to finalize the installation:" einfo einfo "You must create a configuration folder for openOBD in your home directory." einfo "And create a symbolic link as user, to the OpenOBD Database, as follows:" einfo einfo "user $ mkdir /home/user/.openOBD" einfo "user $ ln -sf /usr/share/openobd/openobd.db /home/user/.openOBD/openobd.db" einfo einfo "You can now launch OpenOBD from the menu of your favorite window manager." einfo "Remember to configure the appropriate entry before connecting to the vehicle." einfo "(for example,/dev/ttyS0 for RS232 to ELM327 interface," einfo " /dev/ttyUSB0 for USB virtual serial port to ELM327 interface," einfo " /dev/rfcomm0 for Bluetooth to ELM327 interface.)" einfo einfo "The launcher is available at: Applications / Electronics / OpenOBD" einfo }