at 15.09-beta 35 lines 691 B view raw
1source $stdenv/setup 2 3mkdir -p $out 4 5n=1 6for p in $srcs; do 7 ln -s $p PSDK-FULL.$n.cab 8 n=$((n + 1)) 9done 10 11mkdir tmp 12cd tmp 13cabextract ../PSDK-FULL.1.cab 14 15mkdir tmp 16cd tmp 17for i in ../Setup/*.cab; do 18 cabextract $i 19done 20 21while read target; do 22 read source 23 echo "$source -> $target" 24 mkdir -p "$out/$(dirname "$target")" 25 cp "$source" "$out/$target" 26done < $filemap 27 28# Make DLLs and executables executable. 29find $out \( -iname "*.dll" -o -iname "*.exe" -o -iname "*.config" \) -print0 | xargs -0 chmod +x 30 31cat > $out/setup <<EOF 32export PATH="$out/bin:\$PATH" 33export LIB="$(cygpath -w -p "$out/lib");\$LIB" 34export INCLUDE="$(cygpath -w -p "$out/include");\$INCLUDE" 35EOF