Contents of /smage/trunk/core/mcore-tools/mcore-tools-1.0.0-r3.smage2
Parent Directory | Revision Log
Revision 12887 -
(show annotations)
(download)
Fri Nov 16 14:27:01 2018 UTC (5 years, 6 months ago) by niro
File size: 3336 byte(s)
Fri Nov 16 14:27:01 2018 UTC (5 years, 6 months ago) by niro
File size: 3336 byte(s)
auto added: ver bump to 1.0.0-r3
1 | # $Id$ |
2 | |
3 | PNAME="mcore-tools" |
4 | PVER="1.0.0" |
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 | >= 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 | ) |
40 | |
41 | split_info_mcore-tools-common() |
42 | { |
43 | DESCRIPTION="mcore common files." |
44 | DEPEND="" |
45 | } |
46 | |
47 | split_info_mcore-tools() |
48 | { |
49 | DESCRIPTION="mcore client daemon." |
50 | DEPEND="${COMMON_DEPEND} |
51 | == app-mage/mcore-tools-common-${PVER}" |
52 | } |
53 | |
54 | split_info_mcore-controld() |
55 | { |
56 | DESCRIPTION="mcore control daemon." |
57 | DEPEND="${CONTROLD_DEPEND} |
58 | == app-mage/mcore-tools-common-${PVER} |
59 | == app-mage/mcore-tools-${PVER}" |
60 | } |
61 | |
62 | src_prepare() |
63 | { |
64 | munpack ${SRCFILE} || die |
65 | cd ${SRCDIR} |
66 | |
67 | # honor hdmi configuration |
68 | mpatch ${PNAME}-${PVER}-honor-variable-hdmi-configuration.patch || die |
69 | mpatch ${PNAME}-${PVER}-honor-variable-hdmi-configuration-fix.patch || die |
70 | |
71 | # use package version and build |
72 | echo "${PVER}-${PBUILD}" > VERSION || die |
73 | |
74 | # do not install the dracut module atm |
75 | sed -i 's:dracut::' Makefile || die |
76 | } |
77 | |
78 | src_compile() |
79 | { |
80 | cd ${SRCDIR} |
81 | mmake \ |
82 | MCORE_UNPRIV_USER=station \ |
83 | MCORE_DISTRIBUTION=ALX \ |
84 | MCORE_DEFAULT_HOSTNAME=alx-unconfigured \ |
85 | MCORE_DEFAULT_DOMAIN=dom-aka-nt.intern \ |
86 | SYSTEM_ICAROOT=/opt/Citrix/ICAClient \ |
87 | PNABROWSE_CITRIX_BROWSER=ica.dom-aka-nt.intern \ |
88 | PNABROWSE_SERVER_EXCLUDE=ESA-TS-CLEAN \ |
89 | DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \ |
90 | STOREFRONT_ADDSTORE_REQUIRED=0 \ |
91 | STOREFRONT_SUBSCRIBE_APP=0 \ |
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 | } |