9e5f137
#!/bin/sh
9e5f137
1074f51
VERSION="$1"
9e5f137
1074f51
rm -rf ghostscript-"$VERSION"
1074f51
tar jxvf ghostscript-"$VERSION".tar.bz2
eff4bac
eff4bac
GS=ghostscript-"$VERSION"
eff4bac
eff4bac
# License unclear (bug #1000387).
eff4bac
rm -r "$GS"/jpegxr
eff4bac
eff4bac
# License unknown (bug #1149617).
eff4bac
## Documentation
eff4bac
rm -f "$GS"/contrib/japanese/doc/djgpp.txt
eff4bac
rm -f "$GS"/contrib/japanese/doc/gdevmag.txt
eff4bac
rm -f "$GS"/contrib/japanese/doc/gs261j.*
eff4bac
## Example code
eff4bac
rm -f "$GS"/examples/chess.ps
eff4bac
## %ram% IODevice
eff4bac
rm -f "$GS"/base/gsioram.c
eff4bac
rm -f "$GS"/base/ramfs.c
eff4bac
rm -f "$GS"/base/ramfs.h
eff4bac
sed -i -e 's, $(GLD)ramfs.dev,,' "$GS"/Makefile.in "$GS"/psi/msvc.mak
eff4bac
eff4bac
tar jcvf ghostscript-"$VERSION"-cleaned-1.tar.bz2 "$GS"