1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: misc/jailing/package-functions
5 # Copyright (C) 2004 - 2008 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 jail_pkg_apache_postmake() {
17 jail_ensure_users http
19 ### Updates paths in $root/$jail/$datadir/build/config_vars.mk
21 echo "Updateing paths in $root/$jail/$datadir/build/config_vars.mk"
24 # A copy of original config_vars.mk is left for reference
25 cp $root/$jail/$datadir/build/config_vars.mk \
26 $root/$jail/$datadir/build/config_vars.mk.orig
28 cp -f $root/$jail/$datadir/build/config_vars.mk $tmp
30 # s|$base/$builddir/httpd-$ver|/$jail/usr|; is repeated many times
31 # because it appear many times in same line ... probably there is
32 # a not so silly way but I can't find it :(
33 # Feel free of cleaning it
34 sed " /^exp_.* = \/.*/ {s| = /*usr| = /$jail/usr|; \
35 s| = /*etc| = /$jail/etc|; s| = /*var| = /$jail/var|; \
37 /^rel_.* = \/.*/ {s| = /*usr/| = |; s| = /*usr| = |; \
38 s| = /*etc| = ../etc|; s| = /*var| = ../var|; p; d; }; \
39 / = \/.*/ {s| = /*usr| = /$jail/usr|; \
40 s| = /*etc| = /$jail/etc|; s| = /*var| = /$jail/var|; \
42 " < $tmp > $root/$jail/$datadir/build/config_vars.mk
44 ### END Updates paths in $root/$jail/$datadir/build/config_vars.mk
46 ### Updates paths in $root/$jail/$sbindir/apxs
48 echo "Updateing paths in $root/$jail/$sbindir/apxs"
49 cp -f $root/$jail/$sbindir/apxs $tmp
50 sed "s|/usr/share/build|/$jail/$datadir/build|" < $tmp \
51 > $root/$jail/$sbindir/apxs
53 ### END Updates paths in $root/$jail/$sbindir/apxs
57 echo "Updateing paths in $root/$jail/$sbindir/apachectl"
58 cp -f $root/$jail/$sbindir/apachectl $tmp
59 sed "s|HTTPD=.*|HTTPD='chroot /$jail /$sbindir/httpd'|" \
60 < $tmp > $root/$jail/$sbindir/apachectl
62 ### END Update apachectl
68 jail_pkg_postfix_postmake() {
69 ./postfix-install -non-interactive \
70 daemon_directory=/usr/libexec command_directory=/usr/bin \
71 sendmail_path=/usr/bin/sendmail \
72 newaliases_path=/usr/bin/newaliases \
73 mailq_path=/usr/bin/mailq manpage_directory=/man/ \
74 sample_directory=/usr/share/$pkg
75 jail_ensure_users postfix
76 jail_ensure_groups postdrop
79 jail_pkg_mysql_postmake() {
80 mv -f $libdir/mysql/* $libdir
83 cp support-files/my-*.cnf $docdir
84 chown $pkg.$pkg $localstatedir