#!/bin/bash set -ex D=${PWD} rm -rf tmp/MEDIATOMB mkdir tmp/MEDIATOMB cp -a ${D}/module/* ${D}/tmp/MEDIATOMB/ cp -a ${D}/tmp/install/* ${D}/tmp/MEDIATOMB/system/ mkdir -p ${D}/tmp/MEDIATOMB/system/var/mediatomb/ # clean out development remains not needed in the release #find ${D}/tmp/MEDIATOMB/system -name '*.so' | xargs rm -f rm -rf ${D}/tmp/MEDIATOMB/system/lib/pkgconfig/ rm -rf ${D}/tmp/MEDIATOMB/system/include rm -rf ${D}/tmp/MEDIATOMB/system/bin/*-config rm -rf ${D}/tmp/MEDIATOMB/system/share/aclocal/ # Binary file pushd ${D}/tmp/ VERSION=$(LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${D}/tmp/MEDIATOMB/system/lib" ${D}/tmp/MEDIATOMB/system/bin/xml2 \ < ${D}/module/Configure/install.rdf | grep /rdf:RDF/md:Install/md:Version | cut -d "=" -f 2) tar cfvz ${D}/N5200_MEDIATOMB-${VERSION}.mod --owner 0 --group 0 MEDIATOMB/ popd # Source file mkdir N5200_MEDIATOMB-${VERSION}-src cp -a build.sh release.sh module sources N5200_MEDIATOMB-${VERSION}-src tar cfvz ${D}/N5200_MEDIATOMB-${VERSION}-src.tar.gz --owner 0 --group 0 N5200_MEDIATOMB-${VERSION}-src rm -rf N5200_MEDIATOMB-${VERSION}-src