nixpkgs/pkgs/applications/video/makemkv/builder.sh

41 lines
757 B
Bash
Raw Normal View History

2013-02-24 03:35:19 +00:00
source $stdenv/setup
set -x
lib=" \
makemkv-oss-${ver}/out/libdriveio.so.0 \
makemkv-oss-${ver}/out/libmakemkv.so.1 \
2014-10-26 01:11:20 +01:00
makemkv-oss-${ver}/out/libmmbd.so.0 \
2013-02-24 03:35:19 +00:00
"
bin=" \
makemkv-oss-${ver}/out/makemkv \
makemkv-bin-${ver}/bin/amd64/makemkvcon \
"
tar xzf ${src_bin}
tar xzf ${src_oss}
(
cd makemkv-oss-${ver}
2014-10-26 01:11:20 +01:00
./configure --prefix=$out
make
2013-02-24 03:35:19 +00:00
)
chmod +x ${bin}
libPath="${libPath}:${out}/lib" # XXX: der. This should be in the nix file?
for i in ${bin} ; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
2013-02-24 03:35:19 +00:00
--set-rpath $libPath \
${i}
done
mkdir -p $out/bin
mkdir -p $out/lib
mkdir -p $out/share/MakeMKV
2013-02-24 03:35:19 +00:00
cp ${lib} ${out}/lib
cp ${bin} ${out}/bin
cp makemkv-bin-${ver}/src/share/* $out/share/MakeMKV