Magellan Linux

Contents of /smage/trunk/core/mcore-tools/mcore-tools-0.1_svn2799-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9101 - (show annotations) (download)
Mon Jun 20 11:58:22 2016 UTC (7 years, 10 months ago) by niro
File size: 3012 byte(s)
auto added: ver bump to 0.1_svn2799-r1
1 # $Id$
2
3 PNAME="mcore-tools"
4 PVER="0.1_svn2799"
5 PBUILD="r1"
6
7 SPLIT_PACKAGES="mcore-tools-common mcore-tools mcore-controld"
8
9 PCAT="app-mage"
10 HOMEPAGE="http://www.magellan-linux.net/"
11
12 COMMON_DEPEND=">= net-misc/sslsvd-1
13 >= net-misc/nssl-005
14 >= sys-apps/hwinfo-20
15 >= x11-libs/libX11-1.6"
16
17 CONTROLD_DEPEND="${COMMON_DEPEND}
18 >= app-text/xmlstarlet-1.6
19 >= x11-base/xvfb-1.18"
20
21 # storefront-cron requires xfvb-run -> xorg-server-dev
22 # mcore-controld requires xml -> xmlstartlet
23
24 SDEPEND="${COMMON_DEPEND}
25 ${CONTROL_DEPEND}
26 >= dev-util/pkgconfig-0.25
27 >= x11-libs/libX11-dev-1.6
28 >= x11-proto/xproto-7"
29
30 SRCFILE="${PNAME}-${PVER}.tar.bz2"
31 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
32
33 sminclude systemd
34
35 SRC_URI=( mirror://${PNAME}/${SRCFILE} )
36
37 split_info_mcore-tools-common()
38 {
39 DESCRIPTION="mcore common files."
40 DEPEND=""
41 }
42
43 split_info_mcore-tools()
44 {
45 DESCRIPTION="mcore client daemon."
46 DEPEND="${COMMON_DEPEND}
47 == app-mage/mcore-tools-common-${PVER}"
48 }
49
50 split_info_mcore-controld()
51 {
52 DESCRIPTION="mcore control daemon."
53 DEPEND="${CONTROLD_DEPEND}
54 == app-mage/mcore-tools-common-${PVER}
55 == app-mage/mcore-tools-${PVER}"
56 }
57
58 src_prepare()
59 {
60 munpack ${SRCFILE} || die
61 cd ${SRCDIR}
62
63 # use package version and build
64 echo "${PVER}-${PBUILD}" > VERSION || die
65
66 # do not install the dracut module atm
67 sed -i 's:dracut::' Makefile || die
68 }
69
70 src_compile()
71 {
72 cd ${SRCDIR}
73 mmake \
74 MCORE_UNPRIV_USER=station \
75 MCORE_DISTRIBUTION=ALX \
76 MCORE_DEFAULT_HOSTNAME=alx-unconfigured \
77 MCORE_DEFAULT_DOMAIN=dom-aka-nt.intern \
78 SYSTEM_ICAROOT=/opt/Citrix/ICAClient \
79 PNABROWSE_CITRIX_BROWSER=ica.dom-aka-nt.intern \
80 PNABROWSE_SERVER_EXCLUDE=ESA-TS-CLEAN \
81 DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \
82 STOREFRONT_ADDSTORE_REQUIRED=0 \
83 STOREFRONT_SUBSCRIBE_APP=0 \
84 MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \
85 MCORE_SQL_HOST="localhost" \
86 MCORE_SQL_DB="mcore" \
87 MCORE_SQL_USER="alx_install" \
88 MCORE_SQL_PASS="@lx" \
89 || die
90 }
91
92 src_install_mcore-tools-common()
93 {
94 cd ${SRCDIR}
95 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-common || die
96
97 # needed directory
98 mkeepdir /var/lib/mcored || die
99 }
100
101 src_install_mcore-tools()
102 {
103 cd ${SRCDIR}
104 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-client || die
105 }
106
107 src_install_mcore-controld()
108 {
109 cd ${SRCDIR}
110 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-control || die
111 }
112
113 preinstall_mcore-tools()
114 {
115 museradd -o "-g users -d /home/station -s /bin/bash" station
116 }
117
118 postinstall_mcore-tools()
119 {
120 mstartunit mcored
121 mstartunit mcore-register-client
122 mstartunit mcore-request-configuration
123 }
124
125 postremove_mcore-tools()
126 {
127 mstopunit mcored
128 mstopunit mcore-register-client
129 mstopunit mcore-request-configuration
130 }
131
132 postinstall_mcore-controld()
133 {
134 # remove mcored
135 mstopunit mcored
136 mstopunit mcore-register-client
137 mstopunit mcore-request-configuration
138
139 # start mcore-controld
140 mstartunit mcore-controld
141 }
142
143 postremove_mcore-controld()
144 {
145 mstopunit mcore-controld
146 }