Remove old conf image recipes.
[scm/bb/meta-tizen.git] / recipes-tizen / dlog / dlog.inc
1 DESCRIPTION = "Logging service"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Libraries"
4 LICENSE = "Apache-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 BBCLASSEXTEND = ""
13 PROVIDES = ""
14
15 #PROVIDES by libdlog
16
17
18 #PROVIDES by dlogutil
19
20
21 #PROVIDES by dlog
22
23
24 #PROVIDES by libdlog-dev
25
26
27 RDEPENDS = ""
28 #RDEPENDS of dlogutil (${PN}util)
29 RDEPENDS_${PN}util += "libdlog"
30
31 #RDEPENDS of libdlog-dev (lib${PN}-dev)
32 RDEPENDS_lib${PN}-dev += "libdlog"
33
34
35 DEPENDS = ""
36 #DEPENDS of dlog
37 DEPENDS += "systemd"
38 DEPENDS += "tizen-platform-config"
39
40 do_prep() {
41  cd ${S}
42  chmod -Rf a+rX,u+w,g-w,o-w ${S}
43  #setup -q
44  cp ${S}/packaging/dlog.manifest .
45  
46  
47 }
48 do_patch_append() {
49     bb.build.exec_func('do_prep', d)
50 }
51
52 do_configure() {
53 }
54
55 do_compile() {
56  cd ${S}
57  LANG=C
58  export LANG
59  unset DISPLAY
60  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
61  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
62  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
63  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
64  
65  
66    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
67    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
68    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
69    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
70          --target=x86_64-tizen-linux \
71          --program-prefix= \
72          --prefix=${prefix} \
73          --exec-prefix=${prefix} \
74          --bindir=${prefix}/bin \
75          --sbindir=${prefix}/sbin \
76          --sysconfdir=${sysconfdir} \
77          --datadir=${prefix}/share \
78          --includedir=${prefix}/include \
79          --libdir=${prefix}/lib \
80          --libexecdir=${prefix}/libexec \
81          --localstatedir=${localstatedir} \
82          --sharedstatedir=${prefix}/com \
83          --mandir=${mandir} \
84          --infodir=${infodir} --disable-static
85  oe_runmake -j16
86  
87  
88  
89 }
90
91 do_install() {
92  echo export RPM_BUILD_ROOT=${D}
93  cd ${S}
94  LANG=C
95  export LANG
96  unset DISPLAY
97  rm -rf ${D}
98  mkdir -p ${D}
99  
100  
101    oe_runmake \
102          DESTDIR=${D} \
103          INSTALL_ROOT=${D} \
104          BINDIR=${prefix}/bin \
105    install  
106    rm -f ${D}${infodir}/dir 
107    find ${D} -regex ".*\.la$" | xargs rm -f -- 
108    find ${D} -regex ".*\.a$" | xargs rm -f --
109  mkdir -p ${D}${sysconfdir}/dlog
110  cp platformlog.conf ${D}${sysconfdir}/dlog/platformlog.conf
111  cp dlogctrl ${D}${prefix}/bin/dlogctrl
112  
113  
114 }
115
116 pkg_postinst_libdlog() {
117     #!/bin/sh -e
118
119     [ "x\$D" == "x" ] && ldconfig
120 }
121
122 pkg_postrm_libdlog() {
123     #!/bin/sh -e
124
125     [ "x\$D" == "x" ] && ldconfig
126 }
127
128 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
129 PACKAGES += " libdlog "
130 PACKAGES += " dlogutil "
131 PACKAGES += " libdlog-dev "
132
133 libdlog_files = ""
134 libdlog_files += "dlog.manifest"
135 libdlog_files += "${sysconfdir}/dlog/platformlog.conf"
136 libdlog_files += "${prefix}/lib/libdlog.so.*"
137
138 dlogutil_files = ""
139 dlogutil_files += "dlog.manifest"
140 dlogutil_files += "${prefix}/bin/dlogctrl"
141
142 libdlog-dev_files = ""
143 libdlog-dev_files += "dlog.manifest"
144 libdlog-dev_files += "${prefix}/include/dlog/dlog.h"
145 libdlog-dev_files += "${prefix}/lib/pkgconfig/dlog.pc"
146 libdlog-dev_files += "${prefix}/lib/libdlog.so"
147
148 FILES_lib${PN} = "${libdlog_files}"
149 FILES_${PN}util = "${dlogutil_files}"
150 FILES_lib${PN}-dev = "${libdlog-dev_files}"
151
152 PKG_libdlog= "libdlog"
153 PKG_dlogutil= "dlogutil"
154 PKG_libdlog-dev= "libdlog-dev"
155
156 require dlog-extraconf.inc
157