summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-07-11 18:06:39 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-07-11 18:06:39 +0900
commitf22051cf85d1c8e5790c8dd42c66408cdef16ae3 (patch)
tree6391b830318e3e2228f509e202657e8812cf2d6a
parentfc211757188378a10e05450c5885ad664121e4ea (diff)
downloadmpfr-x86-tizen_2.2.tar.gz
mpfr-x86-tizen_2.2.tar.bz2
mpfr-x86-tizen_2.2.zip
-rw-r--r--packaging/baselibs.conf4
-rw-r--r--packaging/mpfr-x86.spec125
2 files changed, 87 insertions, 42 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
index 13c8182..a3e67d6 100644
--- a/packaging/baselibs.conf
+++ b/packaging/baselibs.conf
@@ -1,3 +1 @@
-arch i586 targets armv5tel:arm armv7l:arm armv7hl:arm armv7nhl:arm
-
-
+arch i586 targets armv5tel:arm armv6l:arm armv7l:arm armv7hl:arm armv7nhl:arm
diff --git a/packaging/mpfr-x86.spec b/packaging/mpfr-x86.spec
index ca3e403..9ca086f 100644
--- a/packaging/mpfr-x86.spec
+++ b/packaging/mpfr-x86.spec
@@ -1,31 +1,58 @@
-# meta spec file for cross-chroot setup
+%define __strip /bin/true
+%define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.vanish.rpm
+# meta spec file for cross-chroot setup
+#
+# Copyright (c) 2009-2011 Martin Mohring (martin.mohring@opensuse.org)
+# Copyright (c) 2011 5eEcoSystems (info@5eecosystems.com)
#
-# Copyright (c) 2010 Jan-Simon Möller (jsmoeller@linuxfoundation.org)
-# License: GPLv2
-
-## README
-##
-## In this file:
-## 1) define name of original package (see oldname)
-##
-## File binaries_to_prepare:
-## 2) fill in the binaries which need to be available to the foreign chroot
-## e.g. /bin/bash - this will make a i586 bash available
-##
+# All modifications and additions to the file contributed by third parties
+# remain the property of the copyright owners, unless otherwise agreed
+# upon. The cross build accelerators as is, and modifications
+# and additions to the it, are licensed under the GPLv2.
+# In addition, the cross build accelerators are licensed together with
+# a package where they will be contained in
+# under the license of the prestine package (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
#\/\/\/\/\/\/\/\/\/\/
### only changes here
+
#
# The original package name
%define oldname mpfr
+
#
# The architectures this meta package is built on
%define myexclusive i586
+
#
-### no changes needed below this line
-# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+# The required package for building this package
+# This can be distribution dependent. Good start is:
+# e.g. rpm grep tar sed patchelf
+#
+BuildRequires: rpm grep tar sed patchelf
+
+#
+# Additional required packages needed in addition to those of original package
+# e.g. (usually empty) for an accelerator to be 100% compatible
+#
+#Requires: <usuallyemptlylist>
+
+# For a real accelerator, also the old packge is required for compatibility
+# pls change this only if you know what you do
+Requires: %oldname
+#
+# Release under which to put the accelerator
+# e.g. 1 or higher
+#
+Release: 8.3
+### no changes needed below this line
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
### no changes needed
#
@@ -56,24 +83,19 @@
%define files_to_ignore %{expand:%(test -e %{_sourcedir}/files_to_ignore && echo 1 || echo 0)}
#
### no changes needed below this line
-%define __strip /bin/true
%define nodebug 1
-%define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm
Name: %newname
Version: %newversion
-Release: 7
AutoReqProv: 0
Provides: %newname
-BuildRequires: rpm grep tar patchelf sed -rpmlint-Moblin -rpmlint-mini -post-build-checks
BuildRequires: %oldname
-Requires: %oldname
# no auto requirements - they're generated
License: %newlicense
Group: %newgroup
ExclusiveArch: %myexclusive
-Summary: Don't use! %newsummary
+Summary: Dont use %newsummary !
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %binaries_to_prepare
Source10: binaries_to_prepare
@@ -157,7 +179,7 @@ rm filestoinclude2
echo ""
echo "[ .oO Preparing binaries Oo. ]"
echo ""
-mkdir %buildroot/%{_prefix}/share/applybinary/
+mkdir -p %buildroot/%{_prefix}/share/applybinary/
for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do
echo "Processing binary: $binary"
tmp="tmp.$$"
@@ -166,16 +188,18 @@ for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do
%else
debug="--debug"
%endif
- ldd $binary | grep -v "ld-linux" | grep -v "linux-gate" | sed -e "s#=.*##g" -e "s#^\t*##g" > $tmp
- deps=$(for i in `cat $tmp` ; do rpm -q --whatprovides "$i" | grep -v "no package"; done)
- cleandeps=$(echo "$cleandeps" "$deps" | sort | uniq | sed -e "s/-[0-9].*//g")
- patchelf $debug --set-rpath %newrpath %buildroot/$binary
- patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary
- patchelf $debug --set-rpath %newrpath %buildroot/$binary
- patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary
- if test -n "$debug"; then
- patchelf --print-rpath %buildroot/$binary
- patchelf --print-interpreter %buildroot/$binary
+ if file $binary | grep -q dynamic; then
+ ldd $binary | grep -v "ld-linux" | grep -v "linux-gate" | sed -e "s#=.*##g" -e "s#^\t*##g" > $tmp
+ deps=$(for i in `cat $tmp` ; do rpm -q --whatprovides "$i" | grep -v "no package"; done)
+ cleandeps=$(echo "$cleandeps" "$deps" | sort | uniq | sed -e "s/-[0-9].*//g")
+ patchelf $debug --set-rpath %newrpath %buildroot/$binary
+ patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary
+ patchelf $debug --set-rpath %newrpath %buildroot/$binary
+ patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary
+ if test -n "$debug"; then
+ patchelf --print-rpath %buildroot/$binary
+ patchelf --print-interpreter %buildroot/$binary
+ fi
fi
echo "$binary" >> %buildroot/%{_prefix}/share/applybinary/%name
echo ""
@@ -238,28 +262,38 @@ shellquote " targettype arm requires \"tizen-accelerator\"" >> /tmp/baselibs_ne
# replace native with x86 binaries as defined in file
%if %binaries_to_prepare
+# Todo: error handling if .orig-arm is present
for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do
- shellquote " targettype arm post \" mv ${binary} ${binary}.orig-arm ; ln -s <prefix>${binary} ${binary} \"" >> /tmp/baselibs_new.conf
+ shellquote " targettype arm post \" if test -e ${binary}.orig-arm -a -h ${binary}; then \" " >> /tmp/baselibs_new.conf
+ shellquote " targettype arm post \" echo \"${binary}.orig-arm already present - skipping.\" \" " >> /tmp/baselibs_new.conf
+ shellquote " targettype arm post \" else \" " >> /tmp/baselibs_new.conf
+ shellquote " targettype arm post \" mv ${binary} ${binary}.orig-arm ; ln -s <prefix>${binary} ${binary} \"" >> /tmp/baselibs_new.conf
+ shellquote " targettype arm post \" fi \" " >> /tmp/baselibs_new.conf
done
shellquote " " >> /tmp/baselibs_new.conf
for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do
- shellquote " targettype arm preun \" rm -f ${binary} ; mv ${binary}.orig-arm ${binary}\"" >> /tmp/baselibs_new.conf
+
+ shellquote " targettype arm preun \" if test -e ${binary}.orig-arm ; then \"" >> /tmp/baselibs_new.conf
+ shellquote " targettype arm preun \" rm -f ${binary} ; mv ${binary}.orig-arm ${binary}\"" >> /tmp/baselibs_new.conf
+ shellquote " targettype arm preun \" fi \"" >> /tmp/baselibs_new.conf
+
done
%endif
cat /tmp/baselibs_new.conf >> %{_sourcedir}/baselibs.conf
-# Print requirements
-echo ""
+echo "################################################################################"
echo ""
echo ""
echo "REQUIREMENTS:"
-grep "requires" %{_sourcedir}/baselibs.conf
-echo ""
+grep "requires" %{_sourcedir}/baselibs.conf | sort | uniq | sed -e "s# targettype.*requires ##g" | while read k ; do
+ echo "CBinstall: $k"
+done
+echo "Runscripts: %{newname}-arm"
echo ""
echo ""
-sleep 2
+echo "################################################################################"
set -x
%clean
@@ -270,3 +304,16 @@ rm -rf $RPM_BUILD_ROOT
%if %binaries_to_prepare
/%{_prefix}/share/applybinary/%name
%endif
+%changelog
+* Fri Jul 6 2012 UkJung Kim <ujkim@samsung.com> - 1.0
+- Added and updated OBS-Accelerator-0.1.tar.bz2
+* Thu Apr 28 2011 Jan-Simon Möller <jsmoeller@linuxfoundation.org> - 1.0
+- Add rpmlintrc. Fix for BMC#16104.
+* Sun Apr 24 2011 Jan-Simon Möller <jsmoeller@linuxfoundation.org> - 1.0
+- Add baselibs.conf to src.rpm
+* Tue Jan 4 2011 Carsten Munk <carsten@maemo.org> - 1.0
+- Add armv7hl and armv7nhl support, part of fix for BMC#12112
+* Tue May 4 2010 Jan-Simon Möller <jsmoeller@linuxfoundation.org> - 1.0
+- Update to armv7 crossbuild.
+* Wed Apr 21 2010 Jan-Simon Möller <jsmoeller@linuxfoundation.org> - 1.0
+- Initial version on meego.com