Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 0e341a352ca03372895684244a9ed05b > files > 4

libx86-1.1-12.mga3.src.rpm

%define major	1
%define libname	%mklibname x86 %{nil} %{major}
%define develname	%mklibname x86 -d

%bcond_without	uclibc

Name:		libx86
Version:	1.1
Release:	%mkrel 12
Summary:	Hardware-independent library for executing real-mode x86 code
Group:		System/Libraries
URL:		http://www.codon.org.uk/~mjg59/libx86/
Source:		http://www.codon.org.uk/~mjg59/libx86/downloads/%{name}-%{version}.tar.gz
Patch0:		libx86-0.99-ifmask.patch
# (RH/Dave Airlie):
Patch1:		libx86-add-pkgconfig.patch
License:	MIT
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
ExclusiveArch:	%{ix86} x86_64
%if %{with uclibc}
BuildRequires:	uClibc-devel
%endif

%description
It's often useful to be able to make real-mode x86 BIOS calls from userland.
lrmi provides a simple interface to this for x86 machines, but this doesn't
help on other platforms.

libx86 provides the lrmi interface, but will also run on platforms such as
amd64 and alpha.

%package -n	%{libname}
Summary:	Hardware-independent library for executing real-mode x86 code
Group:		System/Libraries

%description -n	%{libname}
It's often useful to be able to make real-mode x86 BIOS calls from userland.
lrmi provides a simple interface to this for x86 machines, but this doesn't
help on other platforms.

libx86 provides the lrmi interface, but will also run on platforms such as
amd64 and alpha.

This package contains the library needed to run programs dynamically
linked with %{name}.

%package -n	%{develname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	%{name}-devel = %{version}-%{release}

%description -n	%{develname}
This package contains the development files for %{name}.

%prep
%setup -q
%patch0 -p0
%patch1 -p1

%build
%if %{with uclibc}
%ifarch %ix86
%make CC=%{uclibc_cc} CFLAGS="%{uclibc_cflags}" static
%else
%make CC=%{uclibc_cc} BACKEND=x86emu CFLAGS="%{uclibc_cflags} -fPIC" static
%endif
mkdir -p uclibc
mv -f libx86.a uclibc/libx86.a
make clean
%endif

%ifarch %ix86
%make CFLAGS="%{optflags}"
%else
%make BACKEND=x86emu CFLAGS="%{optflags} -fPIC"
%endif

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} LIBDIR=%{_libdir} install
chmod 0644 %{buildroot}%{_libdir}/libx86.a
%if %{with uclibc}
install -m644 uclibc/libx86.a -D %{buildroot}%{uclibc_root}%{_libdir}/libx86.a
%endif

%clean
rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc COPYRIGHT
%{_libdir}/libx86.so.%{major}

%files -n %{develname}
%defattr(-,root,root)
%{_libdir}/libx86.a
%if %{with uclibc}
%{uclibc_root}%{_libdir}/libx86.a
%endif
%{_libdir}/libx86.so
%{_includedir}/libx86.h
%{_libdir}/pkgconfig/x86.pc





%changelog

* Sat Jan 12 2013 umeabot <umeabot> 1.1-12.mga3
+ Revision: 358501
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Aug 15 2011 tv <tv> 1.1-11.mga2
+ Revision: 133359
- actually ship pkgconfig file
- add pkgconfig support (needed for eg vbetool)

* Sat Jan 15 2011 blino <blino> 1.1-9.mga1
+ Revision: 18795
- remove old ldconfig scriptlets
- imported package libx86