/[gentoo-x86]/net-libs/libbtbb/libbtbb-2014.02.4.ebuild
Gentoo

Contents of /net-libs/libbtbb/libbtbb-2014.02.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Apr 18 12:39:52 2015 UTC (5 years, 7 months ago) by swegener
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -3 lines
Rename distfile to include package name.

(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0x64D4CF24)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/libbtbb/libbtbb-2014.02.4.ebuild,v 1.1 2014/11/01 18:25:38 zerochaos Exp $
4
5 EAPI=5
6
7 inherit multilib cmake-utils
8
9 DESCRIPTION="A library to decode Bluetooth baseband packets"
10 HOMEPAGE="http://libbtbb.sourceforge.net/"
11
12 if [[ ${PV} == "9999" ]] ; then
13 EGIT_REPO_URI="https://github.com/greatscottgadgets/libbtbb.git"
14 inherit git-r3
15 KEYWORDS=""
16 else
17 MY_PV=${PV/\./-}
18 MY_PV=${MY_PV/./-R}
19 S=${WORKDIR}/${PN}-${MY_PV}
20 SRC_URI="https://github.com/greatscottgadgets/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
21 KEYWORDS="~amd64 ~arm ~x86"
22 fi
23
24 LICENSE="GPL-2"
25 SLOT="0/${PV}"
26 IUSE="+pcap +wireshark-plugins"
27
28 RDEPEND="
29 wireshark-plugins? (
30 >=net-analyzer/wireshark-1.8.3-r1:=
31 )
32 "
33 DEPEND="${RDEPEND}
34 wireshark-plugins? ( dev-libs/glib
35 virtual/pkgconfig )"
36
37 get_PV() { local pv=$(best_version $1); pv=${pv#$1-}; pv=${pv%-r*}; pv=${pv//_}; echo ${pv}; }
38
39 which_plugins() {
40 if has_version '>=net-analyzer/wireshark-1.12.0'; then
41 plugins="btbb"
42 elif has_version '<net-analyzer/wireshark-1.12.0'; then
43 plugins="btbb btle btsm"
44 fi
45 }
46
47 src_prepare(){
48 CMAKE_USE_DIR="${S}"
49 BUILD_DIR="${S}"_build
50 cmake-utils_src_prepare
51
52 if use wireshark-plugins; then
53 which_plugins
54 for i in ${plugins}
55 do
56 sed -i 's#column_info#packet#' wireshark/plugins/${i}/cmake/FindWireshark.cmake || die
57 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
58 BUILD_DIR="${WORKDIR}"/${i}_build
59 cmake-utils_src_prepare
60 done
61 fi
62 }
63
64 src_configure() {
65 CMAKE_USE_DIR="${S}"
66 BUILD_DIR="${S}"_build
67 local mycmakeargs=(
68 -DDISABLE_PYTHON=true
69 -DPACKAGE_MANAGER=true
70 $(cmake-utils_use pcap PCAPDUMP)
71 )
72 cmake-utils_src_configure
73
74 if use wireshark-plugins; then
75 for i in ${plugins}
76 do
77 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
78 BUILD_DIR="${WORKDIR}"/${i}_build
79 local mycmakeargs=(
80 -DCMAKE_INSTALL_LIBDIR="/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)"
81 )
82 cmake-utils_src_configure
83 done
84 fi
85 }
86
87 src_compile(){
88 CMAKE_USE_DIR="${S}"
89 BUILD_DIR="${S}"_build
90 cmake-utils_src_compile
91
92 if use wireshark-plugins; then
93 for i in ${plugins}
94 do
95 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
96 BUILD_DIR="${WORKDIR}"/${i}_build
97 cmake-utils_src_compile
98 done
99 fi
100 }
101
102 src_test(){
103 CMAKE_USE_DIR="${S}"
104 BUILD_DIR="${S}"_build
105 cmake-utils_src_test
106
107 if use wireshark-plugins; then
108 for i in ${plugins}
109 do
110 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
111 BUILD_DIR="${WORKDIR}"/${i}_build
112 cmake-utils_src_test
113 done
114 fi
115 }
116
117 src_install(){
118 CMAKE_USE_DIR="${S}"
119 BUILD_DIR="${S}"_build
120 cmake-utils_src_install
121
122 if use wireshark-plugins; then
123 for i in ${plugins}
124 do
125 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
126 BUILD_DIR="${WORKDIR}"/${i}_build
127 cmake-utils_src_install
128 done
129 fi
130 }

  ViewVC Help
Powered by ViewVC 1.1.20