Browse Source

Add crtmpserver

master
Ray Burgemeestre 5 years ago
parent
commit
5579d3fa3a
1 changed files with 45 additions and 0 deletions
  1. +45
    -0
      crtmpserver/Makefile

+ 45
- 0
crtmpserver/Makefile View File

@@ -0,0 +1,45 @@
SHELL:=/bin/bash

crtmpserver:
git clone https://github.com/rayburgemeestre/crtmpserver
pushd crtmpserver && git checkout lib
bash ../ubuntu1804.sh make impl
# make package

impl:
apt-get update
apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev
apt-get install -y libssl1.0-dev
# rm -rf crtmpserver/builders/cmake/CMakeCache.txt
# switch to clang 7, crtmpserver build broken with g++
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-7 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-7 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-7 40
pushd crtmpserver/builders/cmake && \
make clean || true && \
rm -rf CMakeCache.txt && \
CXX=$$(which c++) CXXFLAGS="-Wno-reserved-user-defined-literal -Wno-deprecated-declarations -Wno-varargs" LDFLAGS="-fPIC" COMPILE_STATIC=1 cmake . && \
make -j $$(nproc)

package:
rm -rf out
mkdir -p out/opt/cppse/build/crtmpserver/lib
mv -t out/opt/cppse/build/crtmpserver/lib/ \
crtmpserver/libcrtmpserver.a \
applications/appselector/libappselector.a \
applications/flvplayback/libflvplayback.a \
thelib/libthelib.a \
common/libcommon.a \
tinyxml/libtinyxml.a \
lua/liblua.a
rm -rf crtmpserver_1.0_amd64.deb
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -s dir -t deb -n crtmpserver --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "crtmpserver - build dependency" --url "https://github.com/rayburgemeestre/crtmpserver" --deb-generate-changes -C /src/out

clean:
rm -rf crtmpserver
rm -rf out

shell:
FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash

Loading…
Cancel
Save