changes to the spec file to compile on x86_64, x86, armv6hj_hardfp,

armv7a_hardfp
also makes this spec file less distribution specific:
* no glibc-static on rhel4/5
* xorg-devel is called xorg-x11-devel on rhel4
thus requierements are changed to search for header files, not package
names.
This commit is contained in:
Norayr Chilingarian 2014-09-11 13:25:21 +04:00
parent 143bd70de3
commit 15ca10d4ce

View file

@ -15,6 +15,8 @@
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
#some changes added by Norayr Chilingarian
%define _prefix /opt/%{name}-%{version}
%define _bindir %{_prefix}/bin
@ -33,8 +35,12 @@ Packager: %{packer}
Group: Development/Languages
Source: http://oberon.vishap.am/voc/voc-1.0.src.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
BuildArch: i686
BuildRequires: glibc-static, libX11-devel
#BuildArch: i686
#mases this .spec more generic
BuildArch: %{_arch}
#BuildRequires: glibc-devel, libX11-devel
#makes this more portable across different distributions
BuildRequires: /usr/include/X11/Xlib.h /usr/lib/libc.a
%description
Vishap's Oberon Compiler (voc) uses a C backend to drive compilation
@ -47,7 +53,19 @@ echo Building %{name}-%{version}-%{release}
%setup -q -n %{name}
%build
%{__make} -f makefile.linux.gcc.x86
#choose corresponding makefile depending on architecture.
if [ %{_arch} == "i386" ] || [ %{_arch} == "i686" ]
then
%{__make} -f makefile.linux.gcc.x86
elif [ %{_arch} == "armv6hl" ]
then
%{__make} -f makefile.linux.gcc.armv6j_hardfp
elif [ %{_arch} == "armv7" ]
then
%{__make} -f makefile.linux.gcc.armv7a_hardfp
else
%{__make} -f makefile.linux.gcc.%{_arch}
fi
%install
%{__install} -d %{buildroot}/%{_prefix}/bin