1 SRC_URI += "file://disable_debuginfo.patch \
2 file://disable_shortcircuited.patch \
3 file://fix_libdir.patch \
4 file://rpm-scriptetexechelp.patch \
5 file://fix-python-rpm-conf.patch \
6 file://rpmmodule.c.patch \
7 file://python-rpm.Makefile.am.patch \
11 DEPENDS += "popt-native"
12 DEPENDS += "uthash-native"
13 DEPENDS += "smack-native"
14 DEPENDS += "acl-native"
15 DEPENDS += "lua-native"
16 DEPENDS += "python-native"
18 CFLAGS_append = " -DRPM_VENDOR_OE "
20 #BBCLASSEXTEND += " nativesdk "
22 do_compile_prepend() {
27 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
28 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
29 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir }" ; export FFLAGS ;
30 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
33 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
35 export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -ffunction-sections"
36 export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
38 export CCFLAGS+=" -fPIC "
39 export CXXFLAGS+=" -fPIC "
40 export CFLAGS+=" -fPIC "
43 ./configure --build=${TARGET_SYS} --host=x86_64-linux-gnu
46 cp db3/configure db3/configure.ac
48 export CFLAGS+=" -DRPM_VENDOR_OE "
56 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
57 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
58 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir }" ; export FFLAGS ;
59 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
61 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
63 export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -ffunction-sections"
64 export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
66 BUILDTARGET="--host=x86_64-linux-gnu "
69 CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ;
70 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} " ; export CXXFLAGS ;
71 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir } " ; export FFLAGS ;
72 export CFLAGS+=" -DRPM_VENDOR_OE "
74 ./configure --host=${HOST_SYS} \
75 --target=x86_64-tizen-linux \
78 --exec-prefix=${prefix} \
79 --bindir=${prefix}/bin \
80 --sbindir=${prefix}/sbin \
81 --sysconfdir=${sysconfdir} \
82 --datadir=${prefix}/share \
83 --includedir=${prefix}/include \
84 --libdir=${prefix}/lib \
85 --libexecdir=${prefix}/libexec \
86 --localstatedir=${localstatedir} \
87 --sharedstatedir=${prefix}/com \
89 --infodir=${infodir} \
90 --disable-dependency-tracking \
96 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
97 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
108 echo export RPM_BUILD_ROOT=${D}
116 mkdir -p ${D}${prefix}/lib
117 mkdir -p ${D}${prefix}/share/locale
118 ln -s ../share/locale ${D}${prefix}/lib/locale
123 BINDIR=${prefix}/bin \
125 rm -f ${D}${infodir}/dir
126 find ${D} -regex ".*\.la$" | xargs rm -f --
127 find ${D} -regex ".*\.a$" | xargs rm -f --
128 install -m 644 db3/db.h ${D}${prefix}/include/rpm
129 mkdir -p ${D}${sysconfdir}/rpm
130 cp -a tizen_macros ${D}${prefix}/lib/rpm
131 mkdir -p ${D}${prefix}/lib/rpm/tizen
132 install -m 755 ${S}/packaging/find-docs.sh ${D}${prefix}/lib/rpm/tizen
133 install -m 755 ${S}/packaging/find-provides.ksyms ${D}${prefix}/lib/rpm
134 install -m 644 ${S}/packaging/device-sec-policy ${D}${sysconfdir}/device-sec-policy
135 install -m 644 ${S}/packaging/device-sec-policy ${D}${prefix}/lib/rpm-plugins/msm-device-sec-policy
136 ln -s ../tizen_macros ${D}${prefix}/lib/rpm/tizen/macros
137 for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
138 mkdir -p ${D}${prefix}/src/packages/$d
139 chmod 755 ${D}${prefix}/src/packages/$d
141 for d in ${D}${prefix}/lib/rpm/platform/*-linux/macros ; do
142 dd=${d%-linux/macros}
144 mkdir -p ${D}${prefix}/src/packages/RPMS/$dd
145 chmod 755 ${D}${prefix}/src/packages/RPMS/$dd
147 mkdir -p ${D}${localstatedir}/lib/rpm
148 gzip -9 ${D}${mandir}/man[18]/*.[18]
149 export RPM_BUILD_ROOT
151 rm -rf doc/manual/Makefile*
152 rm -f ${D}${prefix}/lib/rpmpopt
153 rm -rf ${D}${mandir}/{fr,ja,ko,pl,ru,sk}
154 rm -f ${D}${prefix}/share/locale/de/LC_MESSAGES/rpm.mo
155 rm -f ${D}${prefix}/lib/rpm/cpanflute ${D}${prefix}/lib/rpm/cpanflute2
156 install -m 755 scripts/find-supplements{,.ksyms} ${D}${prefix}/lib/rpm
157 install -m 755 scripts/firmware.prov ${D}${prefix}/lib/rpm
158 install -m 755 scripts/debuginfo.prov ${D}${prefix}/lib/rpm
159 rm -f ${D}${prefix}/lib/locale ${D}${prefix}/lib/rpmrc
160 mkdir -p ${D}${sysconfdir}/rpm
161 chmod 755 ${D}${sysconfdir}/rpm
162 mkdir -p ${D}${prefix}/lib/rpm/macros.d
163 # remove some nonsense or non-working scripts
164 pushd ${D}${prefix}/lib/rpm/
165 for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
166 magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
167 brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
168 rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
172 for i in ${prefix}/share/automake-*/*; do
173 if test -f "$i" && test -f "${i##*/}"; then
178 rm -f ${D}${prefix}/lib/*.la
179 rm -f ${D}${prefix}/lib/rpm-plugins/*.la
185 #sh ${D}${prefix}/lib/rpm/find-lang.sh ${D} rpm
193 do_install_append() {
195 rm -fr ${D}/var/volatile
197 mkdir -p ${D}${prefix}/lib/rpm/bin
198 ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit
199 ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore
202 FILES_${PN}-dbg += "\
203 ${libdir}/rpm-plugins/.debug/* \
204 ${libdir}/python2.7/site-packages/rpm/.debug/* \
207 PROVIDES += " python-rpm "
209 DEPENDS_native += "popt-native"
210 DEPENDS_native += "uthash-native"
211 DEPENDS_native += "smack-native"