1 if [ -e "$NIX_ATTRS_SH_FILE" ]; then .
"$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh
]; then . .attrs.sh
; fi
4 echo "unpacking $src..."
7 echo "unpacking reader..."
8 p
=$out/libexec
/adobe-reader
10 tar xvf AdobeReader
/COMMON.TAR
-C $out
11 tar xvf AdobeReader
/ILINXR.TAR
-C $out
12 mv $out/Adobe
/Reader9
$p
15 # Disable this plugin for now (it needs LDAP, and I'm too lazy to add it).
16 rm $p/Reader
/intellinux
/plug_ins
/PPKLite.api
18 # More pointless files.
21 patchelf
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
22 --set-rpath $libPath \
23 $p/Reader
/intellinux
/bin
/acroread
25 # The "xargs -r" is to shut up a warning when Mozilla can't be found.
26 substituteInPlace
$p/bin
/acroread \
27 --replace /bin
/pwd $
(type -P pwd) \
28 --replace /bin
/ls $
(type -P ls) \
29 --replace xargs "xargs -r"
32 ln -s $p/bin
/acroread
$out/bin
/acroread
34 mkdir
-p $out/share
/applications
35 mv $p/Resource
/Support
/AdobeReader.desktop
$out/share
/applications
/
36 icon
=$p/Resource
/Icons
/128x128
/AdobeReader9.png
38 sed -i $out/share
/applications
/AdobeReader.desktop \
39 -e "s|Icon=.*|Icon=$icon|"
41 # Not sure if this works.
42 mkdir
-p $out/share
/mimelnk
/application
43 mv $p/Resource
/Support
/vnd
*.desktop
$out/share
/mimelnk
/application