Annotation of /smage/branches/alx07x-unstable/core/mcore-tools/mcore-tools-0.1_svn2833-r2.smage2
Parent Directory | Revision Log
Revision 11955 -
(hide annotations)
(download)
Fri Aug 17 08:35:10 2018 UTC (5 years, 9 months ago) by niro
Original Path: smage/trunk/core/mcore-tools/mcore-tools-0.1_svn2833-r2.smage2
File size: 3009 byte(s)
Fri Aug 17 08:35:10 2018 UTC (5 years, 9 months ago) by niro
Original Path: smage/trunk/core/mcore-tools/mcore-tools-0.1_svn2833-r2.smage2
File size: 3009 byte(s)
auto added: ver bump to 0.1_svn2833-r2
1 | niro | 11955 | # $Id$ |
2 | |||
3 | PNAME="mcore-tools" | ||
4 | PVER="0.1_svn2833" | ||
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 | ) | ||
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 | DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \ | ||
84 | STOREFRONT_ADDSTORE_REQUIRED=0 \ | ||
85 | STOREFRONT_SUBSCRIBE_APP=0 \ | ||
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 | } |