File l4env.spec of Package l4env
#
# spec file for package L4Env (Version 0.0.)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: l4env
BuildRequires: bison doxygen flex gcc gcc-c++ l4-base ncurses-devel zlib-devel zlib
License: GPL
Version: 820
BuildRequires: dice = %{version} dice-devel = %{version}
Release: 1
Summary: L4 environment - runtime
Group: L4
Requires: l4-base
Source: tud-l4env-snapshot-%version.tar.bz2
Source1: l4env-config-i386
Source2: l4env-servers-in-boot.txt
Patch1: l4env-external-packages.patch
Patch2: l4env-DESTDIR.patch
Patch3: l4env-value-out-of-range.patch
Patch4: l4env-l4linux-build.patch
Patch5: l4env-gcc-include.patch
Patch6: l4env-uclibc++.patch
Patch7: l4env-l4vfs.patch
Patch8: l4env-gendep.patch
Patch9: l4env-lxtemp.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
L4 environment - runtime
%package devel
Requires: l4env = %version
Requires: preprocess dice
Summary: L4 environment - development files
Group: Productivity/Security
%description devel
L4 environment - development files
%package doc
Requires: l4env
Summary: Documentation for the l4 development environment
Group: Documentation/HTML
%description doc
Documentation for the l4 development environment
%prep
%setup -q -n tud-l4env-snapshot-%version
cd l4
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
rm pkg/dope/examples/vscrtest -rf
%build
. %l4_sysconfdir/profile.sh
cd l4
mkdir _build
if test -e %_sourcedir/l4env-config-%l4_arch; then
cp %_sourcedir/l4env-config-%l4_arch _build/.Makeconf.bid
else
echo "No configuration for %_arch"
exit 1
fi
make O=_build oldconfig
make O=_build
%install
. %l4_sysconfdir/profile.sh
cd l4
make O=_build DESTDIR=%buildroot install
# some of the l4 binaries are needed for booting fiasco and l4linux,
# so copy these to /boot
install -d $RPM_BUILD_ROOT/boot/l4/bin
#pushd %l4_bindir
grep '^[^#]' %_sourcedir/l4env-servers-in-boot.txt | while read f; do
cp -a _build/bin/x86_586/"$f" $RPM_BUILD_ROOT/boot/l4/bin || exit 1
done
#popd
# hacks to make l4linux build with the installed l4env
mkdir -p %buildroot%l4_prefix/mk
cp -a mk/{Makeconf,config.inc,rel2abs.sh} %buildroot%l4_prefix/mk
cp _build/{.Makeconf.bid,Makeconf.bid.local{,.indep}} %buildroot%l4_prefix
# fix paths
sed -i 's|%_builddir/%buildsubdir/l4/_build|%l4_prefix/source|' \
%buildroot%l4_prefix/Makeconf.bid.local
sed -i 's|%_builddir/%buildsubdir/l4/_build/tool/gendep|%l4_prefix/tool/lib|' \
%buildroot%l4_prefix/Makeconf.bid.local.indep
sed -r 's|%_builddir/%buildsubdir(/_build)?|%l4_prefix|g' _build/Makefile \
>%buildroot%l4_prefix/Makefile
if grep '%_builddir' %buildroot%l4_prefix/Make* %buildroot%l4_prefix/mk/*; then
echo "Installed files point to %%builddir"
exit 1
fi
echo 'O=%l4_prefix' >%buildroot%l4_prefix/Makeconf.local
ln -s %l4_prefix %buildroot%l4_prefix/source
rm -rf %_builddir/%buildsubdir/l4/_build/tool/gendep
%clean
rm -rf %buildroot
%post
# the l4 build system requires an absolute symlink
# /usr/lib/rpm/brp-symlink has a different opinion about it, so let's create it
# here
rm -f %l4_prefix/source
ln -s %l4_prefix %l4_prefix/source
%files
%defattr(-, root, root)
/boot/l4
%l4_bindir/*
%l4_libdir/x86_586/l4v2/*.so
%doc l4/COPYING
%files devel
%defattr(-, root, root)
%l4_includedir/*
%l4_prefix/tool
%l4_prefix/mk
%ghost %l4_prefix/source
%l4_prefix/l4defs.inc
%l4_prefix/Make*
%l4_prefix/.Makeconf*
%dir %l4_libdir/x86_586
%dir %l4_libdir/x86_586/l4v2
%l4_libdir/x86_586/*.a
%l4_libdir/x86_586/l4v2/*.a
%l4_libdir/x86_586/*.o
%l4_libdir/x86_586/*.ld
%files doc
%defattr(-, root, root)
%l4_prefix/doc
%changelog -n l4env
* Wed Oct 18 2006 - mmarek@suse.cz
- updated to lates CVS
- install Makeconf.bid.local (for kernel-l4-2.6.18)
* Mon Sep 11 2006 - mmarek@suse.cz
- initial package created