spec file fixes on pidora (fc20 on raspberry pi)

Former-commit-id: bf48ee50de
This commit is contained in:
Norayr Chilingarian 2014-09-14 21:30:59 +04:00
parent 7cf90615c8
commit 298585af02
2 changed files with 27 additions and 8 deletions

View file

@ -54,8 +54,14 @@ build rpm
if you'd like to build an rpm installer, then
* compress sources as voc-1.0.src.tar.bz2
* put them to /usr/src/redhat/SOURCES/ (or other similar location)
* run "rpmbuild -ba voc.spec
* compress sources as voc-1.0.src.tar.bz2
assuming you in voc directory
> cd ..
> tar -jcvpf voc-1.0.src.tar.bz2 voc
* put them to ~/rpmbuild/SOURCES (on some systems as root to /usr/src/redhat/SOURCES/) or other similar location.
> mkdir -p ~/rpmbuild/SOURCES
> cp voc-1.0.src.tar.bz2 ~/rpmbuild/SOURCES
* cd to voc directory and run
> rpmbuild -ba voc.spec
this should create voc rpm installers.

View file

@ -23,7 +23,7 @@
%define _datadir %{_prefix}/share
%define _includedir %{_prefix}/include
%define _libdir %{_prefix}/lib
%define packer %(finger -lp `echo "$USER"` | head -n 1 | cut -d: -f 3)
%define packer %(finger -lp `echo "$USER"` | head -n 1 | cut -d" " -f2)
Name: voc
Summary: Oberon-2 compiler
@ -34,13 +34,22 @@ Vendor: D. E. Evans <sinuhe@gnu.org>
Packager: %{packer}
Group: Development/Languages
Source: http://oberon.vishap.am/voc/voc-1.0.src.tar.bz2
# this is ~/rpmbuild/SOURCES/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
#BuildArch: i686
#mases this .spec more generic
BuildArch: %{_arch}
#BuildRequires: glibc-devel, libX11-devel
#makes this .spec more generic
#BuildArch: %{_arch}
#on modern rhel/fedora/pidora systems
BuildRequires: glibc-static, libX11-devel
#on older systems like rhel4 it'll be
#BuildRequires: glibc-devel, xorg-x11-devel
#basicly we neet /usr/include/X11/Xlib.h and /usr/lib/libc.a
#makes this more portable across different distributions
BuildRequires: /usr/include/X11/Xlib.h /usr/lib/libc.a
#BuildRequires: /usr/include/X11/Xlib.h /usr/lib/libc.a
%description
Vishap's Oberon Compiler (voc) uses a C backend to drive compilation
@ -57,6 +66,10 @@ echo Building %{name}-%{version}-%{release}
if [ %{_arch} == "i386" ] || [ %{_arch} == "i686" ]
then
%{__make} -f makefile.linux.gcc.x86
elif [ %{_arch} == "arm" ] #rpmbuild on pidora/raspberry identifies arch as arm
then
%{__make} -f makefile.linux.gcc.armv6j_hardfp
elif [ %{_arch} == "armv6hl" ]
then
%{__make} -f makefile.linux.gcc.armv6j_hardfp