Annotation of /smage/trunk/core/mcore-tools/mcore-tools-0.1_svn2799-r3.smage2
Parent Directory | Revision Log
Revision 9418 -
(hide annotations)
(download)
Mon Apr 3 17:25:58 2017 UTC (7 years, 5 months ago) by niro
File size: 3130 byte(s)
Mon Apr 3 17:25:58 2017 UTC (7 years, 5 months ago) by niro
File size: 3130 byte(s)
-fixed wrong certifivate key and re-issued certificates until Apr 3 2027
1 | niro | 9418 | # $Id$ |
2 | |||
3 | PNAME="mcore-tools" | ||
4 | PVER="0.1_svn2799" | ||
5 | PBUILD="r3" | ||
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=( | ||
36 | mirror://${PNAME}/${SRCFILE} | ||
37 | mirror://${PNAME}/mcore-tools-certs2027.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 | # use newer certificates | ||
67 | mpatch mcore-tools-certs2027.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 | DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \ | ||
88 | STOREFRONT_ADDSTORE_REQUIRED=0 \ | ||
89 | STOREFRONT_SUBSCRIBE_APP=0 \ | ||
90 | MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \ | ||
91 | MCORE_SQL_HOST="localhost" \ | ||
92 | MCORE_SQL_DB="mcore" \ | ||
93 | MCORE_SQL_USER="alx_install" \ | ||
94 | MCORE_SQL_PASS="@lx" \ | ||
95 | || die | ||
96 | } | ||
97 | |||
98 | src_install_mcore-tools-common() | ||
99 | { | ||
100 | cd ${SRCDIR} | ||
101 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-common || die | ||
102 | |||
103 | # needed directory | ||
104 | mkeepdir /var/lib/mcored || die | ||
105 | } | ||
106 | |||
107 | src_install_mcore-tools() | ||
108 | { | ||
109 | cd ${SRCDIR} | ||
110 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-client || die | ||
111 | } | ||
112 | |||
113 | src_install_mcore-controld() | ||
114 | { | ||
115 | cd ${SRCDIR} | ||
116 | make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-control || die | ||
117 | } | ||
118 | |||
119 | preinstall_mcore-tools() | ||
120 | { | ||
121 | museradd -o "-g users -d /home/station -s /bin/bash" station | ||
122 | } | ||
123 | |||
124 | postinstall_mcore-tools() | ||
125 | { | ||
126 | mstartunit mcored | ||
127 | mstartunit mcore-register-client | ||
128 | mstartunit mcore-request-configuration | ||
129 | } | ||
130 | |||
131 | postremove_mcore-tools() | ||
132 | { | ||
133 | mstopunit mcored | ||
134 | mstopunit mcore-register-client | ||
135 | mstopunit mcore-request-configuration | ||
136 | } | ||
137 | |||
138 | postinstall_mcore-controld() | ||
139 | { | ||
140 | # remove mcored | ||
141 | mstopunit mcored | ||
142 | mstopunit mcore-register-client | ||
143 | mstopunit mcore-request-configuration | ||
144 | |||
145 | # start mcore-controld | ||
146 | mstartunit mcore-controld | ||
147 | } | ||
148 | |||
149 | postremove_mcore-controld() | ||
150 | { | ||
151 | mstopunit mcore-controld | ||
152 | } |