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