first commit
[scm/bb/meta-tizen.git] / recipes-tizen / tcpdump / tcpdump.inc
1 DESCRIPTION = "A Packet Sniffer"
2 HOMEPAGE = "http://www.tcpdump.org/"
3 SECTION = "Productivity/Networking/Diagnostic"
4 LICENSE = "BSD-3-Clause"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by tcpdump 
13 PROVIDES += "tcpdump"
14 RPROVIDES_tcpdump += "tcpdump"
15
16 RDEPENDS = ""
17
18 DEPENDS = ""
19 #DEPENDS of tcpdump 
20 DEPENDS += "openssl"
21 DEPENDS += "libpcap"
22
23 do_patch() {
24  chmod -Rf a+rX,u+w,g-w,o-w ${S}
25  #setup -q
26  cp ${S}/packaging/tcpdump.manifest .
27  
28  
29 }
30
31 do_configure() {
32 }
33
34 do_compile() {
35  LANG=C
36  export LANG
37  unset DISPLAY
38  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
39  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
40  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
41  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
42  
43  export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -DGUESS_TSO -fstack-protector -fno-strict-aliasing"
44  
45    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
46    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
47    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
48    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
49          --target=x86_64-tizen-linux \
50          --program-prefix= \
51          --prefix=/usr \
52          --exec-prefix=/usr \
53          --bindir=/usr/bin \
54          --sbindir=/usr/sbin \
55          --sysconfdir=/etc \
56          --datadir=/usr/share \
57          --includedir=/usr/include \
58          --libdir=/usr/lib \
59          --libexecdir=/usr/libexec \
60          --localstatedir=/var \
61          --sharedstatedir=/usr/com \
62          --mandir=/usr/share/man \
63          --infodir=/usr/share/info \
64    --enable-ipv6
65  make
66  
67  
68  
69 }
70
71 do_install() {
72  echo export RPM_BUILD_ROOT=${D}
73  LANG=C
74  export LANG
75  unset DISPLAY
76  rm -rf ${D} 
77  mkdir -p ${D} 
78  
79  
80    oe_runmake \
81          DESTDIR=${D} \
82          INSTALL_ROOT=${D} \
83          BINDIR=/usr/bin \
84    install  
85    rm -f ${D}/usr/share/info/dir 
86    find ${D} -regex ".*\.la$" | xargs rm -f -- 
87    find ${D} -regex ".*\.a$" | xargs rm -f --
88  
89  
90 }
91
92 PACKAGES = ""
93 PACKAGES += "tcpdump"
94
95 tcpdump_files = ""
96 tcpdump_files += "tcpdump.manifest"
97 tcpdump_files += "LICENSE README *.awk"
98 tcpdump_files += "/usr/share/man/man?/*"
99 tcpdump_files += "/usr/sbin/*"
100
101 FILES_${PN} = "${tcpdump_files}"
102
103 PKG_tcpdump= "tcpdump"
104
105 require tcpdump-extraconf.inc