masterpdfeditor: move assets into $out/opt/masterpdfeditor, symlink from $out/bin

This commit is contained in:
Florian Klink 2017-11-02 10:48:03 +01:00
parent e4913c2d30
commit faa9afbdfd

View File

@ -22,26 +22,25 @@
]; ];
dontStrip = true; dontStrip = true;
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/applications $out/share/pixmaps p=$out/opt/masterpdfeditor
mkdir -p $out/bin $p $out/share/applications $out/share/pixmaps
substituteInPlace masterpdfeditor4.desktop \ substituteInPlace masterpdfeditor4.desktop \
--replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \ --replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \
--replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \ --replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \
--replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps" --replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps"
cp -v masterpdfeditor4 $out/bin/masterpdfeditor4
cp -v masterpdfeditor4.png $out/share/pixmaps/ cp -v masterpdfeditor4.png $out/share/pixmaps/
cp -v masterpdfeditor4.desktop $out/share/applications cp -v masterpdfeditor4.desktop $out/share/applications
cp -v -r stamps $out/bin/stamps cp -v masterpdfeditor4 $p/
cp -v -r templates $out/bin/templates ln -s $p/masterpdfeditor4 $out/bin/masterpdfeditor4
cp -v -r lang $out/bin/lang cp -v -r stamps templates lang fonts $p
cp -v -r fonts $out/bin/fonts
install -D license.txt $out/share/$name/LICENSE install -D license.txt $out/share/$name/LICENSE
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath \ --set-rpath $libPath \
$out/bin/masterpdfeditor4 $p/masterpdfeditor4
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Master PDF Editor"; description = "Master PDF Editor";