first commit
[scm/bb/meta-tizen.git] / recipes-tizen / url-download / url-download.inc
1 DESCRIPTION = "CAPI for content download with web url"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Development/Libraries"
4 LICENSE = "Apache License, Version 2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by capi-web-url-download 
13 PROVIDES += "capi-web-url-download"
14 RPROVIDES_capi-web-url-download += "capi-web-url-download"
15
16 #PROVIDES by capi-web-url-download-devel 
17 PROVIDES += "capi-web-url-download-devel"
18 RPROVIDES_capi-web-url-download-devel += "capi-web-url-download-devel"
19 RPROVIDES_capi-web-url-download-devel += "capi-web-url-download-dev"
20
21 RDEPENDS = ""
22 #RDEPENDS of capi-web-url-download-devel (capi-web-${PN}-devel)
23 RDEPENDS_capi-web-${PN}-devel += "capi-web-url-download"
24
25
26 DEPENDS = ""
27 #DEPENDS of capi-web-url-download 
28 DEPENDS += "download-provider"
29 DEPENDS += "cmake"
30 DEPENDS += "common"
31 DEPENDS += "dlog"
32
33 do_patch() {
34  chmod -Rf a+rX,u+w,g-w,o-w ${S}
35  #setup -q
36  cp ${S}/packaging/capi-web-url-download.manifest .
37  
38  
39 }
40
41 do_configure() {
42 }
43
44 do_compile() {
45  LANG=C
46  export LANG
47  unset DISPLAY
48  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
49  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
50  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
51  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
52  
53  
54    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
55    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
56    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
57    cmake \
58          -DCMAKE_VERBOSE_MAKEFILE=ON \
59          -DCMAKE_INSTALL_PREFIX:PATH=/usr \
60          -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
61          -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
62          -DLIB_INSTALL_DIR:PATH=/usr/lib \
63          -DSYSCONF_INSTALL_DIR:PATH=/etc \
64          -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
65          -DCMAKE_SKIP_RPATH:BOOL=ON \
66          -DBUILD_SHARED_LIBS:BOOL=ON \
67          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake .
68  
69  make -j16
70  
71  
72  
73 }
74
75 do_install() {
76  echo export RPM_BUILD_ROOT=${D}
77  LANG=C
78  export LANG
79  unset DISPLAY
80  rm -rf ${D} 
81  mkdir -p ${D} 
82  
83  rm -rf ${D}
84  
85    oe_runmake \
86          DESTDIR=${D} \
87          INSTALL_ROOT=${D} \
88          BINDIR=/usr/bin \
89    install  
90    rm -f ${D}/usr/share/info/dir 
91    find ${D} -regex ".*\.la$" | xargs rm -f -- 
92    find ${D} -regex ".*\.a$" | xargs rm -f --
93  mkdir -p ${D}/usr/share/license
94  
95  
96 }
97
98 PACKAGES = ""
99 PACKAGES += "capi-web-url-download"
100 PACKAGES += "capi-web-url-download-devel"
101
102 capi-web-url-download_files = ""
103 capi-web-url-download_files += "capi-web-url-download.manifest"
104 capi-web-url-download_files += "/usr/lib/libcapi-web-url-download.so.*"
105 capi-web-url-download_files += "/usr/share/license/capi-web-url-download"
106
107 capi-web-url-download-devel_files = ""
108 capi-web-url-download-devel_files += "capi-web-url-download.manifest"
109 capi-web-url-download-devel_files += "capi-web-url-download.manifest"
110 capi-web-url-download-devel_files += "/usr/lib/libcapi-web-url-download.so"
111 capi-web-url-download-devel_files += "/usr/lib/pkgconfig/capi-web-url-download.pc"
112 capi-web-url-download-devel_files += "/usr/include/web/download.h"
113
114 FILES_${PN} = "${capi-web-url-download_files}"
115 FILES_${PN}-devel = "${capi-web-url-download-devel_files}"
116
117 PKG_capi-web-url-download= "capi-web-url-download"
118 PKG_capi-web-url-download-devel= "capi-web-url-download-devel"
119
120 require url-download-extraconf.inc