Dockerfile.raspberrypi 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. FROM ubuntu:trusty
  2. MAINTAINER Igor Khomyakov
  3. RUN apt-get update && \
  4. apt-get install -y make binutils autoconf automake autotools-dev libtool \
  5. pkg-config git curl dpkg-dev autopoint libcppunit-dev libxml2-dev \
  6. libgcrypt11-dev lzip
  7. RUN git clone https://github.com/raspberrypi/tools.git --depth=1 /tools
  8. ENV ARCH armhf
  9. ENV HOST arm-linux-gnueabihf
  10. ENV LOCAL_DIR /local
  11. ENV TOOL_BIN_DIR /tools/arm-bcm2708/gcc-linaro-$HOST-raspbian-x64/bin
  12. ENV PATH ${TOOL_BIN_DIR}:$PATH
  13. RUN mkdir $LOCAL_DIR && mkdir zlib && cd zlib && \
  14. curl -Ls -o - 'http://zlib.net/zlib-1.2.8.tar.gz' | \
  15. tar xzf - --strip-components=1 && \
  16. prefix=${LOCAL_DIR} \
  17. CC=$HOST-gcc \
  18. STRIP=$HOST-strip \
  19. RANLIB=$HOST-ranlib \
  20. AR=$HOST-ar \
  21. LD=$HOST-ld \
  22. ./configure --static \
  23. --libdir=$LOCAL_DIR/lib && \
  24. make -s && \
  25. make -s install
  26. RUN mkdir -p expat && cd expat && \
  27. curl -Ls -o - 'http://sourceforge.net/projects/expat/files/latest/download' | \
  28. tar xzf - --strip-components=1 && \
  29. ./configure \
  30. --host=$HOST \
  31. --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
  32. --enable-shared=no \
  33. --enable-static=yes \
  34. --prefix=${LOCAL_DIR} && \
  35. make -s && \
  36. make -s install
  37. RUN mkdir c-ares && cd c-ares && \
  38. curl -Ls -o - 'http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz' | \
  39. tar xzf - --strip-components=1 && \
  40. ./configure \
  41. --host=$HOST \
  42. --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
  43. --enable-shared=no \
  44. --enable-static=yes \
  45. --prefix=${LOCAL_DIR} && \
  46. make -s && \
  47. make -s install
  48. RUN mkdir gmp && cd gmp && \
  49. curl -Ls -o - 'https://gmplib.org/download/gmp/gmp-6.1.0.tar.lz' | \
  50. lzip -d | tar xf - --strip-components=1 && \
  51. ./configure \
  52. --disable-shared \
  53. --enable-static \
  54. --prefix=$LOCAL_DIR \
  55. --host=$HOST \
  56. --disable-cxx \
  57. --enable-fat && \
  58. make -s && \
  59. make -s install
  60. RUN mkdir sqlite && cd sqlite && \
  61. curl -Ls -o - 'https://www.sqlite.org/2016/sqlite-autoconf-3100100.tar.gz' | \
  62. tar xzf - --strip-components=1 && \
  63. ./configure \
  64. --disable-shared \
  65. --enable-static \
  66. --prefix=$LOCAL_DIR \
  67. --host=$HOST \
  68. --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` && \
  69. make -s && \
  70. make -s install
  71. RUN mkdir aria && cd aria && \
  72. curl -s 'https://api.github.com/repos/aria2/aria2/releases/latest' | \
  73. grep 'browser_download_url.*[0-9]\.tar\.bz2' | sed -e 's/^[[:space:]]*//' | \
  74. cut -d ' ' -f 2 | xargs -I % curl -Ls -o - '%' | tar xjf - --strip-components=1 && \
  75. ./configure \
  76. --host=$HOST \
  77. --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
  78. --disable-nls \
  79. --disable-ssl \
  80. --without-gnutls \
  81. --without-libxml2 \
  82. --with-libz --with-libz-prefix=${LOCAL_DIR} \
  83. --with-libexpat --with-libexpat-prefix=${LOCAL_DIR} \
  84. --with-slite3 --with-sqlite3-prefix=${LOCAL_DIR} \
  85. --with-libcares --with-libcares-prefix=${LOCAL_DIR} \
  86. --prefix=${LOCAL_DIR} \
  87. LDFLAGS="-L$LOCAL_DIR/lib" \
  88. PKG_CONFIG_PATH="$LOCAL_DIR/lib/pkgconfig" \
  89. ARIA2_STATIC=yes && \
  90. make -s && \
  91. make -s install-strip