File rub-l4-secserv.spec of Package rub-l4-secserv

# norootforbuild


Name:           rub-l4-secserv
BuildRequires:  gcc-c++ libcppunit-devel dice-devel
BuildRequires:  l4env-devel = 820
License:        GPL v2 or later
Group:          l4
Summary:        rub-l4-secserv
Version:        1845
Release:        1
Source0:        rub-l4-secserv-%version.tar.bz2
Patch1:         rub-external-l4env.patch
Patch2:         compmgr-missing-include.patch
Patch3:         mGUI-install.patch
Patch4:         bridge-skip-l4lx-vpn.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
rub-l4-secserv

%package -n mGUI
Summary:        mGUI
Group:          l4
Requires:       l4-base
%description -n mGUI
mGUI

%package -n libmGUIClient-devel
Summary:        libmGUIClient development files
Group:          Development/Libraries/C and C++
Requires:       l4-base
%description -n libmGUIClient-devel
libmGUIClient development files

%package -n compmgr
Summary:        compmgr
Group:          l4
Requires:       l4-base
%description -n compmgr
compmgr

%package -n bridge
Summary:        bridge
Group:          l4
Requires:       l4-base
%description -n bridge
bridge

%package -n propmgr
Summary:        propmgr
Group:          l4
Requires:       l4-base
%description -n propmgr
propmgr

%package -n synctool
Summary:        synctool
Group:          l4
Requires:       l4-base
%description -n synctool
synctool


%prep
%setup -q
%patch1
%patch2
%patch3
%patch4

%build
autoreconf -fi
# XXX: build fails on uClibc (?) not providing the __stack_chk_fail functions
# with -fstack-protector enabled
# _FORTIFY_SOURCE doesn't work because of missing <bits/unistd.h>
export CFLAGS="$RPM_OPT_FLAGS -fno-stack-protector -U_FORTIFY_SOURCE -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
./configure --prefix=%l4_prefix --with-external-l4env=%l4_prefix
export INCLUDE=include SRC=src
make -C tcb/src/libraries/compartment
make -C tcb/src/libraries/mGUI
make -C tcb/src/libraries/utils
make -C tcb/src/libraries/crypto
make -C tcb/src/libraries/naming
make -C tcb/src/libraries/messages

make -C tcb/src/services/compartmentmgr
make -C tcb/src/services/mGUI
make -C tcb/src/services/bridge
make -C tcb/src/services/propmgr
make -C apps/bankdemo/synctool

%install
export DESTDIR=%buildroot
export INCLUDE=include SRC=src
make -C tcb/src/libraries/mGUI install

make -C tcb/src/services/compartmentmgr install
make -C tcb/src/services/mGUI install
make -C tcb/src/services/bridge install
make -C tcb/src/services/propmgr install
make -C apps/bankdemo/synctool install

mkdir %buildroot/%l4_bindir
mv %buildroot%l4_prefix/modules/* %buildroot%l4_bindir/
ln -s bridge %buildroot%l4_bindir/bridgeserver2

mkdir -p %buildroot/boot/l4/bin
mkdir -p %buildroot/sbin
cp %buildroot/%l4_bindir/mgui            %buildroot/boot/l4/bin/mgui
cp %buildroot/%l4_bindir/compmgr         %buildroot/boot/l4/bin/compmgr
cp %buildroot/%l4_bindir/compmgrclientl4 %buildroot/boot/l4/bin/compmgrclientl4
cp %buildroot/%l4_bindir/synctool           %buildroot/sbin/.
cp %buildroot/%l4_bindir/compmgrclientlinux %buildroot/sbin/.
cp %buildroot/%l4_bindir/bridge             %buildroot/sbin/.
ln -s bridge %buildroot/sbin/bridgeserver2

%clean
rm -rf $RPM_BUILD_ROOT

%files -n mGUI
%defattr(-,root,root)
%l4_bindir/mgui
/boot/l4/bin/mgui

%files -n libmGUIClient-devel
%defattr(-,root,root)
%l4_includedir/mgui
%l4_libdir/libmGUIClient.a

%files -n compmgr
%defattr(-,root,root)
%l4_bindir/compmgr*
/boot/l4/bin/compmgr*
/sbin/compmgr*

%files -n bridge
%defattr(-,root,root)
%l4_bindir/bridge*
/sbin/bridge
/sbin/bridgeserver2

%files -n propmgr
%defattr(-,root,root)
%l4_bindir/propmgrclient

%files -n synctool
%defattr(-,root,root)
%l4_bindir/synctool*
/sbin/synctool

%changelog
openSUSE Build Service is sponsored by