Magellan Linux

Contents of /smage/branches/alx07x-stable/core/mcore-tools/mcore-tools-1.0.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13685 - (show annotations) (download)
Thu Jul 25 14:44:00 2019 UTC (4 years, 9 months ago) by niro
File size: 3095 byte(s)
-release branches/alx07x-stable
1 # $Id$
2
3 PNAME="mcore-tools"
4 PVER="1.0.1"
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 >= virtual/xproto"
29
30 SRCFILE="${PNAME}-${PVER}.tar.bz2"
31 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
32
33 sminclude systemd
34
35 SRC_URI=(
36 mirror://${PNAME}/${SRCFILE}
37 )
38
39 split_info_mcore-tools-common()
40 {
41 DESCRIPTION="mcore common files."
42 DEPEND=""
43 }
44
45 split_info_mcore-tools()
46 {
47 DESCRIPTION="mcore client daemon."
48 DEPEND="${COMMON_DEPEND}
49 == app-mage/mcore-tools-common-${PVER}"
50 }
51
52 split_info_mcore-controld()
53 {
54 DESCRIPTION="mcore control daemon."
55 DEPEND="${CONTROLD_DEPEND}
56 == app-mage/mcore-tools-common-${PVER}
57 == app-mage/mcore-tools-${PVER}"
58 }
59
60 src_prepare()
61 {
62 munpack ${SRCFILE} || die
63 cd ${SRCDIR}
64
65 # use package version and build
66 echo "${PVER}-${PBUILD}" > VERSION || die
67
68 # do not install the dracut module atm
69 sed -i 's:dracut::' Makefile || die
70 }
71
72 src_compile()
73 {
74 cd ${SRCDIR}
75 mmake \
76 MCORE_UNPRIV_USER=station \
77 MCORE_DISTRIBUTION=ALX \
78 MCORE_DEFAULT_HOSTNAME=alx-unconfigured \
79 MCORE_DEFAULT_DOMAIN=dom-aka-nt.intern \
80 SYSTEM_ICAROOT=/opt/Citrix/ICAClient \
81 PNABROWSE_CITRIX_BROWSER=ica.dom-aka-nt.intern \
82 PNABROWSE_SERVER_EXCLUDE=ESA-TS-CLEAN \
83 PNABROWSE_EXECUTABLE=/usr/bin/pnabrowse \
84 DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \
85 STOREFRONT_ADDSTORE_REQUIRED=0 \
86 STOREFRONT_SUBSCRIBE_APP=0 \
87 STOREBROWSE_EXECUTABLE=/usr/bin/storebrowse \
88 MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \
89 MCORE_SQL_HOST="localhost" \
90 MCORE_SQL_DB="mcore" \
91 MCORE_SQL_USER="alx_install" \
92 MCORE_SQL_PASS="@lx" \
93 || die
94 }
95
96 src_install_mcore-tools-common()
97 {
98 cd ${SRCDIR}
99 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-common || die
100
101 # needed directory
102 mkeepdir /var/lib/mcored || die
103 }
104
105 src_install_mcore-tools()
106 {
107 cd ${SRCDIR}
108 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-client || die
109 }
110
111 src_install_mcore-controld()
112 {
113 cd ${SRCDIR}
114 make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-control || die
115 }
116
117 preinstall_mcore-tools()
118 {
119 museradd -o "-g users -d /home/station -s /bin/bash" station
120 }
121
122 postinstall_mcore-tools()
123 {
124 mstartunit mcored
125 mstartunit mcore-register-client
126 mstartunit mcore-request-configuration
127 }
128
129 postremove_mcore-tools()
130 {
131 mstopunit mcored
132 mstopunit mcore-register-client
133 mstopunit mcore-request-configuration
134 }
135
136 postinstall_mcore-controld()
137 {
138 # remove mcored
139 mstopunit mcored
140 mstopunit mcore-register-client
141 mstopunit mcore-request-configuration
142
143 # start mcore-controld
144 mstartunit mcore-controld
145 }
146
147 postremove_mcore-controld()
148 {
149 mstopunit mcore-controld
150 }