Removed busybox and reintroduced runit-{shutdown,logacct} within runit module
[mnemosyne.git] / parse-config
blob5c64ad46aee63da7da458460c627675ebe0fb632
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3
4 # Filename: target/mnemosyne/parse-config
5 # Copyright (C) 2006 - 2007 The OpenSDE Project
6 # Copyright (C) 2002 - 2006 Alejandro Mery
7
8 # More information can be found in the files COPYING and README.
9
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 # --- SDE-COPYRIGHT-NOTE-END ---
16 mnemosynedir=$base/target/$SDECFG_TRG_MNEMOSYNE
17 # tweak config
18 [ ! -f $mnemosynedir/pkg_conf/$pkg.conf ] || . $mnemosynedir/pkg_conf/$pkg.conf
19 # append patches
20 [ ! -f $mnemosynedir/pkg_patch/$pkg.patch ] || var_append patchfiles ' ' $mnemosynedir/pkg_patch/$pkg.patch
21 unset mnemosynedir
23 # postinstall extra hackery
24 hook_add postinstall 5 'mnemosyne_postinstall'
25 mnemosyne_postinstall() {
26         local x=
27         case "$pkg" in
28                 socklog)        
29                         # socklog services active by default
30                         for x in klog syslog; do                
31                                 ln -svnf $sysconfdir/$x $root/service/$x
32                         done
33                         ;;
34                 bcron)
35                         # bcron services active by default
36                         for x in bcron-scheduler bcron-spooler bcron-updater; do
37                                 ln -svnf $sysconfdir/$x $root/service/$x
38                         done
39                         ;;
40                 alsa-utils)
41                         # alsa configuration save/restore
42                         ln -svnf /sbin/init.d/alsa "$root/etc/runit/1.d/20alsa"
43                         ln -svnf /sbin/init.d/alsa "$root/etc/runit/3.d/80alsa"
44                         ;;
45                 kbd)
46                         # keyboard mappings
47                         ln -svnf /sbin/init.d/kbd "$root/etc/runit/1.d/05kbd"
48                         ;;
49                 rocknet|etcnet)
50                         # network
51                         ln -svnf /sbin/init.d/network "$root/etc/runit/1.d/15network"
52                         ;;
53         esac
56 if [ "$SDECFG_TRG_MNEMOSYNE_DEVELOPMENT" != 1 ]; then
57         echo_status "No developent files will be flisted"
58         mnemosyne_flist_no_devel() {
59                 sed -i  -e '/\.\(c\|h\|hpp\|hxx\|a\|la\|m4\|pc\)$/d;' \
60                         $builddir/flist.txt    
62                 case "$pkg" in
63                         gcc)    
64                                 sed -i -e '/^usr\/\(bin\|include\|libexec\|lib\/gcc\|share\)/d;' -e '/lib\/cpp/d;' $builddir/flist.txt
65                                 ;;
66                         glibc)
67                                 sed -i -e '/^usr\/include/d;' $builddir/flist.txt
68                                 ;;
69                 esac
70         }
71         hook_add postflist 5 "mnemosyne_flist_no_devel"
74 if [ "$SDECFG_TRG_MNEMOSYNE_DOC" == "minimal" ]; then
75         echo_status "Just minimal documentation files will be flisted"
76         mnemosyne_flist_just_minimal_docs() {
77                 sed -i  -e '/\.\(html\|pdf\|ps\|tex\)$/d;' \
78                         -e '/\.\(gif\|jpg\|png\)$/d;' \
79                         -e "/.*\/share\/\(doc\|gtk-doc\).*\/html\/.*/d;" \
80                         $builddir/flist.txt
81         }
82         hook_add postflist 5 "mnemosyne_flist_just_minimal_docs"