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