source: dev-embedded/arduino-bin/arduino-bin-1.8.1.ebuild @ f3987e6

Revision f3987e6, 2.1 KB checked in by Mario Fetka <mario.fetka@…>, 10 months ago (diff)

Bump

  • Property mode set to 100644
Line 
1# Copyright 1999-2015 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-37.0.ebuild,v 1.1 2015/04/01 15:49:24 axs Exp $
4
5EAPI="5"
6
7inherit eutils gnome2-utils fdo-mime
8
9KEYWORDS="~amd64 ~x86"
10SLOT="0"
11LICENSE="GPL-2 LGPL-2.1"
12IUSE=""
13
14ARD_PN="${PN/-bin}"
15ARD_P="${ARD_PN}-${PV}"
16ARD_PF="${ARD_PN}-${PVR}"
17
18DESCRIPTION="Firefox Web Browser"
19HOMEPAGE="http://arduino.cc/en/Main/Software"
20SRC_URI="${SRC_URI}
21    amd64? ( http://www.arduino.cc/download.php?f=/arduino-${PV}-linux64.tar.xz -> ${PN}_amd64-${PV}.tar.xz )
22    x86?   ( http://www.arduino.cc/download.php?f=/arduino-${PV}-linux32.tar.xz -> ${PN}_i386-${PV}.tar.xz )
23    "
24RESTRICT="strip mirror test"
25
26QA_PREBUILT="
27    opt/arduino/*
28"
29
30DEPEND="app-arch/xz-utils"
31RDEPEND="${DEPEND}
32        sys-libs/ncurses:5/5[tinfo]
33        virtual/libusb:0
34        virtual/libusb:1
35        virtual/udev
36        "
37
38S="${WORKDIR}/${ARD_P}"
39
40src_compile() {
41    # do nothing
42    true
43}
44
45src_install() {
46    declare ARDUINO_HOME=/opt/${ARD_PN}
47   
48    # install desktop file, manpage and icons
49    domenu "${FILESDIR}"/${ARD_PN}.desktop
50    doman  "${FILESDIR}"/${ARD_PN}.1
51
52    #doicon "${FILESDIR}"/${ARD_PN}.png
53    pushd "${S}"/lib/icons &>/dev/null || die
54    for size in * ; do
55        if [ -f "${size}/apps/${ARD_PN}.png" ] ; then
56            insinto "/usr/share/icons/hicolor/${size}/apps"
57            doins "${size}/apps/${ARD_PN}.png"
58        fi
59    done
60    dodir /usr/share/pixmaps
61    doicon "32x32/apps/${ARD_PN}.png" || die
62    popd &>/dev/null || die
63   
64    # copy directory to /opt
65    dodir ${ARDUINO_HOME%/*}
66    mv "${S}" "${D}"${ARDUINO_HOME} || die
67   
68    # make binary symlink
69    dosym ${ARDUINO_HOME}/arduino /usr/bin/arduino
70   
71    # revdep-rebuild entry
72    insinto /etc/revdep-rebuild
73    doins ${FILESDIR}/10${PN} || die
74   
75}
76
77pkg_preinst() {
78    gnome2_icon_savelist
79}
80
81pkg_postinst() {
82    # Update mimedb for the new .desktop file
83    fdo-mime_desktop_database_update
84    gnome2_icon_cache_update
85}
86
87pkg_postrm() {
88    gnome2_icon_cache_update
89}
Note: See TracBrowser for help on using the repository browser.