mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
adobe-reader: Unpack to $out/libexec/adobe-reader
This prevents polluting Nix profiles.
This commit is contained in:
parent
892180306d
commit
704f7d6a2c
@ -3,35 +3,40 @@ source $stdenv/setup
|
|||||||
echo "unpacking $src..."
|
echo "unpacking $src..."
|
||||||
tar xvfa $src
|
tar xvfa $src
|
||||||
|
|
||||||
mkdir -p $out/Adobe/Reader9
|
|
||||||
|
|
||||||
echo "unpacking reader..."
|
echo "unpacking reader..."
|
||||||
set +e
|
p=$out/libexec/adobe-reader
|
||||||
|
mkdir -p $out/libexec
|
||||||
tar xvf AdobeReader/COMMON.TAR -C $out
|
tar xvf AdobeReader/COMMON.TAR -C $out
|
||||||
tar xvf AdobeReader/ILINXR.TAR -C $out
|
tar xvf AdobeReader/ILINXR.TAR -C $out
|
||||||
set -e
|
mv $out/Adobe/Reader9 $p
|
||||||
|
rmdir $out/Adobe
|
||||||
|
|
||||||
# Disable this plugin for now (it needs LDAP, and I'm too lazy to add it).
|
# Disable this plugin for now (it needs LDAP, and I'm too lazy to add it).
|
||||||
rm $out/Adobe/Reader*/Reader/intellinux/plug_ins/PPKLite.api
|
rm $p/Reader/intellinux/plug_ins/PPKLite.api
|
||||||
|
|
||||||
|
# More pointless files.
|
||||||
|
rm $p/bin/UNINSTALL
|
||||||
|
|
||||||
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath $libPath \
|
--set-rpath $libPath \
|
||||||
$out/Adobe/Reader*/Reader/intellinux/bin/acroread
|
$p/Reader/intellinux/bin/acroread
|
||||||
|
|
||||||
# The "xargs -r" is to shut up a warning when Mozilla can't be found.
|
# The "xargs -r" is to shut up a warning when Mozilla can't be found.
|
||||||
substituteInPlace $out/Adobe/Reader*/bin/acroread \
|
substituteInPlace $p/bin/acroread \
|
||||||
--replace /bin/pwd $(type -P pwd) \
|
--replace /bin/pwd $(type -P pwd) \
|
||||||
--replace /bin/ls $(type -P ls) \
|
--replace /bin/ls $(type -P ls) \
|
||||||
--replace xargs "xargs -r"
|
--replace xargs "xargs -r"
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s $out/Adobe/Reader*/bin/acroread $out/bin/acroread
|
ln -s $p/bin/acroread $out/bin/acroread
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
mv $out/Adobe/Reader9/Resource/Support/AdobeReader.desktop $out/share/applications/
|
mv $p/Resource/Support/AdobeReader.desktop $out/share/applications/
|
||||||
|
icon=$p/Resource/Icons/128x128/AdobeReader9.png
|
||||||
|
[ -e $icon ]
|
||||||
sed -i $out/share/applications/AdobeReader.desktop \
|
sed -i $out/share/applications/AdobeReader.desktop \
|
||||||
-e "s|Icon=.*|Icon=$out/Adobe/Reader9/Resource/Icons/128x128/AdobeReader9.png|"
|
-e "s|Icon=.*|Icon=$icon|"
|
||||||
|
|
||||||
# Not sure if this works.
|
# Not sure if this works.
|
||||||
mkdir -p $out/share/mimelnk/application
|
mkdir -p $out/share/mimelnk/application
|
||||||
mv $out/Adobe/Reader9/Resource/Support/vnd*.desktop $out/share/mimelnk/application
|
mv $p/Resource/Support/vnd*.desktop $out/share/mimelnk/application
|
||||||
|
Loading…
Reference in New Issue
Block a user