1 | #!/bin/bash |
---|
2 | |
---|
3 | # Once slacktrack has determined what the contents of the package |
---|
4 | # should be, it copies them into $SLACKTRACKFAKEROOT |
---|
5 | # From here we can make modifications to the package's contents |
---|
6 | # immediately prior to the invocation of makepkg: slacktrack will |
---|
7 | # do nothing else with the contents of the package after the execution |
---|
8 | # of this script. |
---|
9 | |
---|
10 | # If you modify anything here, be careful *not* to include the full |
---|
11 | # path name - only use relative paths (ie rm usr/bin/foo *not* rm /usr/bin/foo). |
---|
12 | |
---|
13 | # Enter the package's contents: |
---|
14 | cd $SLACKTRACKFAKEROOT |
---|
15 | |
---|
16 | # OpenSP creates this symlink; we delete it. |
---|
17 | if [ -L usr/share/doc ]; then |
---|
18 | rm -f usr/share/doc |
---|
19 | fi |
---|
20 | |
---|
21 | # Incase you had CUPS running: |
---|
22 | rm -rf etc/cups etc/printcap |
---|
23 | # crond & mail (just incase you got a delivery!) |
---|
24 | rm -rf var/spool/{cron,mail} |
---|
25 | rmdir var/spool |
---|
26 | |
---|
27 | # perllocal.pod files don't belong in packages. |
---|
28 | # SGMLSPL creates this: |
---|
29 | find . -name perllocal.pod -print0 | xargs -0 rm -f |
---|
30 | |
---|
31 | # Some doc dirs have attracted setuid. |
---|
32 | # We don't need setuid for anything in this package: |
---|
33 | chmod -R a-s . |
---|
34 | |
---|
35 | # Remove dangling symlinks from /usr/doc. asciidoc-8.6.7 was a culprit. |
---|
36 | find usr/doc -xtype l -print0 | xargs -0 rm -fv |
---|
37 | |
---|
38 | # Ensure some permissions. |
---|
39 | # I don't know why but these dirs are installed chmod 1755: |
---|
40 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/ |
---|
41 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/pk/ |
---|
42 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/pk/ljfour/ |
---|
43 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/pk/ljfour/jknappen/ |
---|
44 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/pk/ljfour/jknappen/ec/ |
---|
45 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/source/ |
---|
46 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/source/jknappen/ |
---|
47 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/source/jknappen/ec/ |
---|
48 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/tfm/ |
---|
49 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/tfm/jknappen/ |
---|
50 | #drwxr-xr-t root/root 0 2006-05-27 15:42:44 var/lib/texmf/tfm/jknappen/ec/ |
---|
51 | #find var/lib/texmf -type d -print0 | xargs -0 chmod 755 |
---|
52 | # This directory needs these permissions to permit pleb accounts to make |
---|
53 | # fonts: |
---|
54 | #chmod 1777 var/lib/texmf |
---|
55 | # |
---|
56 | # Never mind: I think this stuff is surplus to requirements: |
---|
57 | rm -rf var/lib/texmf |
---|
58 | # Now to prevent deletion of anything else that lives in the package's '/var' |
---|
59 | rmdir var/lib |
---|
60 | rmdir var |
---|
61 | |
---|
62 | # There's no reason to include huge redundant documentation: |
---|
63 | cd usr/doc |
---|
64 | find . -name "*.txt" | while read docfile ; do |
---|
65 | basedocname=$(echo $docfile | rev | cut -f 2- -d . | rev) |
---|
66 | rm -fv ${basedocname}.{html,pdf,xml} |
---|
67 | rm -fv docbook-xsl*/reference.pdf.gz |
---|
68 | done |
---|
69 | |
---|
70 | # Now you should manually extract the .tgz |
---|
71 | # - check through the install/doinst.sh script; |
---|
72 | # - check the contents, permissions and ownerships in the package archive. |
---|