File uClibc.spec of Package uClibc
#
# spec file for package uClibc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Url: http://www.uclibc.org/
Name: uClibc
Version: 0.9.33.2
Release: 0
Summary: A full-featured C library optimized for size
License: LGPL-2.1+
Group: System/Libraries
BuildRequires: linux-kernel-headers
BuildRequires: ncurses-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: uClibc-0.9.33.2.tar.bz2
ExcludeArch: s390 s390x ppc64 ppc64le
%ifarch ppc
Source1: config.ppc
%endif
%ifarch x86_64
Source1: config.x86_64
%endif
%ifarch %ix86
Source1: config.i386
%endif
%ifarch ia64
Source1: config.ia64
%endif
%ifarch armv5tel
Source1: config.armel
%endif
%ifarch %arm
Source1: config.armhl
%endif
%ifarch m68k
Source1: config.m68k
%endif
Source2: gcc-uClibc.in
Source3: README.SUSE
Patch0: uClibc.Makefile-gcc-uClibc-wrapper.patch
Patch1: arm-fixclone.patch
%description
A full-featured C library optimized for size. uClibc (pronounced
yew-see-lib-see) is a C library for developing embedded Linux systems.
It is much smaller than the GNU C Library, but nearly all applications
supported by glibc also work perfectly with uClibc. Porting
applications from glibc to uClibc typically involves just recompiling
the source code. uClibc even supports shared libraries and threading.
Authors:
--------
Erik Andersen <andersen@codepoet.org>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
cp %{S:1} .config
cp %{S:2} gcc-uClibc.in
cp %{S:3} README.SUSE
%build
# compress man pages
gzip -9 docs/man/*
# make
make oldconfig
make %{?_smp_mflags}
# make with debug
#make V=1 make %{?_smp_mflags}
%clean
#rm -rf $RPM_BUILD_ROOT
%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/uClibc
install -m 755 gcc-uClibc $RPM_BUILD_ROOT/usr/bin
install -m 644 %{S:3} $RPM_BUILD_ROOT/%{_docdir}/uClibc
sed -i "s,$RPM_BUILD_ROOT,,g" $RPM_BUILD_ROOT/usr/bin/gcc-uClibc
%files
%defattr(-,root,root)
%doc README.* COPYING.LIB* DEDICATION.mjn3 MAINTAINERS INSTALL TODO docs/*
#These will come when shared library support will be enabled
#%dir /usr/lib/*-linux-uclibc/lib
#/usr/lib/*-linux-uclibc/lib/*.so.*
%package -n uClibc-devel
Requires: %{name} = %{version}
Summary: a full-featured C library optimized for size
Group: System/Libraries
Recommends: gcc
%description -n uClibc-devel
uClibc (aka µClibc/pronounced yew-see-lib-see) is a C library for
developing embedded Linux systems. It is much smaller than the GNU C
Library, but nearly all applications supported by glibc also work
perfectly with uClibc. Porting applications from glibc to uClibc
typically involves just recompiling the source code. uClibc even
supports shared libraries and threading.
Authors:
--------
Erik Andersen <andersen@codepoet.org>
%files -n uClibc-devel
%defattr(-,root,root)
%_bindir/gcc-uClibc
%dir /usr/lib/*-linux-uclibc
%dir /usr/lib/*-linux-uclibc/usr
%dir /usr/lib/*-linux-uclibc/usr/lib
%dir /usr/lib/*-linux-uclibc/usr/include
/usr/lib/*-linux-uclibc/usr/lib/*.[ao]
/usr/lib/*-linux-uclibc/usr/include/*
#These will come when shared library support will be enabled
#/usr/lib/*-linux-uclibc/lib/*.so
#/usr/lib/*-linux-uclibc/usr/lib/*.so
%changelog