Ver código fonte

Merge pull request #64 from linuxserver/release-4.2_3.7

bump alpine 3.7, fix continuation lines, linting fixes
sparklyballs 8 anos atrás
pai
commit
e1e7730dcc
3 arquivos alterados com 53 adições e 31 exclusões
  1. 51 30
      Dockerfile
  2. 1 0
      README.md
  3. 1 1
      root/etc/services.d/tvheadend/run

+ 51 - 30
Dockerfile

@@ -1,25 +1,25 @@
-FROM lsiobase/alpine:3.6
-MAINTAINER saarg
+FROM lsiobase/alpine:3.7
 
-# package version
+# set version label
+ARG BUILD_DATE
+ARG VERSION
+LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
+LABEL maintainer="saarg"
+
+# package versions
 ARG ARGTABLE_VER="2.13"
 ARG TVH_VER="release/4.2"
 ARG TZ="Europe/Oslo"
 ARG XMLTV_VER="0.5.69"
 
-# set version label
-ARG BUILD_DATE
-ARG VERSION
-LABEL build_version="Build-date:- ${BUILD_DATE}"
-
-# Environment settings
+# environment settings
 ENV HOME="/config"
 
 # copy patches
 COPY patches/ /tmp/patches/
 
-# install build packages
 RUN \
+ echo "**** install build packages ****" && \
  apk add --no-cache --virtual=build-dependencies \
 	autoconf \
 	automake \
@@ -35,10 +35,12 @@ RUN \
 	libhdhomerun-dev \
 	libressl-dev \
 	libtool \
+	libvpx-dev \
 	libxml2-dev \
 	libxslt-dev \
 	make \
 	mercurial \
+	opus-dev \
 	patch \
 	pcre2-dev \
 	perl-dev \
@@ -46,12 +48,13 @@ RUN \
 	sdl-dev \
 	uriparser-dev \
 	wget \
+	x264-dev \
+	x265-dev \
 	zlib-dev && \
  apk add --no-cache --virtual=build-dependencies \
 	--repository http://nl.alpinelinux.org/alpine/edge/testing \
 	gnu-libiconv-dev && \
-
-# install runtime packages
+ echo "**** install runtime packages ****" && \
  apk add --no-cache \
 	bsd-compat-headers \
 	bzip2 \
@@ -64,9 +67,11 @@ RUN \
 	libhdhomerun-libs \
 	libressl \
 	libssl1.0 \
+	libvpx \
 	libxml2 \
 	libxslt \
 	linux-headers \
+	opus \
 	pcre2 \
 	perl \
 	perl-archive-zip \
@@ -124,22 +129,21 @@ RUN \
 	tar \
 	uriparser \
 	wget \
+	x264 \
+	x265 \
 	zlib && \
  apk add --no-cache \
 	--repository http://nl.alpinelinux.org/alpine/edge/testing \
 	gnu-libiconv && \
-
-# install perl modules for xmltv
+ echo "**** install perl modules for xmltv ****" && \
  curl -L http://cpanmin.us | perl - App::cpanminus && \
  cpanm --installdeps /tmp/patches && \
-
-# build dvb-apps
+ echo "**** build dvb-apps ****" && \
  hg clone http://linuxtv.org/hg/dvb-apps /tmp/dvb-apps && \
  cd /tmp/dvb-apps && \
  make -C lib && \
  make -C lib install && \
-
-# build tvheadend
+ echo "**** build tvheadend ****" && \
  git clone -b ${TVH_VER} --single-branch https://github.com/tvheadend/tvheadend.git /tmp/tvheadend && \
  cd /tmp/tvheadend && \
  ./configure \
@@ -159,10 +163,21 @@ RUN \
 	--mandir=/usr/share/man \
 	--prefix=/usr \
 	--sysconfdir=/config && \
