Magellan Linux

Annotation of /smage/branches/alx07x-stable/core/mcore-tools/mcore-tools-1.0.3-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15547 - (hide annotations) (download)
Thu Sep 10 12:29:04 2020 UTC (3 years, 8 months ago) by niro
File size: 3016 byte(s)
-release branches/alx07x-stable
1 niro 15504 # $Id$
2    
3     PNAME="mcore-tools"
4     PVER="1.0.3"
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    
20     # mcore-controld requires xml -> xmlstartlet
21    
22     SDEPEND="${COMMON_DEPEND}
23     ${CONTROL_DEPEND}
24     >= dev-util/pkgconfig-0.25
25     >= x11-libs/libX11-dev-1.6
26     >= virtual/xproto"
27    
28     SRCFILE="${PNAME}-${PVER}.tar.bz2"
29     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
30    
31     sminclude systemd
32    
33     SRC_URI=( mirror://${PNAME}/${SRCFILE} )
34    
35     split_info_mcore-tools-common()
36     {
37     DESCRIPTION="mcore common files."
38     DEPEND=""
39     }
40    
41     split_info_mcore-tools()
42     {
43     DESCRIPTION="mcore client daemon."
44     DEPEND="${COMMON_DEPEND}
45     == app-mage/mcore-tools-common-${PVER}"
46     }
47    
48     split_info_mcore-controld()
49     {
50     DESCRIPTION="mcore control daemon."
51     DEPEND="${CONTROLD_DEPEND}
52     == app-mage/mcore-tools-common-${PVER}
53     == app-mage/mcore-tools-${PVER}"
54     }
55    
56     src_prepare()
57     {
58     munpack ${SRCFILE} || die
59     cd ${SRCDIR}
60    
61     # use package version and build
62     echo "${PVER}-${PBUILD}" > VERSION || die
63    
64     # do not install the dracut module atm
65     sed -i 's:dracut::' Makefile || die
66     }
67    
68     src_compile()
69     {
70     cd ${SRCDIR}
71     mmake \
72     MCORE_UNPRIV_USER=station \
73     MCORE_DISTRIBUTION=ALX \
74     MCORE_DEFAULT_HOSTNAME=alx-unconfigured \
75     MCORE_DEFAULT_DOMAIN=dom-aka-nt.intern \
76     SYSTEM_ICAROOT=/opt/Citrix/ICAClient \
77     PNABROWSE_CITRIX_BROWSER=ica.dom-aka-nt.intern \
78     PNABROWSE_SERVER_EXCLUDE=ESA-TS-CLEAN \
79     PNABROWSE_EXECUTABLE=/usr/bin/pnabrowse \
80     DEFAULT_STOREFRONT_STORE="https://storefront.dom-aka-nt.intern/Citrix/ALX/PNAgent/config.xml" \
81     STOREFRONT_ADDSTORE_REQUIRED=0 \
82     STOREFRONT_SUBSCRIBE_APP=0 \
83     STOREBROWSE_EXECUTABLE=/usr/bin/storebrowse \
84     MCORE_CONTROL_SERVER="alx-control.dom-aka-nt.intern" \
85     MCORE_SQL_HOST="localhost" \
86     MCORE_SQL_DB="mcore" \
87     MCORE_SQL_USER="alx_install" \
88     MCORE_SQL_PASS="@lx" \
89     || die
90     }
91    
92     src_install_mcore-tools-common()
93     {
94     cd ${SRCDIR}
95     make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-common || die
96    
97     # needed directory
98     mkeepdir /var/lib/mcored || die
99     }
100    
101     src_install_mcore-tools()
102     {
103     cd ${SRCDIR}
104     make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-client || die
105     }
106    
107     src_install_mcore-controld()
108     {
109     cd ${SRCDIR}
110     make MCORE_UNPRIV_USER=station DESTDIR=${BINDIR} install-control || die
111     }
112    
113     preinstall_mcore-tools()
114     {
115     museradd -o "-g users -d /home/station -s /bin/bash" station
116     }
117    
118     postinstall_mcore-tools()
119     {
120     mstartunit mcored
121     mstartunit mcore-register-client
122     mstartunit mcore-request-configuration
123     }
124    
125     postremove_mcore-tools()
126     {
127     mstopunit mcored
128     mstopunit mcore-register-client
129     mstopunit mcore-request-configuration
130     }
131    
132     postinstall_mcore-controld()
133     {
134     # remove mcored
135     mstopunit mcored
136     mstopunit mcore-register-client
137     mstopunit mcore-request-configuration
138    
139     # start mcore-controld
140     mstartunit mcore-controld
141     }
142    
143     postremove_mcore-controld()
144     {
145     mstopunit mcore-controld
146     }