Contents of /smage/trunk/core/mcore-tools/mcore-tools-0.1_svn2764-r1.smage2
Parent Directory | Revision Log
Revision 8569 -
(show annotations)
(download)
Tue Feb 9 12:26:09 2016 UTC (8 years, 2 months ago) by niro
File size: 2775 byte(s)
Tue Feb 9 12:26:09 2016 UTC (8 years, 2 months ago) by niro
File size: 2775 byte(s)
auto added: ver bump to 0.1_svn2764-r1
1 | # $Id$ |
2 | |
3 | PNAME="mcore-tools" |
4 | PVER="0.1_svn2764" |
5 | PBUILD="r1" |
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/xorg-server-dev-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=( mirror://${PNAME}/${SRCFILE} ) |
36 | |
37 | split_info_mcore-tools-common() |
38 | { |
39 | DESCRIPTION="mcore common files." |
40 | DEPEND="" |
41 | } |
42 | |
43 | split_info_mcore-tools() |
44 | { |
45 | DESCRIPTION="mcore client daemon." |
46 | DEPEND="${COMMON_DEPEND} |
47 | == app-mage/mcore-tools-common-${PVER}" |
48 | } |
49 | |
50 | split_info_mcore-controld() |
51 | { |
52 | DESCRIPTION="mcore control daemon." |
53 | DEPEND="${CONTROLD_DEPEND} |
54 | == app-mage/mcore-tools-common-${PVER} |
55 | == app-mage/mcore-tools-${PVER}" |
56 | } |
57 | |
58 | src_prepare() |
59 | { |
60 | munpack ${SRCFILE} || die |
61 | cd ${SRCDIR} |
62 | |
63 | # use package version and build |
64 | echo "${PVER}-${PBUILD}" > VERSION || die |
65 | } |
66 | |
67 | src_compile() |
68 | { |
69 | cd ${SRCDIR} |
70 | mmake \ |
71 | MCORE_UNPRIV_USER=station \ |
72 | MCORE_DISTRIBUTION=ALX \ |
73 | MCORE_DEFAULT_HOSTNAME=alx-unconfigured \ |
74 | MCORE_DEFAULT_DOMAIN=dom-aka-nt.intern \ |
75 | SYSTEM_ICAROOT=/opt/Citrix/ICAClient \ |
76 | PNABROWSE_CITRIX_BROWSER=ica.dom-aka-nt.intern \ |
77 | PNABROWSE_SERVER_EXCLUDE=ESA-TS-CLEAN \ |
78 | DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \ |
79 | STOREFRONT_ADDSTORE_REQUIRED=0 \ |
80 | STOREFRONT_SUBSCRIBE_APP=0 \ |
81 | MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \ |
82 | MCORE_SQL_HOST="localhost" \ |
83 | MCORE_SQL_DB="mcore" \ |
84 | MCORE_SQL_USER="alx_install" \ |
85 | MCORE_SQL_PASS="@lx" \ |
86 | || die |
87 | } |
88 | |
89 | src_install_mcore-tools-common() |
90 | { |
91 | cd ${SRCDIR} |
92 | make DESTDIR=${BINDIR} install-common || die |
93 | |
94 | # needed directory |
95 | mkeepdir /var/lib/mcored || die |
96 | } |
97 | |
98 | src_install_mcore-tools() |
99 | { |
100 | cd ${SRCDIR} |
101 | make DESTDIR=${BINDIR} install-client || die |
102 | } |
103 | |
104 | src_install_mcore-controld() |
105 | { |
106 | cd ${SRCDIR} |
107 | make DESTDIR=${BINDIR} install-control || die |
108 | } |
109 | |
110 | postinstall_mcore-tools() |
111 | { |
112 | mstartunit mcored |
113 | mstartunit mcore-register-client |
114 | mstartunit mcore-request-configuration |
115 | } |
116 | |
117 | postremove_mcore-tools() |
118 | { |
119 | mstopunit mcored |
120 | mstopunit mcore-register-client |
121 | mstopunit mcore-request-configuration |
122 | } |
123 | |
124 | postinstall_mcore-controld() |
125 | { |
126 | # remove mcored |
127 | mstopunit mcored |
128 | mstopunit mcore-register-client |
129 | mstopunit mcore-request-configuration |
130 | |
131 | # start mcore-controld |
132 | mstartunit mcore-controld |
133 | } |
134 | |
135 | postremove_mcore-controld() |
136 | { |
137 | mstopunit mcore-controld |
138 | } |