SPECS: x86emu.spec - rel 3; adds klibc bcond, x86emu-klibc-makefile.patch, ...

mguevara mguevara at pld-linux.org
Thu Nov 13 22:06:28 CET 2008


Author: mguevara                     Date: Thu Nov 13 21:06:28 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rel 3; adds klibc bcond, x86emu-klibc-makefile.patch, provides
  x86emu-devel(klibc) when build with klibc

---- Files affected:
SPECS:
   x86emu.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/x86emu.spec
diff -u SPECS/x86emu.spec:1.5 SPECS/x86emu.spec:1.6
--- SPECS/x86emu.spec:1.5	Wed Jul 30 19:49:21 2008
+++ SPECS/x86emu.spec	Thu Nov 13 22:06:22 2008
@@ -1,9 +1,13 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_with	klibc	# use klibc for initramfs purposes
+
 Summary:	Intel x86 CPU real mode emulator
 Summary(pl.UTF-8):	Emulator trybu rzeczywistego procesorów Intel x86
 Name:		x86emu
 Version:	0.8
-Release:	2
+Release:	3
 License:	MIT
 Group:		Libraries
 Source0:	http://www.scitechsoft.com/ftp/devel/obsolete/x86emu/%{name}-%{version}.tar.gz
@@ -11,9 +15,11 @@
 Patch0:		%{name}-build.patch
 Patch1:		%{name}-update.patch
 Patch2:		%{name}-update-v86d.patch
+Patch3:		%{name}-klibc-makefile.patch
 URL:		http://www.scitechsoft.com/products/dev/x86_emulator.html
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+
 %description
 The SciTech x86emu is an emulator for executing Intel x86 real mode
 code on any CPU platform, including the Intel x86 CPU family. The
@@ -41,6 +47,9 @@
 Summary:	Header files and static x86emu library
 Summary(pl.UTF-8):	Pliki nagłówkowe i biblioteka statyczna x86emu
 Group:		Development/Libraries
+%if %{with klibc}
+Provides:	%{name}-devel(klibc)
+%endif
 
 %description devel
 Header files and static x86emu library.
@@ -53,8 +62,13 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
+%if %{with klibc}
+%{__make} -C scitech/src/x86emu -f makefile.klibc \
+	OPT="%{rpmcflags}"
+%else # klibc
 %{__make} -C scitech/src/x86emu -f makefile.linux \
 	CC="%{__cc}" \
 	OPT="%{rpmcflags}"
@@ -66,14 +80,15 @@
 	CC="%{__cc}" \
 	OPT="%{rpmcflags}"
 %endif
+%endif # klibc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+install -d $RPM_BUILD_ROOT{%{_libdir}%{?with_klibc:/klibc},%{_includedir}%{?with_klibc:/klibc}}
 
-install scitech/src/x86emu/libx86emu*.a $RPM_BUILD_ROOT%{_libdir}
-install scitech/include/x86emu.h $RPM_BUILD_ROOT%{_includedir}/x86emu.h
-cp -a scitech/include/x86emu $RPM_BUILD_ROOT%{_includedir}/x86emu
+install scitech/src/x86emu/libx86emu*.a $RPM_BUILD_ROOT%{_libdir}%{?with_klibc:/klibc}
+install scitech/include/x86emu.h $RPM_BUILD_ROOT%{_includedir}%{?with_klibc:/klibc}/x86emu.h
+cp -a scitech/include/x86emu $RPM_BUILD_ROOT%{_includedir}%{?with_klibc:/klibc}/x86emu
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -83,10 +98,10 @@
 %files devel
 %defattr(644,root,root,755)
 %doc scitech/src/x86emu/LICENSE
-%{_libdir}/libx86emu.a
-%{_libdir}/libx86emud.a
-%{_includedir}/x86emu.h
-%{_includedir}/x86emu
+%{_libdir}%{?with_klibc:/klibc}/libx86emu.a
+%{!?with_klibc:%{_libdir}/libx86emud.a}
+%{_includedir}%{?with_klibc:/klibc}/x86emu.h
+%{_includedir}%{?with_klibc:/klibc}/x86emu
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -94,6 +109,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2008/11/13 21:06:22  mguevara
+- rel 3; adds klibc bcond, x86emu-klibc-makefile.patch, provides
+  x86emu-devel(klibc) when build with klibc
+
 Revision 1.5  2008/07/30 17:49:21  qboosh
 - release 2 (builds on th-ppc)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/x86emu.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list