source: npl/overig/linuxdoc_tools/postbuildfixes.sh

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.8 KB
Line 
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:
14cd $SLACKTRACKFAKEROOT
15
16# OpenSP creates this symlink; we delete it.
17if [ -L usr/share/doc ]; then
18   rm -f usr/share/doc
19fi
20
21# Incase you had CUPS running:
22rm -rf etc/cups etc/printcap
23# crond & mail (just incase you got a delivery!)
24rm -rf var/spool/{cron,mail}
25rmdir var/spool
26
27# perllocal.pod files don't belong in packages.
28# SGMLSPL creates this:
29find . -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:
33chmod -R a-s .
34
35# Remove dangling symlinks from /usr/doc.  asciidoc-8.6.7 was a culprit.
36find 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:
57rm -rf var/lib/texmf
58# Now to prevent deletion of anything else that lives in the package's '/var'
59rmdir var/lib
60rmdir var
61
62# There's no reason to include huge redundant documentation:
63cd usr/doc
64find . -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
68done
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.
Note: See TracBrowser for help on using the repository browser.