build.rpm.sh.cmake 1.42 KB
Newer Older
1 2
#!/bin/sh

3 4 5 6
if [ -n "@AUTOTOOLS_AS_COMPILER@" ]
then
	export AS="@AUTOTOOLS_AS_COMPILER@"
fi
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
export CC="@AUTOTOOLS_C_COMPILER@"
export CXX="@AUTOTOOLS_CXX_COMPILER@"
export OBJC="@AUTOTOOLS_OBJC_COMPILER@"
export LD="@AUTOTOOLS_LINKER@"
export AR="@AUTOTOOLS_AR@"
export RANLIB="@AUTOTOOLS_RANLIB@"
export STRIP="@AUTOTOOLS_STRIP@"
export NM="@AUTOTOOLS_NM@"

export ASFLAGS="@ep_asflags@"
export CPPFLAGS="@ep_cppflags@"
export CFLAGS="@ep_cflags@"
export CXXFLAGS="@ep_cxxflags@"
export OBJCFLAGS="@ep_objcflags@"
export LDFLAGS="@ep_ldflags@"

export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"

export RPM_TOPDIR="@LINPHONE_BUILDER_WORK_DIR@/rpmbuild"

VERBOSE=""
Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
30
if [ @AUTOTOOLS_VERBOSE_MAKEFILE@ -eq 1 ]; then
31 32 33 34 35 36 37 38
	VERBOSE="--verbose"
fi

# SPEC_PREFIX=""
# if [ @LINPHONE_BUILDER_SPEC_PREFIX@ != "" ]; then
# 	SPEC_PREFIX="--define \"_prefix @LINPHONE_BUILDER_SPEC_PREFIX@\""
# fi

39
cd @ep_source@
40
# TODO rpmbuild -ba @ep_build@/@LINPHONE_BUILDER_SPEC_FILE@ --define "_topdir $RPM_TOPDIR" $SPEC_PREFIX --with bc $VERBOSE @ep_redirect_to_file@
41
rpmbuild -ba @ep_build@/@LINPHONE_BUILDER_SPEC_FILE@ \
42
	--define "_topdir $RPM_TOPDIR" --define '_PKG_CONFIG_PATH $PKG_CONFIG_PATH'\
43
	--define "_builddir @ep_source@" \
44 45 46
	@LINPHONE_BUILDER_RPMBUILD_GLOBAL_OPTION@ \
	@LINPHONE_BUILDER_RPMBUILD_OPTIONS@ \
	$VERBOSE @ep_redirect_to_file@