Jaromir Capik 5648da
# TLSFLAGS are set in order to avoid a bogus check in
Jaromir Capik 5648da
# libselinux/src/Makefile.
Jaromir Capik 5648da
srpm libselinux
Jaromir Capik 5648da
mcd $BUILDDIR/t-libselinux
Jaromir Capik 5648da
rsync -av $SRC/libselinux*/ ./
Jaromir Capik 5648da
# libselinux uses $prefix/include for both -I and *.pc, which
Jaromir Capik 5648da
# prevents cross compiling.
Jaromir Capik 5648da
sed 's@-I$(INCLUDEDIR)@@' < src/Makefile > src/Makefile.stage1
Jaromir Capik 5648da
mv src/Makefile.stage1 src/Makefile
Jaromir Capik 5648da
make $J \
Jaromir Capik 5648da
    CC=${TARGET}-gcc \
Jaromir Capik 5648da
    AS=${TARGET}-as \
Jaromir Capik 5648da
    AR=${TARGET}-ar \
Jaromir Capik 5648da
    STRIP=${TARGET}-strip \
Jaromir Capik 5648da
    RANLIB=${TARGET}-ranlib \
Jaromir Capik 5648da
    CFLAGS="" \
Jaromir Capik 5648da
    TLSFLAGS="" \
Jaromir Capik 5648da
    all
Jaromir Capik 5648da
ARGS="DESTDIR=${ROOTFS}"
Jaromir Capik 5648da
if [ "$SUFFIX" = "64" ]
Jaromir Capik 5648da
then
Jaromir Capik 5648da
    ARGS="$ARGS LIBDIR=${ROOTFS}/usr/lib64 SHLIBDIR=${ROOTFS}/usr/lib64"
Jaromir Capik 5648da
fi
Jaromir Capik 5648da
make $J $ARGS install