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