summary refs log tree commit diff
path: root/pkgs/applications/misc/adobe-reader/builder.sh
blob: cd4bebfe9ad0fd509877eb461dbda88efe9568c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
source $stdenv/setup

echo "unpacking $src..."
tar xvfa $src

ensureDir $out/Adobe/Reader9

echo "unpacking reader..."
set +e
tar xvf AdobeReader/COMMON.TAR -C $out
tar xvf AdobeReader/ILINXR.TAR -C $out
set -e

# 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

patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
    --set-rpath $libPath \
    $out/Adobe/Reader*/Reader/intellinux/bin/acroread

# The "xargs -r" is to shut up a warning when Mozilla can't be found.
substituteInPlace $out/Adobe/Reader*/bin/acroread \
    --replace /bin/pwd $(type -P pwd) \
    --replace /bin/ls $(type -P ls) \
    --replace xargs "xargs -r"

ensureDir $out/bin
ln -s $out/Adobe/Reader*/bin/acroread $out/bin/acroread