Commit 41bec228 authored by Eddy Beaupre's avatar Eddy Beaupre Committed by Alejandro Mery
Browse files

Fix issue when building on an arm CPU, configurable makedeb.

parent e1094bb4
......@@ -19,10 +19,12 @@ usb-boot
*.swp
*~
Makefile.in
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/missing
autom4te.cache
aclocal.m4
compile
configure
depcomp
install-sh
missing
config.guess
config.sub
......@@ -17,7 +17,7 @@ nodist_nand_part_a20_SOURCES = nand-part-a20.c
man_MANS = sunxi-tools.7
CROSS_COMPILE ?= arm-none-eabi-
CROSS_COMPILE ?= @XCOMPILER@
clean-local:
rm -f boot_head_sun4i.elf boot_head_sun5i.elf fel-sdboot.elf fel-pio.elf fel-pio.nm jtag-loop.elf boot_head_sun4i.bin boot_head_sun5i.bin fel-sdboot.bin fel-pio.bin jtag-loop.bin *~ *.deb
......
This diff is collapsed.
This diff is collapsed.
......@@ -11,10 +11,19 @@ AM_INIT_AUTOMAKE([1.9])
# Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
AC_CANONICAL_BUILD
if test x"$cross_compiling" != x"yes" ; then
AC_CHECK_PROG(ARMGCC_CHECK, arm-none-eabi-gcc, yes)
if test x"$ARMGCC_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install GNU Tools for ARM Embedded Processors before installing.])
AC_CHECK_PROG(ARM_NONE_EABI_CHECK, arm-none-eabi-gcc, yes)
if test x"$ARM_NONE_EABI_CHECK" != x"yes" ; then
AC_CHECK_PROG(ARM_LINUX_GNUEABIHF_CHECK, arm-linux-gnueabihf-gcc, yes)
if test x"$ARM_LINUX_GNUEABIHF_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install GNU Tools for ARM Embedded Processors.])
else
XCOMPILER="arm-linux-gnueabihf-"
fi
else
XCOMPILER="arm-none-eabi-"
fi
fi
......@@ -39,5 +48,7 @@ AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset munmap strchr strerror strtol strtoul])
AC_SUBST([XCOMPILER])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#!/bin/bash
WRKDIR="`pwd`"
ISOK=1
while [ "$ISOK" -eq "1" ]; do
while [ -z "${DEBFULLNAME}" ]; do
DEBFULLNAME=$(whiptail --title "Package configuration" --inputbox "\nYour Name" 9 40 3>&1 1>&2 2>&3)
done
while [ -z "${DEBEMAIL}" ] ; do
DEBEMAIL=$(whiptail --title "Package configuration" --inputbox "\nYour Email" 9 40 3>&1 1>&2 2>&3)
done
while [ -z "${RELEASETAG}" ] ; do
RELEASETAG=$(whiptail --title "Package configuration" --inputbox "\nRelease Tag (UNRELEASED/MAIN/CONTRIB/etc...)" 9 40 3>&1 1>&2 2>&3)
done
whiptail --title "Package configuration summary" --yesno " Maintainer Name : ${DEBFULLNAME}\nMaintainer Email : ${DEBEMAIL}\n Release Tag : ${RELEASETAG}\n\nIs this ok?" 11 60
ISOK="$?"
if [ "$ISOK" -gt "1" ] || [ "$ISOK" -lt "0" ]; then
exit
fi
if [ "$ISOK" -eq "1" ]; then
unset RELEASETAG
unset DEBFULLNAME
unset DEBEMAIL
fi
done
rm -rf dpkg
mkdir -p dpkg
#make distclean
#./configure
make dist-gzip
mv sunxi-tools-1.0.tar.gz dpkg/sunxi-tools_1.0.orig.tar.gz
cd dpkg
tar -xzvf sunxi-tools_1.0.orig.tar.gz
cd sunxi-tools-1.0
mkdir debian
echo "sunxi-tools (1.0-1) UNRELEASED; urgency=low" > debian/changelog
echo "sunxi-tools (1.0-1) ${RELEASETAG}; urgency=low" > debian/changelog
git log -1 --pretty=format:'%n * %s%n%n -- %cn <%ce> %cD%n' >> debian/changelog
echo "9" > debian/compat
cat > debian/control <<EOF
Source: sunxi-tools
Maintainer: ${DEBFULLNAME} <${DEBEMAIL}>
......@@ -60,11 +94,13 @@ EOF
chmod 755 debian/rules
mkdir -p debian/source
echo "3.0 (quilt)" > debian/source/format
debuild -us -uc
cd ${WRKDIR}
mv dpkg/*.deb .
rm -rf dpkg
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment