first commit
[scm/bb/meta-tizen.git] / recipes-tizen / dbus-python / dbus-python.inc
1 DESCRIPTION = "Python bindings for D-Bus"
2 HOMEPAGE = "http://www.freedesktop.org/wiki/Software/DBusBindings/"
3 SECTION = "System/Libraries"
4 LICENSE = "MIT"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by dbus-python-devel 
13 PROVIDES += "dbus-python-devel"
14 RPROVIDES_dbus-python-devel += "dbus-python-devel"
15 RPROVIDES_dbus-python-devel += "dbus-python-dev"
16
17 #PROVIDES by dbus-python 
18 PROVIDES += "dbus-python"
19 RPROVIDES_dbus-python += "dbus-python"
20
21 RDEPENDS = ""
22 #RDEPENDS of dbus-python-devel (${PN}-devel)
23 RDEPENDS_${PN}-devel += "dbus"
24 RDEPENDS_${PN}-devel += "dbus-dev"
25 RDEPENDS_${PN}-devel += "dbus-python"
26
27 #RDEPENDS of dbus-python (${PN})
28 RDEPENDS_${PN} += "python-xml"
29 RDEPENDS_${PN} += "dbus"
30 RDEPENDS_${PN} += "libxml2-python"
31
32
33 DEPENDS = ""
34 #DEPENDS of dbus-python 
35 DEPENDS += "pkgconfig(dbus-1)"
36 DEPENDS += "fdupes-native"
37 DEPENDS += "python-devel"
38 DEPENDS += "dbus-glib"
39
40 do_patch() {
41  chmod -Rf a+rX,u+w,g-w,o-w ${S}
42  #setup -q 
43  cp ${S}/packaging/dbus-python.manifest .
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  export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fstack-protector -fno-strict-aliasing -fPIC"
61  
62    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
63    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
64    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
65    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
66          --target=x86_64-tizen-linux \
67          --program-prefix= \
68          --prefix=/usr \
69          --exec-prefix=/usr \
70          --bindir=/usr/bin \
71          --sbindir=/usr/sbin \
72          --sysconfdir=/etc \
73          --datadir=/usr/share \
74          --includedir=/usr/include \
75          --libdir=/usr/lib \
76          --libexecdir=/usr/libexec \
77          --localstatedir=/var \
78          --sharedstatedir=/usr/com \
79          --mandir=/usr/share/man \
80          --infodir=/usr/share/info --docdir=/usr/share/doc/packages/dbus-python
81  make -j16
82  
83  
84  
85 }
86
87 do_install() {
88  echo export RPM_BUILD_ROOT=${D}
89  LANG=C
90  export LANG
91  unset DISPLAY
92  rm -rf ${D} 
93  mkdir -p ${D} 
94  
95  
96    oe_runmake \
97          DESTDIR=${D} \
98          INSTALL_ROOT=${D} \
99          BINDIR=/usr/bin \
100    install  
101    rm -f ${D}/usr/share/info/dir 
102    find ${D} -regex ".*\.la$" | xargs rm -f -- 
103    find ${D} -regex ".*\.a$" | xargs rm -f --
104  
105  
106  
107    rm -rf ${D}/usr/share/info 
108    rm -rf ${D}/usr/share/doc/packages 
109    rm -rf ${D}/usr/share/doc/dbus-python 
110    rm -rf ${D}/usr/share/doc/dbus-python-1.1.1 
111    rm -rf ${D}/usr/share/gtk-doc 
112    rm -rf ${D}/usr/share/doc 
113    rm -rf ${D}/usr/share/man 
114    find ${D} -regex ".*/man/man./.*.[0-9]" | xargs rm -f -- 
115    find ${D} -regex ".*/man/../man./.*.[0-9]" | xargs rm -f -- 
116    find ${D} -regex ".*/man/man./.*.[0-9]pm" | xargs rm -f --
117  
118   _target=""; 
119   _symlinks=0; 
120   _symlinks=1; 
121   fdupes -q -n -r ${D} | 
122    while read _file; do 
123      if test -z "$_target" ; then 
124        _target="$_file"; 
125      else 
126        if test -z "$_file" ; then 
127         _target=""; 
128         continue ; 
129        fi ; 
130        if test "$_symlinks" = 1; then 
131          ln -sf "${_target#${D}}" "$_file"; 
132        else 
133          ln -f "$_target" "$_file"; 
134        fi ;
135      fi ; 
136   done 
137  
138  
139 }
140
141 PACKAGES = ""
142 PACKAGES += "dbus-python-devel"
143 PACKAGES += "dbus-python"
144
145 dbus-python-devel_files = ""
146 dbus-python-devel_files += "dbus-python.manifest"
147 dbus-python-devel_files += "/usr/include/dbus-1.0/dbus/dbus-python.h"
148 dbus-python-devel_files += "/usr/lib/pkgconfig/dbus-python.pc"
149
150 dbus-python_files = ""
151 dbus-python_files += "dbus-python.manifest"
152 dbus-python_files += "/usr/lib/python2.7/site-packages/*"
153 dbus-python_files += "/usr/lib/python2.7/site-packages/*"
154
155 FILES_${PN}-devel = "${dbus-python-devel_files}"
156 FILES_${PN} = "${dbus-python_files}"
157
158 PKG_dbus-python-devel= "dbus-python-devel"
159 PKG_dbus-python= "dbus-python"
160
161 require dbus-python-extraconf.inc