From: Ronan Le Martret Date: Mon, 8 Apr 2013 15:18:41 +0000 (+0200) Subject: - change macro to build python-base. Now can switch install root for runtime/native... X-Git-Tag: rev_0.4~384 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=561835a6036eecef17c14eaf2723916a129c7786;p=scm%2Fbb%2Ftizen.git - change macro to build python-base. Now can switch install root for runtime/native pkg. --- diff --git a/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/macros b/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/macros index 0b45415..95b6406 100644 --- a/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/macros +++ b/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/macros @@ -53,7 +53,8 @@ # Deprecated, use %__xz instead. %__lzma %__xz --format=lzma %__xz /usr/bin/xz -%__make /usr/bin/make +%__make oe_runmake +#%__make /usr/bin/make %__mkdir /bin/mkdir %__mkdir_p /bin/mkdir -p %__mv /bin/mv @@ -70,7 +71,7 @@ %__unzip /usr/bin/unzip #Add for yocto -%fdupes /usr/bin/fdupes +%fdupes fdupes #============================================================================== # ---- Build system path macros. # diff --git a/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/tizen/macros b/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/tizen/macros index 0695a05..4b1f641 100644 --- a/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/tizen/macros +++ b/Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/tizen/macros @@ -82,36 +82,39 @@ --mandir=%{_mandir} \\\ --infodir=%{_infodir} + #TO Check %makeinstall \ %{__make} \\\ - BINDIR=%{?buildroot:%{buildroot}} \\\ - prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ - exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ - bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ - sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\ - sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\ - datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\ - includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\ - libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ - libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ - localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ - sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ - mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ - infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\ + BINDIR=%{_bindir} \\\ + prefix=%{_prefix} \\\ + exec_prefix=%{_exec_prefix} \\\ + bindir=%{_bindir} \\\ + sbindir=%{_sbindir} \\\ + sysconfdir=%{_sysconfdir} \\\ + datadir=%{_datadir} \\\ + includedir=%{_includedir} \\\ + libdir=%{_libdir} \\\ + libexecdir=%{_libexecdir} \\\ + localstatedir=%{_localstatedir} \\\ + sharedstatedir=%{_sharedstatedir} \\\ + mandir=%{_mandir} \\\ + infodir=%{_infodir} \\\ install + + #TO Check %make_install \ %{__make} \\\ DESTDIR=%{?buildroot:%{buildroot}} \\\ INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\ - BINDIR=%{?buildroot:%{buildroot}} \\\ + BINDIR=%{_bindir} \\\ install \ rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \ find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \ %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --} - + %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\ && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS") diff --git a/Tizen_TZ_package/spec2yocto.py b/Tizen_TZ_package/spec2yocto.py index fac63ce..fd28e28 100755 --- a/Tizen_TZ_package/spec2yocto.py +++ b/Tizen_TZ_package/spec2yocto.py @@ -248,6 +248,9 @@ class specParser: # command += " --define='RPM_OPT_FLAGS %s' " % "-O2 -g2 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -m64 -march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone" # command += " --define='configure #configure' " + #if "native" in self.__packagePN: + # #command += " --define='_makedir_bindir %%{?buildroot:%%{buildroot}}' " + # command += " --define='RPM_BUILD_ROOT %%{?buildroot:%%{buildroot}}%%{?buildroot:%%{buildroot}}' " pkgName=os.path.basename(tmp_package_spec_path)[:-5] @@ -291,8 +294,7 @@ class specParser: delete=False) as tmpSpecFile: tmpSpecFile.write(currentSpecString) tmp_package_spec_path=tmpSpecFile.name - - + if pkgName in ["attr","acl"]: currentSpecString=currentSpecString.replace('make configure','%configure') #currentSpecString=currentSpecString.replace('/lib/libattr.so\n','#/lib/libattr.so\n') @@ -637,7 +639,8 @@ class specParser: if res in ["MIT/X11",'X11/MIT']: res="MIT" - + if res in ['LGPLv2, AFLv2']: + res='LGPLv2' return res return "" @@ -1189,6 +1192,9 @@ class metaSpec: elif res == "automake": f.write("DEPENDS += \"automake-native\"\n") + elif res == "fdupes": + f.write("DEPENDS += \"fdupes-native\"\n") + elif res == "cmake": f.write("DEPENDS += \"cmake-native\"\n") diff --git a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass index 923530c..36e117b 100644 --- a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass +++ b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass @@ -64,7 +64,12 @@ do_install_prepend () { mkdir -p ${S}/../temp echo export S=${S} > ${S}/../temp/Bash_install echo export D=${D} >> ${S}/../temp/Bash_install - echo export RPM_BUILD_ROOT=${D} >> ${S}/../temp/Bash_install + if [[ ${PN} =~ "-native" ]]; + then + echo export RPM_BUILD_ROOT=${D}${STAGING_DIR}/${HOST_SYS} >> ${S}/../temp/Bash_install + else + echo export RPM_BUILD_ROOT=${D} >> ${S}/../temp/Bash_install + fi echo export bindir="/usr/bin" >> ${S}/../temp/Bash_install X=$base_prefix PATH="$X/usr/bin:$X/bin:$X/sbin:$X/usr/bin/perl-native:$PATH" spec2yocto "install" ${S}/${SPECFILES} ${PN} >> ${S}/../temp/Bash_install diff --git a/meta-tizen-ivi/recipes-tizen/python-base/python-base-depends.inc b/meta-tizen-ivi/recipes-tizen/python-base/python-base-depends.inc index 9f610b0..269ef48 100644 --- a/meta-tizen-ivi/recipes-tizen/python-base/python-base-depends.inc +++ b/meta-tizen-ivi/recipes-tizen/python-base/python-base-depends.inc @@ -2,6 +2,6 @@ DEPENDS = "" #DEPENDS of python-base DEPENDS += "zlib" DEPENDS += "bzip2" -DEPENDS += "fdupes" +DEPENDS += "fdupes-native" DEPENDS += "pkgconfig" DEPENDS += "automake-native"