2009-05-12 16:49:01 +02:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
echo "unpacking $src..."
|
|
|
|
tar xvfa $src
|
|
|
|
|
|
|
|
echo "unpacking reader..."
|
2012-11-08 14:49:54 +01:00
|
|
|
p=$out/libexec/adobe-reader
|
|
|
|
mkdir -p $out/libexec
|
2009-05-12 16:49:01 +02:00
|
|
|
tar xvf AdobeReader/COMMON.TAR -C $out
|
|
|
|
tar xvf AdobeReader/ILINXR.TAR -C $out
|
2012-11-08 14:49:54 +01:00
|
|
|
mv $out/Adobe/Reader9 $p
|
|
|
|
rmdir $out/Adobe
|
2009-05-12 16:49:01 +02:00
|
|
|
|
|
|
|
# Disable this plugin for now (it needs LDAP, and I'm too lazy to add it).
|
2012-11-08 14:49:54 +01:00
|
|
|
rm $p/Reader/intellinux/plug_ins/PPKLite.api
|
|
|
|
|
|
|
|
# More pointless files.
|
|
|
|
rm $p/bin/UNINSTALL
|
2009-05-12 16:49:01 +02:00
|
|
|
|
|
|
|
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath $libPath \
|
2012-11-08 14:49:54 +01:00
|
|
|
$p/Reader/intellinux/bin/acroread
|
2009-05-12 16:49:01 +02:00
|
|
|
|
|
|
|
# The "xargs -r" is to shut up a warning when Mozilla can't be found.
|
2012-11-08 14:49:54 +01:00
|
|
|
substituteInPlace $p/bin/acroread \
|
2009-05-12 16:49:01 +02:00
|
|
|
--replace /bin/pwd $(type -P pwd) \
|
|
|
|
--replace /bin/ls $(type -P ls) \
|
|
|
|
--replace xargs "xargs -r"
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2012-11-08 14:49:54 +01:00
|
|
|
ln -s $p/bin/acroread $out/bin/acroread
|
2012-03-20 15:41:24 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
2012-11-08 14:49:54 +01:00
|
|
|
mv $p/Resource/Support/AdobeReader.desktop $out/share/applications/
|
|
|
|
icon=$p/Resource/Icons/128x128/AdobeReader9.png
|
|
|
|
[ -e $icon ]
|
2012-03-20 15:41:24 +01:00
|
|
|
sed -i $out/share/applications/AdobeReader.desktop \
|
2012-11-08 14:49:54 +01:00
|
|
|
-e "s|Icon=.*|Icon=$icon|"
|
2012-03-20 15:41:24 +01:00
|
|
|
|
|
|
|
# Not sure if this works.
|
|
|
|
mkdir -p $out/share/mimelnk/application
|
2012-11-08 14:49:54 +01:00
|
|
|
mv $p/Resource/Support/vnd*.desktop $out/share/mimelnk/application
|