1 DESCRIPTION = "The RPM Package Manager"
2 HOMEPAGE = "http://www.rpm.org"
3 SECTION = "Base/Package Management"
10 inherit autotools-brokensep
14 #PROVIDES by rpm-security-plugin
17 #PROVIDES by rpm-build
18 # the PROVIDES rules is ignore "rpmbuild "
19 PROVIDES += "rpmbuild"
20 RPROVIDES_rpm-build += "rpmbuild"
21 # the PROVIDES rules is ignore "rpm:${prefix}/bin/rpmbuild "
22 PROVIDES += "rpm:${prefix}/bin/rpmbuild"
23 RPROVIDES_rpm-build += "rpm:${prefix}/bin/rpmbuild"
26 #PROVIDES by rpm-locale
27 # the PROVIDES rules is ignore "rpm-lang-all = 4.11.0.1"
28 PROVIDES += "rpm-lang-all"
29 RPROVIDES_rpm-locale += "rpm-lang-all"
36 # the PROVIDES rules is ignore "rpminst "
38 RPROVIDES_rpm += "rpminst"
39 # the PROVIDES rules is ignore "rpm-libs "
40 PROVIDES += "rpm-libs"
41 RPROVIDES_rpm += "rpm-libs"
48 #RDEPENDS of rpm-security-plugin (${PN}-security-plugin)
49 RDEPENDS_${PN}-security-plugin += "libxml2"
50 RDEPENDS_${PN}-security-plugin += "smack"
51 RDEPENDS_${PN}-security-plugin += "nss"
52 RDEPENDS_${PN}-security-plugin += "rpm"
54 #RDEPENDS of rpm-build (${PN}-build)
55 RDEPENDS_${PN}-build += "bzip2"
56 RDEPENDS_${PN}-build += "make"
57 RDEPENDS_${PN}-build += "gcc"
58 RDEPENDS_${PN}-build += "patch"
59 RDEPENDS_${PN}-build += "xz"
60 RDEPENDS_${PN}-build += "eglibc"
61 RDEPENDS_${PN}-build += "findutils"
62 RDEPENDS_${PN}-build += "gzip"
63 RDEPENDS_${PN}-build += "rpm"
64 RDEPENDS_${PN}-build += "binutils"
66 #RDEPENDS of rpm-locale (${PN}-locale )
67 RDEPENDS_${PN}-locale += "rpm"
69 #RDEPENDS of rpm-dev (${PN}-dev)
70 RDEPENDS_${PN}-dev += "rpm"
71 RDEPENDS_${PN}-dev += "popt"
79 DEPENDS += "findutils"
91 DEPENDS += "libtool-cross"
92 #Replace "DEPENDS" on gettext by "inherit gettext"
103 chmod -Rf a+rX,u+w,g-w,o-w ${S}
104 #setup -q -n rpm-4.11.0.1
106 cp ${S}/packaging/rpm.manifest .
108 tar xjf ${S}/packaging/db-4.8.30.tar.bz2
111 # will get linked from db3
113 patch -p0 < ${S}/packaging/db-4.8.30-integration.dif
115 if [ -s /etc/rpm/tizen_macros ]; then
116 cp -a /etc/rpm/tizen_macros ${S}/packaging/rpm-tizen_macros
118 cp -a ${S}/packaging/rpm-tizen_macros tizen_macros
126 bb.build.exec_func('do_prep', d)
137 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
138 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
139 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
140 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
143 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
145 export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -ffunction-sections"
146 export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
148 BUILDTARGET="--build=x86_64-tizen-linux"
151 ./configure --disable-dependency-tracking --prefix=${prefix} --mandir=${mandir} --infodir=${infodir} \
152 --libdir=${prefix}/lib --sysconfdir=/etc --localstatedir=/var --with-lua \
153 --with-acl --with-cap --enable-shared --with-msm $BUILDTARGET
163 echo export RPM_BUILD_ROOT=${D}
171 mkdir -p ${D}/usr/lib
172 mkdir -p ${D}/usr/share/locale
173 ln -s ../share/locale ${D}/usr/lib/locale
178 BINDIR=${prefix}/bin \
180 rm -f ${D}${infodir}/dir
181 find ${D} -regex ".*\.la$" | xargs rm -f --
182 find ${D} -regex ".*\.a$" | xargs rm -f --
183 install -m 644 db3/db.h ${D}/usr/include/rpm
184 # remove .la file and the static variant of libpopt
185 # have to remove the dependency from other .la files as well
186 #for f in ${D}/${prefix}/lib/*.la; do
187 # sed -i -e "s,/lib/libpopt.la,-lpopt,g" $f
189 mkdir -p ${D}${sysconfdir}/rpm
190 cp -a tizen_macros ${D}/usr/lib/rpm
191 mkdir -p ${D}/usr/lib/rpm/tizen
192 install -m 755 ${S}/packaging/find-docs.sh ${D}/usr/lib/rpm/tizen
193 install -m 755 ${S}/packaging/find-provides.ksyms ${D}/usr/lib/rpm
194 install -m 644 ${S}/packaging/device-sec-policy ${D}${sysconfdir}/device-sec-policy
195 install -m 644 ${S}/packaging/device-sec-policy ${D}${prefix}/lib/rpm-plugins/msm-device-sec-policy
196 ln -s ../tizen_macros ${D}/usr/lib/rpm/tizen/macros
197 for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
198 mkdir -p ${D}/usr/src/packages/$d
199 chmod 755 ${D}/usr/src/packages/$d
201 for d in ${D}/usr/lib/rpm/platform/*-linux/macros ; do
202 dd=${d%-linux/macros}
204 mkdir ${D}/usr/src/packages/RPMS/$dd
205 chmod 755 ${D}/usr/src/packages/RPMS/$dd
207 mkdir -p ${D}/var/lib/rpm
208 gzip -9 ${D}/${mandir}/man[18]/*.[18]
209 export RPM_BUILD_ROOT
211 rm -rf doc/manual/Makefile*
212 rm -f ${D}/usr/lib/rpmpopt
213 rm -rf ${D}${mandir}/{fr,ja,ko,pl,ru,sk}
214 rm -f ${D}${prefix}/share/locale/de/LC_MESSAGES/rpm.mo
215 rm -f ${D}/usr/lib/rpm/cpanflute ${D}/usr/lib/rpm/cpanflute2
216 install -m 755 scripts/find-supplements{,.ksyms} ${D}/usr/lib/rpm
217 install -m 755 scripts/firmware.prov ${D}/usr/lib/rpm
218 install -m 755 scripts/debuginfo.prov ${D}/usr/lib/rpm
219 rm -f ${D}/usr/lib/locale ${D}/usr/lib/rpmrc
220 mkdir -p ${D}/etc/rpm
221 chmod 755 ${D}/etc/rpm
222 mkdir -p ${D}/usr/lib/rpm/macros.d
223 # remove some nonsense or non-working scripts
224 pushd ${D}/usr/lib/rpm/
225 for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
226 magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
227 brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
228 rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
232 for i in /usr/share/automake-*/*; do
233 if test -f "$i" && test -f "${i##*/}"; then
238 rm -rf ${D}/${prefix}/lib/python2.7
239 rm -f ${D}${prefix}/lib/*.la
240 rm -f ${D}${prefix}/lib/rpm-plugins/*.la
241 sh ${D}/usr/lib/rpm/find-lang.sh ${D} rpm
246 PACKAGES += " rpm-security-plugin "
247 PACKAGES += " rpm-build "
248 PACKAGES += " rpm-docs "
250 rpm-security-plugin_files = ""
251 rpm-security-plugin_files += "rpm.manifest"
252 rpm-security-plugin_files += "${prefix}/lib/rpm-plugins/msm.so"
253 rpm-security-plugin_files += "${prefix}/lib/rpm-plugins/msm-device-sec-policy"
254 rpm-security-plugin_files += "${sysconfdir}/device-sec-policy"
257 rpm-build_files += "rpm.manifest"
258 rpm-build_files += "${prefix}/bin/rpmbuild"
259 rpm-build_files += "${prefix}/bin/gendiff"
260 rpm-build_files += "${prefix}/bin/rpmspec"
261 rpm-build_files += "${prefix}/bin/rpmsign"
262 rpm-build_files += "/usr/lib/rpm/tizen/find-*"
263 rpm-build_files += "/usr/lib/rpm/brp-*"
264 rpm-build_files += "/usr/lib/rpm/find-supplements*"
265 rpm-build_files += "/usr/lib/rpm/check-*"
266 rpm-build_files += "/usr/lib/rpm/debugedit"
267 rpm-build_files += "/usr/lib/rpm/find-debuginfo.sh"
268 rpm-build_files += "/usr/lib/rpm/find-lang.sh"
269 rpm-build_files += "/usr/lib/rpm/find-provides.ksyms"
270 rpm-build_files += "/usr/lib/rpm/*provides*"
271 rpm-build_files += "/usr/lib/rpm/*requires*"
272 rpm-build_files += "/usr/lib/rpm/*deps*"
273 rpm-build_files += "/usr/lib/rpm/*.prov"
274 rpm-build_files += "/usr/lib/rpm/*.req"
275 rpm-build_files += "/usr/lib/rpm/macros.*"
276 rpm-build_files += "/usr/lib/rpm/fileattrs"
279 rpm-dev_files += "rpm.manifest"
280 rpm-dev_files += "${prefix}/bin/rpmgraph"
281 rpm-dev_files += "/usr/include/rpm"
282 rpm-dev_files += "${prefix}/lib/librpm.so"
283 rpm-dev_files += "${prefix}/lib/librpmbuild.so"
284 rpm-dev_files += "${prefix}/lib/librpmio.so"
285 rpm-dev_files += "${prefix}/lib/librpmsign.so"
286 rpm-dev_files += "${prefix}/lib/pkgconfig/rpm.pc"
288 rpm-locale_files = ""
291 rpm-docs_files += "GROUPS"
294 rpm_files += "rpm.manifest"
295 rpm_files += "/etc/rpm"
296 rpm_files += "/bin/rpm"
297 rpm_files += "${prefix}/bin/rpm2cpio"
298 rpm_files += "${prefix}/bin/rpmdb"
299 rpm_files += "${prefix}/bin/rpmkeys"
300 rpm_files += "${prefix}/bin/rpmquery"
301 rpm_files += "${prefix}/bin/rpmverify"
302 rpm_files += "${prefix}/bin/rpmqpack"
303 rpm_files += "%dir /usr/lib/rpm"
304 rpm_files += "/usr/lib/rpm/macros"
305 rpm_files += "/usr/lib/rpm/macros.d"
306 rpm_files += "/usr/lib/rpm/rpmpopt*"
307 rpm_files += "/usr/lib/rpm/rpmrc"
308 rpm_files += "/usr/lib/rpm/tizen/macros"
309 rpm_files += "/usr/lib/rpm/tizen_macros"
310 rpm_files += "/usr/lib/rpm/rpm.supp"
311 rpm_files += "/usr/lib/rpm/tgpg"
312 rpm_files += "/usr/lib/rpm/platform"
313 rpm_files += "${prefix}/lib/rpm-plugins"
314 rpm_files += "${prefix}/lib/rpm-plugins/exec.so"
315 rpm_files += "${prefix}/lib/librpm.so.*"
316 rpm_files += "${prefix}/lib/librpmio.so.*"
317 rpm_files += "${prefix}/lib/librpmbuild.so.*"
318 rpm_files += "${prefix}/lib/librpmsign.so.*"
319 rpm_files += "/var/lib/rpm"
320 rpm_files += "%attr(755,root,root) /usr/src/packages/BUILD"
321 rpm_files += "%attr(755,root,root) /usr/src/packages/SPECS"
322 rpm_files += "%attr(755,root,root) /usr/src/packages/SOURCES"
323 rpm_files += "%attr(755,root,root) /usr/src/packages/SRPMS"
325 FILES_${PN}-security-plugin = "${rpm-security-plugin_files}"
326 FILES_${PN}-build = "${rpm-build_files}"
327 FILES_${PN}-dev = "${rpm-dev_files}"
328 FILES_${PN}-locale = "${rpm-locale_files}"
329 FILES_${PN}-docs = "${rpm-docs_files}"
330 FILES_${PN} = "${rpm_files}"
332 PKG_rpm-security-plugin= "rpm-security-plugin"
333 PKG_rpm-build= "rpm-build"
334 PKG_rpm-dev= "rpm-dev"
335 PKG_rpm-locale= "rpm-locale"
336 PKG_rpm-docs= "rpm-docs"
339 require rpm-extraconf.inc