Annotation of /smage/trunk/core/mcore-tools/mcore-tools-1.0.3-r1.smage2
Parent Directory | Revision Log
Revision 15324 -
(hide annotations)
(download)
Fri Aug 14 11:48:58 2020 UTC (3 years, 8 months ago) by niro
File size: 3094 byte(s)
Fri Aug 14 11:48:58 2020 UTC (3 years, 8 months ago) by niro
File size: 3094 byte(s)
auto added: ver bump to 1.0.3-r1
1 | niro | 15324 | # $Id$ |
2 | |||
3 | PNAME="mcore-tools" | ||
4 | PVER="1.0.3" | ||
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=( 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 | PNABROWSE_EXECUTABLE=/usr/bin/pnabrowse \ | ||
82 | DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \ | ||
83 | STOREFRONT_ADDSTORE_REQUIRED=0 \ | ||
84 | STOREFRONT_SUBSCRIBE_APP=0 \ | ||
85 | STOREBROWSE_EXECUTABLE=/usr/bin/storebrowse \ | ||
86 | MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \ | ||
87 | MCORE_SQL_HOST="localhost" \ | ||
88 | MCORE_SQL_DB="mcore" \ | ||
89 | MCORE_SQL_USER="alx_install" \ | ||
90 | MCORE_SQL_PASS="@lx" \ | ||
91 | || die | ||
92 | } | ||
93 | |||
94 | src_install_mcore-tools-common() | ||
95 | { | ||
96 | cd ${SRCDIR} | ||
97 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-common || die | ||
98 | |||
99 | # needed directory | ||
100 | mkeepdir /var/lib/mcored || die | ||
101 | } | ||
102 | |||
103 | src_install_mcore-tools() | ||
104 | { | ||
105 | cd ${SRCDIR} | ||
106 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-client || die | ||
107 | } | ||
108 | |||
109 | src_install_mcore-controld() | ||
110 | { | ||
111 | cd ${SRCDIR} | ||
112 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-control || die | ||
113 | } | ||
114 | |||
115 | preinstall_mcore-tools() | ||
116 | { | ||
117 | museradd -o "-g users -d /home/station -s /bin/bash" station | ||
118 | } | ||
119 | |||
120 | postinstall_mcore-tools() | ||
121 | { | ||
122 | mstartunit mcored | ||
123 | mstartunit mcore-register-client | ||
124 | mstartunit mcore-request-configuration | ||
125 | } | ||
126 | |||
127 | postremove_mcore-tools() | ||
128 | { | ||
129 | mstopunit mcored | ||
130 | mstopunit mcore-register-client | ||
131 | mstopunit mcore-request-configuration | ||
132 | } | ||
133 | |||
134 | postinstall_mcore-controld() | ||
135 | { | ||
136 | # remove mcored | ||
137 | mstopunit mcored | ||
138 | mstopunit mcore-register-client | ||
139 | mstopunit mcore-request-configuration | ||
140 | |||
141 | # start mcore-controld | ||
142 | mstartunit mcore-controld | ||
143 | } | ||
144 | |||
145 | postremove_mcore-controld() | ||
146 | { | ||
147 | mstopunit mcore-controld | ||
148 | } |