first commit
[scm/bb/meta-tizen.git] / recipes-tizen / libnet-client / libnet-client.inc
1 DESCRIPTION = "Network Client library (Shared library)"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Network"
4 LICENSE = "Flora License"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by libnet-client-devel 
13 PROVIDES += "libnet-client-devel"
14 RPROVIDES_libnet-client-devel += "libnet-client-devel"
15 RPROVIDES_libnet-client-devel += "libnet-client-dev"
16
17 #PROVIDES by libnet-client 
18 PROVIDES += "libnet-client"
19 RPROVIDES_libnet-client += "libnet-client"
20
21 RDEPENDS = ""
22 #RDEPENDS of libnet-client-devel (${PN}-devel)
23 RDEPENDS_${PN}-devel += "libnet-client"
24
25 #RDEPENDS of libnet-client (${PN})
26 RDEPENDS_${PN} += "/sbin/ldconfig"
27
28
29 DEPENDS = ""
30 #DEPENDS of libnet-client 
31 DEPENDS += "pkgconfig(gio-2.0)"
32 DEPENDS += "cmake"
33 DEPENDS += "dlog"
34 DEPENDS += "pkgconfig(gthread-2.0)"
35 DEPENDS += "pkgconfig(vconf)"
36 DEPENDS += "pkgconfig(glib-2.0)"
37 DEPENDS += "dbus-glib"
38
39 do_patch() {
40  chmod -Rf a+rX,u+w,g-w,o-w ${S}
41  #setup -q
42  cp ${S}/packaging/libnet-client.manifest .
43  
44  
45  
46 }
47
48 do_configure() {
49 }
50
51 do_compile() {
52  LANG=C
53  export LANG
54  unset DISPLAY
55  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
56  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
57  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
58  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
59  
60  
61    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
62    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
63    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
64    ./autogen.sh --build=${TARGET_SYS} --host=${HOST_SYS} \
65          --target=x86_64-tizen-linux \
66          --program-prefix= \
67          --prefix=/usr \
68          --exec-prefix=/usr \
69          --bindir=/usr/bin \
70          --sbindir=/usr/sbin \
71          --sysconfdir=/etc \
72          --datadir=/usr/share \
73          --includedir=/usr/include \
74          --libdir=/usr/lib \
75          --libexecdir=/usr/libexec \
76          --localstatedir=/var \
77          --sharedstatedir=/usr/com \
78          --mandir=/usr/share/man \
79          --infodir=/usr/share/info.sh
80  
81    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
82    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
83    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
84    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
85          --target=x86_64-tizen-linux \
86          --program-prefix= \
87          --prefix=/usr \
88          --exec-prefix=/usr \
89          --bindir=/usr/bin \
90          --sbindir=/usr/sbin \
91          --sysconfdir=/etc \
92          --datadir=/usr/share \
93          --includedir=/usr/include \
94          --libdir=/usr/lib \
95          --libexecdir=/usr/libexec \
96          --localstatedir=/var \
97          --sharedstatedir=/usr/com \
98          --mandir=/usr/share/man \
99          --infodir=/usr/share/info
100  
101  make -j16
102  
103  
104  
105  
106 }
107
108 do_install() {
109  echo export RPM_BUILD_ROOT=${D}
110  LANG=C
111  export LANG
112  unset DISPLAY
113  rm -rf ${D} 
114  mkdir -p ${D} 
115  
116  
117    oe_runmake \
118          DESTDIR=${D} \
119          INSTALL_ROOT=${D} \
120          BINDIR=/usr/bin \
121    install  
122    rm -f ${D}/usr/share/info/dir 
123    find ${D} -regex ".*\.la$" | xargs rm -f -- 
124    find ${D} -regex ".*\.a$" | xargs rm -f --
125  
126  #License
127  mkdir -p ${D}/usr/share/license
128  cp LICENSE.Flora ${D}/usr/share/license/libnet-client
129  
130  #Make test app
131  cd test
132  mkdir ./lib
133  cp -rf ${D}/usr/lib/* ./lib/
134  ./build.sh
135  cd ..
136  
137  
138 }
139
140 PACKAGES = ""
141 PACKAGES += "libnet-client-devel"
142 PACKAGES += "libnet-client"
143
144 libnet-client-devel_files = ""
145 libnet-client-devel_files += "libnet-client.manifest"
146 libnet-client-devel_files += "/usr/include/network/*.h"
147 libnet-client-devel_files += "/usr/lib/pkgconfig/network.pc"
148
149 libnet-client_files = ""
150 libnet-client_files += "libnet-client.manifest"
151 libnet-client_files += "/usr/lib/libnetwork.so"
152 libnet-client_files += "/usr/lib/libnetwork.so.0"
153 libnet-client_files += "/usr/share/license/libnet-client"
154
155 FILES_${PN}-devel = "${libnet-client-devel_files}"
156 FILES_${PN} = "${libnet-client_files}"
157
158 PKG_libnet-client-devel= "libnet-client-devel"
159 PKG_libnet-client= "libnet-client"
160
161 require libnet-client-extraconf.inc