Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7981 - (show annotations) (download)
Thu Dec 10 09:44:07 2015 UTC (8 years, 5 months ago) by niro
File size: 2413 byte(s)
auto added: ver bump to 0.6.11-r1
1 # $Id$
2
3 PNAME="alxconfig-ng"
4 PVER="0.6.11"
5 PBUILD="r1"
6
7 SPLIT_PACKAGES="alxconfig-ng-dhcp-tools alxconfig-ng"
8
9 HOMEPAGE="http://www.magellan-linux.net"
10
11 ALXCONFIG_DEPEND=">= sys-apps/mage-release-0
12 >= app-text/xmlstarlet-1.1
13 >= dev-db/mysql-5.1
14 >= sys-apps/hwinfo-18"
15
16 SDEPEND="${ALXCONFIG_DEPEND}"
17
18 SRCFILE="${PNAME}-${PVER/_/-}.tar.bz2"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER/_/-}"
20
21 REMOVE_DEPRECATED_MAGE_TARGETS=1
22 sminclude mtools alx
23
24 SRC_URI=( mirror://${PNAME}/${SRCFILE} )
25
26 split_info_alxconfig-ng-dhcp-tools()
27 {
28 DESCRIPTION="alxconfig-ng dhcp configuration fixes."
29 PCATEGORIE="app-alx"
30 DEPEND=">= sys-apps/mage-release-0"
31 }
32
33 split_info_alxconfig-ng()
34 {
35 DESCRIPTION="alxconfig-ng, configures alx clients via mysql."
36 PCATEGORIE="app-alx"
37 DEPEND="${ALXCONFIG_DEPEND}
38 == app-alx/alxconfig-ng-dhcp-tools-${PVER}"
39
40 preinstall()
41 {
42 add_conf_prot_mask /etc/rc.d /etc/alxconfig-ng/skel \
43 /etc/alxconfig-ng/ica-sessions/icons \
44 /etc/conf.d/hwsetup
45
46 add_conf_prot_ignore /etc/alxconfig-ng/config.rc
47 add_conf_prot_ignore /etc/alxconfig-ng/storefront.rc
48 }
49
50 postinstall()
51 {
52 # install user station if needed (uucp is needed to access serial ports [ica-mappings])
53 ${MLIBDIR}/museradd -o "-g users -G audio,video,uucp -d /home/station -s /bin/bash" station
54 [ ! -d ${MROOT}/home/station ] && install -o station -g users -d ${MROOT}/home/station
55
56 # setup runlevels
57 # but never start the services!
58 MAGE_BOOTSTRAP=true mstartservice alxsettings
59 MAGE_BOOTSTRAP=true mstartservice alxsetstate
60
61 # not needed with alxconfig >= 0.6.0
62 local i
63 for i in skel/fluxbox/init \
64 skel/fluxbox/apps \
65 skel/fluxbox/keys \
66 skel/idesk \
67 skel/samba \
68 skel/xtdesktop
69 do
70 if [[ -f ${MROOT}/etc/alxconfig-ng/${i} ]]
71 then
72 rm ${MROOT}/etc/alxconfig-ng/${i} || die ${i}
73 fi
74 if [[ -d ${MROOT}/etc/alxconfig-ng/${i} ]]
75 then
76 rm -r ${MROOT}/etc/alxconfig-ng/${i} || die ${i}
77 fi
78 done
79
80 alx_postinstall
81 }
82 }
83
84 src_prepare()
85 {
86 munpack ${SRCFILE} || die
87 }
88
89 src_install_alxconfig-ng-dhcp-tools()
90 {
91 cd ${SRCDIR}
92
93 minstalldir /usr/sbin || die
94 minstallexec bin/alx-iface.sh /usr/sbin/alx-iface || die
95 minstallexec bin/dhcp-identifier.sh /usr/sbin/dhcp-identifier || die
96 }
97
98 src_install_alxconfig-ng()
99 {
100 cd ${SRCDIR}
101 make DESTDIR=${BINDIR} install || die
102
103 # provided by dhcp-tools
104 rm ${BINDIR}/usr/sbin/alx-iface || die
105 rm ${BINDIR}/usr/sbin/dhcp-identifier || die
106 }