- make && \
+  echo "**** attempt to set number of cores available for make to use ****" && \
+ set -ex && \
+ CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \
+ if echo $CPU_CORES | grep -E  -q '^[0-9]+$'; then \
+	: ;\
+ if [ "$CPU_CORES" -gt 7 ]; then \
+	CPU_CORES=$(( CPU_CORES  - 3 )); \
+ elif [ "$CPU_CORES" -gt 5 ]; then \
+	CPU_CORES=$(( CPU_CORES  - 2 )); \
+ elif [ "$CPU_CORES" -gt 3 ]; then \
+	CPU_CORES=$(( CPU_CORES  - 1 )); fi \
+ else CPU_CORES="1"; fi && \
+ make -j $CPU_CORES && \
  make install && \
-
-# build XMLTV
+ echo "**** build XMLTV ****" && \
  curl -o \
  /tmp/xmtltv-src.tar.bz2 -L \
 	"http://kent.dl.sourceforge.net/project/xmltv/xmltv/${XMLTV_VER}/xmltv-${XMLTV_VER}.tar.bz2" && \
@@ -170,12 +185,19 @@ RUN \
  /tmp/xmtltv-src.tar.bz2 -C \
 	/tmp --strip-components=1 && \
  cd "/tmp/xmltv-${XMLTV_VER}" && \
+ echo "**** Perl 5.26 fixes for XMTLV ****" && \
+ sed "s/use POSIX 'tmpnam';//" -i filter/tv_to_latex && \
+ sed "s/use POSIX 'tmpnam';//" -i filter/tv_to_text && \
+ sed "s/\(lib\/set_share_dir.pl';\)/.\/\1/" -i grab/it/tv_grab_it.PL && \
+ sed "s/\(filter\/Grep.pm';\)/.\/\1/" -i filter/tv_grep.PL && \
+ sed "s/\(lib\/XMLTV.pm.in';\)/.\/\1/" -i lib/XMLTV.pm.PL && \
+ sed "s/\(lib\/Ask\/Term.pm';\)/.\/\1/" -i Makefile.PL && \
+ PERL5LIB=`pwd` && \
  echo -e "yes" | perl Makefile.PL PREFIX=/usr/ INSTALLDIRS=vendor && \
- make && \
+ make -j $CPU_CORES && \
  make test && \
  make install && \
-
-# build argtable2
+ echo "**** build argtable2 ****" && \
  ARGTABLE_VER1="${ARGTABLE_VER//./-}" && \
  mkdir -p \
 	/tmp/argtable && \
@@ -189,21 +211,20 @@ RUN \
  cd /tmp/argtable && \
  ./configure \
 	--prefix=/usr && \
- make && \
+ make -j $CPU_CORES && \
  make check && \
  make install && \
-
-# build comskip
+ echo "***** build comskip ****" && \
  git clone git://github.com/erikkaashoek/Comskip /tmp/comskip && \
  cd /tmp/comskip && \
  ./autogen.sh && \
  ./configure \
 	--bindir=/usr/bin \
 	--sysconfdir=/config/comskip && \
- make && \
+ make -j $CPU_CORES && \
+ set +ex && \
  make install && \
-
-# cleanup
+ echo "***** cleanup ****" && \
  apk del --purge \
 	build-dependencies && \
  rm -rf \

+ 1 - 0
README.md

@@ -160,6 +160,7 @@ You need to enable minimum advanced view level to see the picons options..
 
 ## Versions
 
++ **11.12.2017:** Rebase to alpine 3.7, linting fixes.
 + **13.07.2017:** Increase uniformity across all archs.
 + **08.07.2017:** Update README with full path for comskip.
 + **02.07.2017:** Move to one branch for all 4.2 releases.

+ 1 - 1
root/etc/services.d/tvheadend/run

@@ -1,6 +1,6 @@
 #!/usr/bin/with-contenv bash
 
-RUN_ARRAY=(${RUN_OPTS})
+IFS=" " read -r -a RUN_ARRAY <<< "$RUN_OPTS"
 
 exec \
         s6-setuidgid abc /usr/bin/tvheadend -C -c /config "${RUN_ARRAY[@]}"