Magellan Linux

Contents of /smage/trunk/core/mcore-tools/mcore-tools-1.0.0-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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