Add weston
[scm/bb/tizen.git] / meta-tizen-generic / recipes-tizen / python-rpm / python-rpm.inc
1 DESCRIPTION = "Python Bindings for Manipulating RPM Packages"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Base/Package Management"
4 LICENSE = "GPL-2.0+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 PROVIDES = ""
13
14 #PROVIDES by python-rpm 
15
16
17 RDEPENDS = ""
18 #RDEPENDS of python-rpm (${PN})
19 RDEPENDS_${PN} += "rpm"
20
21
22 DEPENDS = ""
23 #DEPENDS of python-rpm 
24 #Replace "DEPENDS" on gettext by "inherit gettext"
25 inherit gettext
26 DEPENDS += "attr"
27 DEPENDS += "ncurses"
28 DEPENDS += "libxml2"
29 DEPENDS += "elfutils"
30 DEPENDS += "zlib"
31 DEPENDS += "uthash"
32 DEPENDS += "bzip2"
33 DEPENDS += "acl"
34 DEPENDS += "xz"
35 DEPENDS += "lua"
36 DEPENDS += "smack"
37 DEPENDS += "libtool-cross"
38 DEPENDS += "file"
39 DEPENDS += "popt"
40 DEPENDS += "libcap"
41 DEPENDS += "nss"
42 inherit pythonnative
43
44 do_prep() {
45  cd ${S}
46  chmod -Rf a+rX,u+w,g-w,o-w ${S}
47  #setup -q -n rpm-4.11.0.1
48  
49  
50  
51 }
52 do_patch_append() {
53     bb.build.exec_func('do_prep', d)
54 }
55
56 do_configure() {
57 }
58
59 do_compile() {
60  cd ${S}
61  LANG=C
62  export LANG
63  unset DISPLAY
64  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
65  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
66  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
67  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
68  
69  
70  
71  
72  
73 }
74
75 do_install() {
76  echo export RPM_BUILD_ROOT=${D}
77  cd ${S}
78  LANG=C
79  export LANG
80  unset DISPLAY
81  rm -rf ${D} 
82  mkdir -p ${D} 
83  
84  mkdir -p ${D}${prefix}/lib
85  # only installing in python/ does not work because rpm links against
86  # installed libs at install time
87  
88    oe_runmake \
89          DESTDIR=${D} \
90          INSTALL_ROOT=${D} \
91          BINDIR=${prefix}/bin \
92    install  
93    rm -f ${D}${infodir}/dir 
94    find ${D} -regex ".*\.la$" | xargs rm -f -- 
95    find ${D} -regex ".*\.a$" | xargs rm -f --
96  find ${D} -not -type d -and -not -path ${D}${prefix}/lib/python*/site-packages/rpm/\* -print0 | xargs -0 rm
97  pushd ${D}/${prefix}/lib/python*/site-packages/rpm
98  rm -f _rpmmodule.a _rpmmodule.la
99  #python ${prefix}/lib/python*/py_compile.py *.py
100  #python -O ${prefix}/lib/python*/py_compile.py *.py
101  popd
102  
103  
104 }
105
106
107 python-rpm_files = ""
108 python-rpm_files += "${prefix}/lib/python*/*/*"
109
110 FILES_${PN} = "${python-rpm_files}"
111
112 PKG_python-rpm= "python-rpm"
113
114 require python-rpm-extraconf.inc
115