## $Id: dietlibc.spec,v 1.3 2005/02/01 12:03:17 ensc Exp $ ## This package understands the following switches: ## Fedora Extras specific customization below... ## %ifarch %ix86 x86_64 arm %global do_dyn 1 %else %global do_dyn 0 %endif %if %do_dyn %global with_dyn 1 %endif %ifarch %ix86 %global target_cpu i386 %else %global target_cpu %_target_cpu %endif %{!?release_func:%global release_func() %1%{?dist}.1} Summary: Small libc implementation Name: dietlibc Version: 0.30 Release: %release_func 4 License: GPL Group: Development/Libraries URL: http://www.fefe.de/dietlibc/ Source0: http://www.kernel.org/pub/linux/libs/dietlibc/%name-%version.tar.bz2 Source1: http://www.fefe.de/dietlibc/%name-%version.tar.bz2.sig Patch1: dietlibc-0.28-setpriority.patch Patch10: dietlibc-0.29-scall.patch Patch20: dietlibc-0.29-nostackprotector.patch Patch30: dietlibc-0.30-longdouble.patch Patch40: dietlibc-0.30-gnuokay.patch Patch50: dietlibc-0.30-x86_64-lseek64.patch Patch60: dietlibc-0.30-x86_64-stat64.patch BuildRoot: %_tmppath/%name-%version-%release-buildroot %{?with_dyn:Requires: dietlibc-lib = %version-%release} %package lib Summary: Dynamic libraries for dietlibc Group: System Environment/Libraries %description The diet libc is a libc that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64. %description lib The diet libc is a libc that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64. This package contains the dynamic libraries for dietlibc. %prep %setup -q %patch1 -p1 -b .nice %patch10 -p1 -b .scall %patch20 -p1 -b .nostackprotector %patch30 -p1 -b .longdouble %patch40 -p1 -b .gnuokay %patch50 -p1 -b .lseek64 %patch60 -p1 -b .stat64 sed -i -e 's!strip !: !g' Makefile sed -i -e 's!^#define WANT_SSP$!// \0!g; s!.*\(#define WANT_STACKGAP\).*!\1!g' dietfeatures.h %if "%{?rhel}" == "5" %global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-stack-protector -Os %else %global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -Os %endif %global basemakeflags prefix=%_libdir/dietlibc BINDIR=%_bindir MAN1DIR=%_mandir/man1 COMMENT=: CFLAGS="$RPM_OPT_FLAGS %fixcflags" PDIET=%_libdir/dietlibc %global makeflags %basemakeflags %build make %makeflags all %{?_smp_mflags} # 'dyn' target is not SMP safe %{?with_dyn:make %makeflags dyn} %install rm -rf $RPM_BUILD_ROOT install -d -m755 $RPM_BUILD_ROOT/etc make %makeflags DESTDIR=$RPM_BUILD_ROOT install ln -s lib-%_arch ${RPM_BUILD_ROOT}%_libdir/dietlibc/lib-%_arch-%_vendor %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{?with_dyn:%exclude %_libdir/dietlibc/*/*.so} %doc AUTHOR BUGS CAVEAT CHANGES COPYING FAQ PORTING README* %doc SECURITY THANKS TODO %doc %_mandir/*/* %_bindir/* %_libdir/dietlibc %if %do_dyn %files lib %defattr(-,root,root,-) %config(noreplace) %_sysconfdir/* %dir %_libdir/dietlibc %dir %_libdir/dietlibc/lib-* %_libdir/dietlibc/lib-%target_cpu/*.so %endif %changelog * Mon May 14 2007 Shad L. Lords 0.30-4.1 - Add 64 bit stat and lseek functions - Enable gnu safe functions * Wed Jan 17 2007 David Woodhouse 0.30-4 - Bump release to be higher than unexplained 0.30-3.fc6 * Wed Jan 17 2007 David Woodhouse 0.30-3 - Apply workaround for GCC PR26374 to build on PPC again (#182118) * Fri Sep 15 2006 Enrico Scholz - 0.30-2 - rebuilt * Sun Jul 9 2006 Enrico Scholz - 0.30-1 - updated to 0.30 - removed cross-arch support - disable (non-working) SSP support; enable old stackgap code instead of * Sat Feb 18 2006 Enrico Scholz - 0.29-6 - added '-Os' to the CFLAGS - exclude PPC arch due to strange compilation errors * Sun Oct 30 2005 Enrico Scholz - 0.29-4 - added '-fno-stack-protector' to the CFLAGS * Sun Oct 30 2005 Enrico Scholz - 0.29-3 - removed '-fstack-protector' from CLI because it uses __stack_chk_fail which is not provided by dietlibc * Thu May 26 2005 Enrico Scholz - 0.29-2 - rebuilt * Tue May 24 2005 Enrico Scholz - 0.29-1 - updated to 0.29 - unset some compiler options which cause errors with gcc4 - rediffed -scall patch - removed most patches as already in upstream * Thu May 19 2005 Enrico Scholz - 0.28-6 - use %%dist instead of %%disttag - package some more %%doc files (reported by Chris Ricker) - add %%release to the BuildRoot (reported by Chris Ricker) - fixed URLs of the sources (reported by Chris Ricker) * Sun May 1 2005 Enrico Scholz - 0.28-5 - added Herbert Poetzl's syscall(2) implementation for x86_64 and sparc* architectures (see http://vserver.13thfloor.at/Experimental/delta-diet.diff); rediffed the .call patch - catch the case when syscall(2) is used on archs where it is not implemented yet - define MADV_* constants on HPPA and IA64 archs - fix *truncate64() handling on 64bit archs * Fri Mar 4 2005 Enrico Scholz - 0.28-4 - rebuild - fixed compilation with gcc4 - made nice(2) SUSv3 compliantly on x86_64 and other platforms (patch provided by Colin Hill) - build the dynamic libs for x86, x86_64 and arm only - fixed PPC issues in ISO mode (do not use the 'powerpc' macro but the '__powerpc__' one) - added some O_* -flags for the HPPA arch - use more modern flags for '-Os' * Tue Feb 1 2005 Enrico Scholz - 1:0.28-1 - updated to 0.28 - unset LD_RUN_PATH which would result in empty rpaths else - removed the waitpid patch; it is solved upstream * Tue Aug 17 2004 Enrico Scholz - 1:0.27-1 - updated to 0.27 * Fri Jun 11 2004 Enrico Scholz - 1:0.26-1 - updated to 0.26 * Fri Apr 9 2004 Enrico Scholz - 1:0.25-1 - updated to 0.25 * Sat Jan 17 2004 Enrico Scholz - 1:%VERSION.90.%DATE}-5 - renewed -snprintf patch * Tue Jan 6 2004 Enrico Scholz - 1:%VERSION.90.%DATE}-4 - applied -snprintf patch (from fedora dietlibc-0.24-2 package) * Tue Dec 30 2003 Enrico Scholz - 1:%VERSION.90.%DATE}-2 - added C99 patch * Thu Dec 4 2003 Enrico Scholz - 1:0.24-1 - updated to 0.24 * Tue Sep 16 2003 Enrico Scholz - 1:0.23-1 - updated to 0.23 * Fri Nov 8 2002 Enrico Scholz 1:0.21-1 - updated to 0.21 - removed unpackaged files in %%install-stage * Thu Jul 11 2002 Enrico Scholz 1:0.18-1 - updated to 0.18 * Thu Jul 4 2002 Enrico Scholz - Initial build.