Apache CloudStack for Arch Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

579 lines
19 KiB

2 years ago
  1. # Maintainer: Pekka Helenius <pekka dot helenius at fjordtek dot com>
  2. # Skip Maven tests?
  3. skip_tests=true
  4. # Install non-OSS (open source software) Java plugins?
  5. # Adds up to 1.5GB to the installation size
  6. install_non_oss=true
  7. maven_options=(
  8. # CloudStack profile options
  9. -P systemvm
  10. #-P eclipse
  11. #-P developer
  12. #-P impatient
  13. #-P vmware
  14. #-P quality
  15. #-P disablecheckstyle
  16. #-P enablefindbugs
  17. -Dorg.slf4j.simpleLogger.defaultLogLevel=warn
  18. )
  19. pythonver=3.7
  20. pkgbase=cloudstack
  21. pkgname=(
  22. 'cloudstack-agent'
  23. 'cloudstack-management'
  24. 'cloudstack-ui'
  25. 'cloudstack-common'
  26. 'cloudstack-cli'
  27. 'cloudstack-usage'
  28. 'cloudstack-mysql-ha'
  29. # 'cloudstack-baremetal-agent'
  30. # 'cloudstack-marvin'
  31. # 'cloudstack-integration-tests'
  32. # 'cloudstack-docs'
  33. )
  34. _commit=44c08b5acc598972b4f0af576ffdea4e2447cb41 # 4.16.0.0
  35. pkgver=4.16.0.0.r0.g44c08b5acc
  36. pkgrel=1
  37. groups=(cloudstack)
  38. pkgdesc='Open Source Cloud Computing'
  39. arch=('any')
  40. url='https://cloudstack.apache.org/'
  41. license=('Apache2')
  42. depends=(
  43. 'systemd'
  44. 'logrotate'
  45. 'libvirt'
  46. 'jre11-openjdk'
  47. 'java-runtime-common'
  48. 'mysql'
  49. 'python'
  50. 'python-setuptools'
  51. 'python-mysql-connector'
  52. # Both iptables & ebtables executables is required by cloudstack-agent
  53. 'iptables-nft'
  54. 'ipmitool'
  55. 'nfs-utils'
  56. )
  57. makedepends=(
  58. # CloudStack source retrieval
  59. 'git'
  60. 'wget'
  61. # CloudStack compilation
  62. 'jdk11-openjdk'
  63. 'maven'
  64. # CloudStack UI compilation
  65. # <16 required by cloudstack-ui npm compilation process due to implementation issues
  66. # See: https://github.com/sass/node-sass/issues/3077
  67. 'nodejs<16'
  68. 'npm'
  69. 'gcc'
  70. # # CloudStack apidocs compilation
  71. # 'python'
  72. )
  73. optdepends=(
  74. 'qemu: A generic and open source machine emulator and virtualizer'
  75. 'cloudmonkey: Command line interface for Apache CloudStack management'
  76. 'python-solidfire-sdk: SolidFire Python SDK for application integration'
  77. 'edk2-ovmf: Firmware for Virtual Machines (x86_64, i686)'
  78. 'openvswitch: Production Quality, Multilayer Open Virtual Switch'
  79. 'nfs-utils: Support programs for Network File Systems'
  80. )
  81. source=(
  82. "${pkgbase}::git+https://github.com/apache/${pkgbase}.git#commit=${_commit}"
  83. "cloudstack.sysuser.conf"
  84. "cloudstack.mysql.conf"
  85. "uefi.properties"
  86. "cloudstack-nfs.exports"
  87. "patch_domr-path.patch"
  88. "patch_python3.patch"
  89. "cloudbr0.netdev"
  90. "cloudbr0.network"
  91. "cloudbr1.netdev"
  92. "cloudbr1.network"
  93. "cloudbr2.netdev"
  94. "cloudbr2.network"
  95. )
  96. if [[ ${skip_tests} == "true" ]]; then
  97. maven_options+=(-DskipTests)
  98. fi
  99. if [[ ${install_non_oss} == "true" ]]; then
  100. source+=(
  101. "${pkgbase}-nonoss::git+https://github.com/shapeblue/${pkgbase}-nonoss.git"
  102. )
  103. maven_options+=(-Dnoredist)
  104. fi
  105. # options=(!emptydirs)
  106. sha256sums=('SKIP'
  107. '1ad0d6b9a15889763bea92c71ecf9dc44e11e408260cdc54efa4d7acd849230f'
  108. '69b315a10f88c24d6fe2b248b0593691d656f8992e6e37f8b0a4d2d4a9caca40'
  109. '2ac98910f320785ebbc682a426f4eef6d8b4ca5c8c55195dc4c048072fa93fb6'
  110. '099a4e36ced56cebb8e0d4c058582bc549a1b75b87f889bbd3bb7f83c17134db'
  111. '8691b6b47164d11d3c1eff90a0108e694427463fb3d49608628a5d0121b6a5d4'
  112. '2515da6f9195c7e3bce321bd328743ee4c685ccd01ddb4099202637036eab40e'
  113. '4d5d5c4d923ceec434403fc416a4d09a820fdb49ece6e4f6d0b32a05014446be'
  114. 'e3be7fda05b639c1b82db854347262f8206639f78f13d5f207b52c9f6a126a8d'
  115. 'dfc16a17e57b9d174aae8abee6c04b8a6b02ffc96909315f302199e43dea9b9e'
  116. '2fa8cf39924356c5af6403f09ac17930b6d4f38c509cd655f36f705d1dc9d280'
  117. '1bd92d5f69a49c03a492e96f03efdebcef88a73948410511b715339735e15d3f'
  118. '0ce7c6173c80fa74de5a473336ab099337e9248cceef3b7b33c7199baf71aa33'
  119. 'SKIP')
  120. pkgver() {
  121. cd ${pkgbase}
  122. git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  123. }
  124. prepare() {
  125. if [[ ${install_non_oss} == "true" ]]; then
  126. msg2 "Installing non-OSS CloudStack plugins ($HOME/.m2)"
  127. cd ${pkgbase}-nonoss
  128. ./install-non-oss.sh
  129. fi
  130. cd ${srcdir}/${pkgbase}
  131. patch -Np1 -i ../patch_domr-path.patch
  132. patch -Np1 -i ../patch_python3.patch
  133. rm build/replace.properties
  134. # Compile-time variables
  135. echo "
  136. AGENTCLASSPATH=
  137. AGENTLOGDIR=/var/log/cloudstack/agent
  138. AGENTLOG=/var/log/cloudstack/agent/agent.log
  139. AGENTSYSCONFDIR=/etc/cloudstack/agent
  140. APISERVERLOG=/var/log/cloudstack/management/apilog.log
  141. BINDIR=/usr/bin
  142. COMMONLIBDIR=/usr/share/cloudstack-common
  143. COMPONENTS-SPEC=components-premium.xml
  144. CONFIGUREVARS=
  145. DBDRIVER=jdbc:mysql
  146. DBHOST=localhost
  147. DBPW=cloud
  148. DBROOTPW=
  149. DBUSER=cloud
  150. DEPSCLASSPATH=
  151. DOCDIR=
  152. IPALOCATORLOG=/var/log/cloudstack/management/ipallocator.log
  153. JAVADIR=/usr/share/java
  154. LIBEXECDIR=/usr/libexec
  155. LOCKDIR=/var/lock
  156. MSCLASSPATH=
  157. MSCONF=/etc/cloudstack/management
  158. MSLOGDIR=/var/log/cloudstack/management
  159. MSLOG=/var/log/cloudstack/management/management-server.log
  160. MSMNTDIR=/var/cloudstack/mnt
  161. MSUSER=cloud
  162. PACKAGE=cloudstack
  163. PIDDIR=/run
  164. PLUGINJAVADIR=/usr/share/cloudstack-management/plugin
  165. PREMIUMJAVADIR=/usr/share/cloudstack-management/premium
  166. PYTHONDIR=/usr/lib/python${pythonver}/site-packages/
  167. REMOTEHOST=localhost
  168. SERVERSYSCONFDIR=/etc/cloudstack/server
  169. SETUPDATADIR=/usr/share/cloudstack-management/setup
  170. SYSCONFDIR=/etc
  171. SYSTEMCLASSPATH=
  172. SYSTEMJARS=
  173. USAGECLASSPATH=
  174. USAGELOG=/var/log/cloudstack/usage/usage.log
  175. USAGESYSCONFDIR=/etc/cloudstack/usage
  176. VERSION=$(printf "%s" $(git describe --long --tags | cut -d- -f1))
  177. " > build/replace.properties
  178. }
  179. build() {
  180. cd ${pkgbase}
  181. export JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
  182. export PATH=$JAVA_HOME/bin:$PATH
  183. mvn clean install ${maven_options[*]}
  184. # CloudStack UI
  185. cd ui && npm install && npm run build && cd ..
  186. }
  187. package_cloudstack-agent() {
  188. depends=('python' 'jre11-openjdk' 'logrotate' 'openssh' 'systemd' 'iptables-nft')
  189. pkgdesc='Apache CloudStack Agent'
  190. backup=(
  191. etc/cloudstack/agent/agent.properties
  192. etc/cloudstack/agent/uefi.properties
  193. )
  194. install=cloudstack-agent.install
  195. cd ${pkgbase}
  196. mkdir -p ${pkgdir}/etc/{cloudstack/agent,default,profile.d}
  197. mkdir -p ${pkgdir}/var/{cache/cloudstack,log/cloudstack}
  198. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  199. mkdir -p ${pkgdir}/usr/{bin,share/cloudstack-agent} #,share/doc/cloudstack-agent}
  200. mkdir -p ${pkgdir}/usr/share/cloudstack-agent/{plugins,lib,scripts}
  201. install -Dm0644 plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm*.jar ${pkgdir}/usr/share/cloudstack-agent/lib/
  202. install -D plugins/hypervisors/kvm/target/dependencies/* ${pkgdir}/usr/share/cloudstack-agent/lib/
  203. mkdir -p ${pkgdir}/usr/lib/systemd/system
  204. install -Dm0644 packaging/systemd/cloudstack-agent.service ${pkgdir}/usr/lib/systemd/system/
  205. install -Dm0644 packaging/systemd/cloudstack-agent.default ${pkgdir}/etc/default/cloudstack-agent
  206. install -Dm0644 packaging/systemd/cloudstack-rolling-maintenance@.service ${pkgdir}/usr/lib/systemd/system/
  207. install -Dm0644 agent/target/transformed/cloudstack-agent.logrotate ${pkgdir}/etc/logrotate.d/cloudstack-agent
  208. install -Dm0755 agent/target/transformed/cloud-setup-agent ${pkgdir}/usr/bin/cloudstack-setup-agent
  209. install -Dm0755 agent/target/transformed/cloud-ssh ${pkgdir}/usr/bin/cloudstack-ssh
  210. install -Dm0755 agent/target/transformed/cloudstack-agent-profile.sh ${pkgdir}/etc/profile.d/cloudstack-agent-profile.sh
  211. install -Dm0755 agent/target/transformed/cloudstack-agent-upgrade ${pkgdir}/usr/bin/
  212. install -Dm0755 agent/target/transformed/cloud-guest-tool ${pkgdir}/usr/bin/cloudstack-guest-tool
  213. install -Dm0644 agent/target/transformed/libvirtqemuhook ${pkgdir}/usr/share/cloudstack-agent/lib/
  214. install -Dm0644 agent/target/transformed/rolling-maintenance ${pkgdir}/usr/share/cloudstack-agent/lib/
  215. install -D agent/target/transformed/environment.properties ${pkgdir}/etc/cloudstack/agent/
  216. install -D agent/target/transformed/agent.properties ${pkgdir}/etc/cloudstack/agent/
  217. install -D agent/target/transformed/log4j-cloud.xml ${pkgdir}/etc/cloudstack/agent/
  218. # Fix: Add missing uefi.properties file
  219. install -Dm0644 ${srcdir}/uefi.properties ${pkgdir}/etc/cloudstack/agent/
  220. # Fix: Add missing log path
  221. mkdir -p ${pkgdir}/var/log/cloudstack/agent
  222. # Fix: Install missing script files
  223. # TODO: Some script files have referrals to unknown 'cmdline' file.
  224. cp -r systemvm/agent/scripts/* ${pkgdir}/usr/share/cloudstack-agent/scripts/
  225. chmod 0755 ${pkgdir}/usr/share/cloudstack-agent/scripts/*.sh
  226. for i in $(find ${pkgdir}/usr/share/cloudstack-agent/scripts/ -iname "*.sh"); do
  227. sed -i 's/\/cloud\//\/cloudstack\//g' "${i}"
  228. sed -i 's/\/usr\/local\//\/usr\//g' "${i}"
  229. done
  230. # Fix: Add & correct missing paths
  231. echo "
  232. # Full path: paths.script + value here
  233. # See environment.properties
  234. hypervisor.scripts.dir=scripts/vm/hypervisor
  235. kvm.scripts.dir=scripts/vm/hypervisor/kvm
  236. network.scripts.dir=scripts/vm/network/vnet
  237. storage.scripts.dir=scripts/storage/qcow2
  238. public.network.device=cloudbr0
  239. private.network.device=cloudbr1
  240. guest.network.device=cloudbr2
  241. #ipv6disabled=true
  242. host.cache.location=/var/cache/cloudstack
  243. # BridgeVifDriver or DirectVifDriver
  244. libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver
  245. " >> ${pkgdir}/etc/cloudstack/agent/agent.properties
  246. }
  247. package_cloudstack-management() {
  248. depends=('python' 'jre11-openjdk' 'mysql' 'systemd' 'ipmitool' 'nfs-utils')
  249. pkgdesc='Management for Apache CloudStack'
  250. install=cloudstack-management.install
  251. noextract=(
  252. systemvmtemplate-4.16.0-kvm.qcow2.bz2
  253. systemvmtemplate-4.16.0-xen.vhd.bz2
  254. )
  255. backup=(
  256. etc/cloudstack/management/server.properties
  257. etc/cloudstack/management/db.properties
  258. etc/cloudstack/management/environment.properties
  259. )
  260. cd ${pkgbase}
  261. mkdir -p ${pkgdir}/etc/cloudstack/management
  262. mkdir -p ${pkgdir}/etc/security/limits.d/
  263. mkdir -p ${pkgdir}/etc/sudoers.d/
  264. chmod 0750 ${pkgdir}/etc/sudoers.d/
  265. mkdir -p ${pkgdir}/usr/share/cloudstack-management/{lib,setup,templates/systemvm,plugin,premium,webapp}
  266. mkdir -p ${pkgdir}/var/cache/cloudstack/management
  267. mkdir -p ${pkgdir}/var/log/cloudstack/{management,ipallocator}
  268. mkdir -p ${pkgdir}/var/lib/cloudstack/{management,mnt}
  269. # Fix: Allocate paths for NFS exports
  270. mkdir -p ${pkgdir}/var/lib/cloudstack/data/storage/{primary,secondary}
  271. cp -r client/target/utilities/scripts/db/* ${pkgdir}/usr/share/cloudstack-management/setup/
  272. cp -r ui/dist/* ${pkgdir}/usr/share/cloudstack-management/webapp/
  273. cp -r client/target/classes/META-INF/webapp/WEB-INF ${pkgdir}/usr/share/cloudstack-management/webapp/
  274. for i in \
  275. cloud-migrate-databases \
  276. cloud-setup-databases \
  277. cloud-setup-management \
  278. cloud-setup-encryption \
  279. cloud-sysvmadm \
  280. cloud-update-xenserver-licenses \
  281. cloud-set-guest-password \
  282. cloud-set-guest-sshkey
  283. do
  284. install -D client/target/utilities/bin/${i} ${pkgdir}/usr/bin/$(echo ${i} | sed 's/cloud\-/cloudstack\-/')
  285. done
  286. cp client/target/conf/* ${pkgdir}/etc/cloudstack/management/
  287. cp client/target/cloud-client-ui-*.jar ${pkgdir}/usr/share/cloudstack-management/lib/
  288. for i in $(find ${pkgdir}/usr/share/cloudstack-management/lib/ -iname "cloud-client-ui*"); do
  289. mv "${i}" $(echo "${i}" | sed 's/cloud\-client\-ui/cloudstack/')
  290. done
  291. cp client/target/lib/*jar ${pkgdir}/usr/share/cloudstack-management/lib/
  292. cp -rf engine/schema/dist/systemvm-templates/* ${pkgdir}/usr/share/cloudstack-management/templates/systemvm/
  293. rm -rf ${pkgdir}/usr/share/cloudstack-management/templates/systemvm/md5sum.txt
  294. # Nast hack for a couple of configuration files
  295. cp -f server/target/conf/cloudstack-limits.conf ${pkgdir}/etc/security/limits.d/cloudstack-limits.conf
  296. cp -f server/target/conf/cloudstack-sudoers ${pkgdir}/etc/sudoers.d/cloudstack
  297. # Allow non-root user to add a KVM host
  298. j=$(echo "$(grep Cmnd_Alias ${pkgdir}/etc/sudoers.d/cloudstack), /usr/bin/cloudstack-setup-agent" | sed 's/\//\\\//g')
  299. sed -i -i "s/^Cmnd_Alias.*/$j/" ${pkgdir}/etc/sudoers.d/cloudstack
  300. chmod 0440 ${pkgdir}/etc/sudoers.d/cloudstack
  301. # TODO: This should all be in /etc/cloudstack/management
  302. ln -s /etc/cloudstack/management ${pkgdir}/usr/share/cloudstack-management/conf
  303. ln -s /var/log/cloudstack/management ${pkgdir}/usr/share/cloudstack-management/logs
  304. mkdir -p ${pkgdir}/usr/lib/systemd/system
  305. install -m0644 packaging/systemd/cloudstack-management.service ${pkgdir}/usr/lib/systemd/system/cloudstack-management.service
  306. install -Dm0644 packaging/systemd/cloudstack-management.default ${pkgdir}/etc/default/cloudstack-management
  307. # Fix: Add missing 'cloud' user to the system
  308. mkdir -p ${pkgdir}/usr/lib/sysusers.d
  309. install -Dm0644 ${srcdir}/cloudstack.sysuser.conf ${pkgdir}/usr/lib/sysusers.d/cloudstack.conf
  310. # Fix: Add missing NFS exports file
  311. mkdir -p ${pkgdir}/etc/exports.d
  312. install -Dm0644 ${srcdir}/cloudstack-nfs.exports ${pkgdir}/etc/exports.d/cloudstack.exports
  313. # Fix: Set global database configuration values
  314. mkdir -p ${pkgdir}/etc/mysql/conf.d/
  315. install -Dm0644 ${srcdir}/cloudstack.mysql.conf ${pkgdir}/etc/mysql/conf.d/cloudstack.cf
  316. rm -f ${pkgdir}/usr/share/cloudstack-management/webapp/config.json
  317. ln -s /etc/cloudstack/ui/config.json ${pkgdir}/usr/share/cloudstack-management/webapp/config.json
  318. # Fix: Symlink log4j.xml
  319. ln -s /etc/cloudstack/management/log4j-cloud.xml ${pkgdir}/etc/cloudstack/management/log4j.xml
  320. }
  321. package_cloudstack-ui() {
  322. depends=()
  323. pkgdesc='Apache CloudStack UI'
  324. cd ${pkgbase}
  325. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  326. # mkdir -p ${pkgdir}/usr/share/doc/cloudstack-ui/
  327. mkdir -p ${pkgdir}/etc/cloudstack/ui
  328. mkdir -p ${pkgdir}/usr/share/cloudstack-ui
  329. cp -r ui/dist/config.json ${pkgdir}/etc/cloudstack/ui/
  330. cp -r ui/dist/* ${pkgdir}/usr/share/cloudstack-ui/
  331. rm -f ${pkgdir}/usr/share/cloudstack-ui/config.json
  332. ln -s /etc/cloudstack/ui/config.json ${pkgdir}/usr/share/cloudstack-ui/config.json
  333. }
  334. package_cloudstack-common() {
  335. depends=('python' 'jre11-openjdk')
  336. pkgdesc='Common files for Apache CloudStack'
  337. install=cloudstack-common.install
  338. cd ${pkgbase}
  339. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  340. # mkdir -p ${pkgdir}/usr/share/doc/cloudstack-common/
  341. mkdir -p ${pkgdir}/usr/share/cloudstack-common/{scripts,setup,lib}
  342. for i in installer network storage util vm; do
  343. cp -r scripts/${i} ${pkgdir}/usr/share/cloudstack-common/scripts
  344. done
  345. # Fix: Add missing Cisco network files
  346. cp -r client/target/common/scripts/network/cisco ${pkgdir}/usr/share/cloudstack-common/scripts/network/
  347. # TODO: Missing utils/bindir/cloud-sccs -> usr/bin/cloud-sccs
  348. install -D systemvm/dist/systemvm.iso ${pkgdir}/usr/share/cloudstack-common/vms/systemvm.iso
  349. # We need jasypt for 'cloud-install-sys-tmplt' executable, so this is a nasty hack to get it into the right place
  350. install -D agent/target/dependencies/jasypt-1.9.*.jar ${pkgdir}/usr/share/cloudstack-common/lib
  351. # Fix: Populate network interfaces for CloudStack
  352. mkdir -p ${pkgdir}/usr/lib/systemd/network/
  353. install -Dm0644 ${srcdir}/cloudbr0.netdev ${pkgdir}/usr/lib/systemd/network/
  354. install -Dm0644 ${srcdir}/cloudbr0.network ${pkgdir}/usr/lib/systemd/network/
  355. install -Dm0644 ${srcdir}/cloudbr1.netdev ${pkgdir}/usr/lib/systemd/network/
  356. install -Dm0644 ${srcdir}/cloudbr1.network ${pkgdir}/usr/lib/systemd/network/
  357. }
  358. package_cloudstack-cli() {
  359. depends=('python' 'python-mysql-connector')
  360. pkgdesc='Python bindings for Apache CloudStack (CLI)'
  361. cd ${pkgbase}
  362. mkdir -p ${pkgdir}/usr/lib/python${pythonver}/site-packages/
  363. cp -r python/lib/cloud* ${pkgdir}/usr/lib/python${pythonver}/site-packages/
  364. }
  365. package_cloudstack-usage() {
  366. depends=('jre11-openjdk' 'systemd')
  367. pkgdesc='Usage Server for Apache CloudStack'
  368. backup=(
  369. etc/cloudstack/usage/db.properties
  370. )
  371. cd ${pkgbase}
  372. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  373. # mkdir -p ${pkgdir}/usr/share/doc/cloudstack-usage/
  374. mkdir -p ${pkgdir}/etc/cloudstack/usage
  375. mkdir -p ${pkgdir}/usr/share/cloudstack-usage/{lib,plugins}
  376. mkdir -p ${pkgdir}/var/log/cloudstack/usage
  377. install -Dm0644 usage/target/cloud-usage-*.jar ${pkgdir}/usr/share/cloudstack-usage/
  378. install -D usage/target/dependencies/* ${pkgdir}/usr/share/cloudstack-usage/lib/
  379. cp client/target/lib/mysql*jar ${pkgdir}/usr/share/cloudstack-usage/lib/
  380. cp usage/target/transformed/db.properties ${pkgdir}/etc/cloudstack/usage/
  381. cp usage/target/transformed/log4j-cloud_usage.xml ${pkgdir}/etc/cloudstack/usage/log4j-cloud.xml
  382. mkdir -p ${pkgdir}/usr/lib/systemd/system
  383. install -m0644 packaging/systemd/cloudstack-usage.service ${pkgdir}/usr/lib/systemd/system/cloudstack-usage.service
  384. install -Dm0644 packaging/systemd/cloudstack-usage.default ${pkgdir}/etc/default/cloudstack-usage
  385. }
  386. package_cloudstack-mysql-ha() {
  387. pkgdesc='MySQL High Availability plugin for Apache CloudStack'
  388. depends=('mysql' 'jre11-openjdk')
  389. cd ${pkgbase}
  390. mkdir -p ${pkgdir}/usr/share/cloudstack-mysql-ha/lib
  391. install -Dm0644 plugins/database/mysql-ha/target/cloud-plugin-database-mysqlha-*.jar ${pkgdir}/usr/share/cloudstack-mysql-ha/lib/
  392. }
  393. # TODO: The executable script is not compatible with Arch Linux
  394. #package_cloudstack-baremetal-agent() {
  395. #
  396. # pkgdesc='BareMetal PXE server for Apache CloudStack'
  397. # depends=('python' 'xinetd' 'bash-completion' 'dhcp' 'tftp-hpa' 'iptables')
  398. #
  399. # cd ${pkgbase}
  400. #
  401. # mkdir -p ${pkgdir}/usr/bin
  402. # install -Dm0755 client/target/utilities/bin/cloud-setup-baremetal ${pkgdir}/usr/bin/
  403. #}
  404. # TODO: missing build-time directory
  405. # tools/marvin/marvin/cloudstackAPI
  406. # package_cloudstack-marvin() {
  407. #
  408. # depends=(
  409. # 'python'
  410. # 'python-mysql-connector'
  411. # 'python-urllib3'
  412. # 'python-paramiko'
  413. # 'python-requests'
  414. # 'python-nose'
  415. # 'python-ddt'
  416. # 'python-pyvmomi' #AUR package
  417. # 'python-netaddr'
  418. # 'python-dnspython'
  419. # 'python-pytz'
  420. # 'python-kubernetes'
  421. #
  422. # 'python-ipmisim'
  423. # 'python-pycrypt'
  424. # # TODO: missing Python dependency: 'retries'
  425. # )
  426. #
  427. # makedepends=(
  428. # 'python-setuptools'
  429. # )
  430. #
  431. # pkgdesc='Python client for Apache CloudStack'
  432. #
  433. # cd ${pkgbase}/tools/marvin
  434. #
  435. # # TODO: Should we build this package in build() section?
  436. # python setup.py build
  437. #
  438. # python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
  439. #
  440. # # TODO: Deprecate this part
  441. # #mkdir -p ${pkgdir}/usr/share/cloudstack-marvin
  442. # #cp tools/marvin/dist/Marvin-*.tar.gz ${pkgdir}/usr/share/cloudstack-marvin/
  443. #
  444. # }
  445. #package_cloudstack-integration-tests() {
  446. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  447. # mkdir -p ${pkgdir}/usr/share/doc/cloudstack-integration-tests/
  448. # pkgdesc='Integration tests for Apache CloudStack'
  449. #
  450. # cd ${pkgbase}
  451. #
  452. # mkdir -p ${pkgdir}/usr/share/cloudstack-integration-tests
  453. # cp -r test/integration/* ${pkgdir}/usr/share/cloudstack-integration-tests/
  454. #
  455. #}
  456. #package_cloudstack-docs() {
  457. # TODO: Missing doc files: INSTALL.md.gz, LICENSE.gz, NOTICE.gz, changelog.gz, copyright
  458. # mkdir -p ${pkgdir}/usr/share/doc/cloudstack-docs/
  459. # pkgdesc='Apache CloudStack docs'
  460. #
  461. # cd ${pkgbase}
  462. #
  463. #}