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