Magellan Linux

Contents of /smage/branches/alx-0_6_0/core/alxconfig-ng/alxconfig-ng-0.6.0_rc14-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2774 - (show annotations) (download)
Thu Aug 11 23:32:29 2011 UTC (12 years, 8 months ago) by niro
File size: 1749 byte(s)
-fixed broken postinstall
1 # $Id$
2
3 PNAME="alxconfig-ng"
4 PVER="0.6.0_rc14"
5 PBUILD="r1"
6
7 PCATEGORIE="app-alx"
8
9 DESCRIPTION="alxconfig-ng, configures alx clients via mysql."
10 HOMEPAGE="http://www.magellan-linux.net"
11
12 DEPEND=">= sys-apps/mage-release-0
13 >= app-text/xmlstarlet-1.1
14 >= dev-db/mysql-5.1
15 >= sys-apps/hwinfo-18"
16
17 SRCFILE="${PNAME}-${PVER/_/-}.tar.bz2"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER/_/-}"
19
20 REMOVE_DEPRECATED_MAGE_TARGETS=1
21 sminclude mtools alx
22
23 SRC_URI=( mirror://${PNAME}/${SRCFILE} )
24
25 src_prepare()
26 {
27 munpack ${SRCFILE} || die
28 }
29
30 src_install()
31 {
32 cd ${SRCDIR}
33 make DESTDIR=${BINDIR} install || die
34 }
35
36 preinstall()
37 {
38 add_conf_prot_mask /etc/rc.d /etc/alxconfig-ng/skel \
39 /etc/alxconfig-ng/ica-sessions/icons/default.png \
40 /etc/alxconfig-ng/ica-sessions/icons/default_item.png \
41 /etc/alxconfig-ng/ica-sessions/icons/sysinfo.png \
42 /etc/conf.d/hwsetup
43
44 add_conf_prot_ignore /etc/alxconfig-ng/config.rc
45 }
46
47 postinstall()
48 {
49 # install user station if needed (uucp is needed to access serial ports [ica-mappings])
50 ${MLIBDIR}/museradd -o "-g users -G audio,video,uucp -d /home/station -s /bin/bash" station
51 [ ! -d ${MROOT}/home/station ] && install -o station -g users -d ${MROOT}/home/station
52
53 # setup runlevels
54 # but never start the services!
55 MAGE_BOOTSTRAP=true mstartservice alxsettings
56 MAGE_BOOTSTRAP=true mstartservice alxsetstate
57
58 # not needed with alxconfig >= 0.6.0
59 local i
60 for i in skel/fluxbox/init \
61 skel/fluxbox/apps \
62 skel/fluxbox/keys \
63 skel/idesk \
64 skel/samba \
65 skel/xtdesktop
66 do
67 if [[ -f ${MROOT}/etc/alxconfig-ng/${i} ]]
68 then
69 rm ${MROOT}/etc/alxconfig-ng/${i} || die ${i}
70 fi
71 if [[ -d ${MROOT}/etc/alxconfig-ng/${i} ]]
72 then
73 rm -r ${MROOT}/etc/alxconfig-ng/${i} || die ${i}
74 fi
75 done
76
77 alx_postinstall
78 }