[uClibc]initial RPM specfile and patch

Jon Nelson jnelson at securepipe.com
Mon May 21 16:29:11 UTC 2001


Here is my first take on an RPM specfile.
Also contained is a patch to help the packaging process.
I (almost certainly) goofed something up.
Anyway, here it is.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-1.patch
Type: application/x-patch
Size: 6310 bytes
Desc: uClibc-1.patch
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20010521/bea32214/attachment.bin 
-------------- next part --------------
%define name	uClibc
%define epoch   0
%define version	0.9.5
#%define release	%(date +"%Y-%b-%d" | sed -e 's/-/_/g')
%define release 1
%define serial  1

%define install_dir /usr/i386-linux-uclibc

Summary: uCLibc is a C library for embedded systems.
Name:	 %{name}
#Epoch:   %{epoch}
Version: %{version}
Release: %{release}
Serial:	 %{serial}
Copyright: LGPL
Group: Development/Libraries
URL:	 http://cvs.uclinux.org/uClibc.html
Source:	 ftp://uclibc.org/uClibc-snapshot.tar.gz
Patch1: uClibc-1.patch
#Patch2: uClibc-ldso.patch
Buildroot: /var/tmp/%{name}-%{version}

Packager: Jonathon D Nelson <jnelson at boa.org>

%changelog
* Mon May 14 2001 Jonathon D Nelson <jnelson at boa.org>
- Created redhat packages.

%package dev
Summary: uCLibc is a C library for embedded systems.
Group: Development/Libraries
Requires: uClibc

%description dev
uCLibc is a C library for embedded systems. You can
actually statically link a "Hello World" application
under x86 that only takes 4k (as opposed to 200k
under GNU libc). Some features are still a work in
progress, but for many things, this is a very sensible
choice.

%description
uCLibc is a C library for embedded systems. You can
actually statically link a "Hello World" application
under x86 that only takes 4k (as opposed to 200k
under GNU libc). Some features are still a work in
progress, but for many things, this is a very sensible
choice. 

%prep
%setup -n uClibc
%patch1 -p1
#%patch2 -p0

%build
#make CFLAGS="$RPM_OPT_FLAGS"
#echo "MALLOC = malloc-simple" >> Config
echo "MALLOC = malloc-930716" >> Config
echo "DODEBUG = true" >> Config
make
make shared
cd ldso
make clean
make DEVEL=true shared

%install
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT/ ; fi
PATH=/lib:$PATH make INSTALL_ROOT=$RPM_BUILD_ROOT install

%post
%{install_dir}/usr/sbin/ldconfig

%preun
if [ -d %{install_dir}/etc ]; then
  echo "Removing %{install_dir}/etc"
  rm -f %{install_dir}/etc/ld.so.cache
  rmdir %{install_dir}/etc
fi

%clean
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT/; fi

%files
%defattr(0644,root,root,0755)
%doc COPYING.LIB
%dir %{install_dir}
%dir %{install_dir}/etc
%dir %{install_dir}/lib
%dir %{install_dir}/usr
%dir %{install_dir}/usr/sbin
%{install_dir}/lib/*.o
%{install_dir}/lib/*.a
%attr(0755,root,root) %{install_dir}/lib/*.so*
%attr(0755,root,root) /lib/*
%attr(0755,root,root) %{install_dir}/usr/sbin/*

%files dev
%defattr(0644,root,root,0755)
%doc COPYING.LIB
%attr(0755,root,root) %{install_dir}/bin/*
%attr(0755,root,root) %{install_dir}/usr/bin/*
%dir %{install_dir}/include
%dir %{install_dir}/usr/bin
%dir %{install_dir}/bin
%{install_dir}/include/*
-------------- next part --------------
Jon Nelson              \|/ ____ \|/
jnelson at securepipe.com  "@'/ ,. \`@"
C and Python Programmer /_| \__/ |_\
Motorcycle Enthusiast      \__U_/


More information about the uClibc mailing list