Author: tommat                       Date: Wed Feb 16 23:21:26 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added with uClibc bcond
- fixed with dietlibc bcond
- new style bconds

---- Files affected:
SPECS:
   ash.spec (1.69 -> 1.70) 

---- Diffs:

================================================================
Index: SPECS/ash.spec
diff -u SPECS/ash.spec:1.69 SPECS/ash.spec:1.70
--- SPECS/ash.spec:1.69 Fri Dec 17 18:56:26 2004
+++ SPECS/ash.spec      Thu Feb 17 00:21:21 2005
@@ -1,11 +1,14 @@
 # $Revision$, $Date$
 #
 # Conditional build
-# --without static     - don't build static
-# --with dietlibc      - link with dietlibc, implies --without static)
+%bcond_without static          # don't build static
+%bcond_with    dietlibc        # link with dietlibc, implies --without static)
+%bcond_with    uClibc          # link with uclibc
 # Branch: HEAD
 
-%{?_with_dietlibc:%define _without_static 1}
+%if %{with dietlibc}
+%undefine      with_static
+%endif
 
 Summary:       Small bourne shell from Berkeley
 Summary(de):   Kleine Bourne-Shell von Berkeley
@@ -48,9 +51,13 @@
 Patch20:       %{name}-sighup.patch
 Patch21:       %{name}-dietlibc.patch
 BuildRequires: byacc
-%{?_with_dietlibc:BuildRequires:       dietlibc-static}
+%{?with_dietlibc:BuildRequires:        dietlibc-devel}
 BuildRequires: flex
-%{!?_without_static:BuildRequires:     glibc-static}
+%if %{with static}
+%{?without_uClibc:BuildRequires: glibc-static}
+%{?with_uClibc:BuildRequires: uClibc-static > 2:0.9.27-1}
+%endif
+%{?with_uClibc:BuildRequires: uClibc-devel > 2:0.9.27-1}
 Requires(post,preun,verify):   grep
 Requires(preun):       fileutils
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -171,10 +178,12 @@
 
 %build
 
-%{?_with_dietlibc:%define __cc %{_arch}-dietlibc-gcc}
+%define __cc %{_target_cpu}-pld-linux-gcc
+%{?with_dietlibc:%define __cc %{_target_cpu}-dietlibc-gcc}
+%{?with_uClibc:%define __cc %{_target_cpu}-uclibc-gcc}
 
-%{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static 
%{rpmldflags}"}
-%{!?_without_static:mv -f sh ash.static}
+%{?with_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static 
%{rpmldflags}" CC="%{__cc}"}
+%{?with_static:mv -f sh ash.static}
 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
 
 %install
@@ -182,7 +191,7 @@
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
 
 install sh $RPM_BUILD_ROOT%{_bindir}/ash
-%{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
+%{?with_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
 ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
@@ -254,9 +263,11 @@
 %attr(755,root,root) %{_bindir}/bsh
 %{_mandir}/man1/*
 
-%{!?_without_static:%files static}
-%{!?_without_static:%defattr(644,root,root,755)}
-%{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}
+%if %{with static}
+%files static
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/ash.static
+%endif
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -264,6 +275,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.70  2005/02/16 23:21:21  tommat
+- added with uClibc bcond
+- fixed with dietlibc bcond
+- new style bconds
+
 Revision 1.69  2004/12/17 17:56:26  sparky
 - Spanish summary/description fixes
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ash.spec?r1=1.69&r2=1.70&f=u


_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to