# Contributor: Michael Truog # Maintainer: Michael Truog # # INFO # # Why is the cloudi.initd file not using the openrc default start-stop-daemon? # # With the Erlang VM it is possible to use the -heart erl command line # argument (which is possible with cloudi configuration of the # /etc/cloudi/vm.args file). To allow the use of the heartbeat monitoring # of the Erlang runtime system, it is necessary to rely upon the cloudi # script for handling the cloudi pid and not utilize openrc for pidfile # creation or signal-based termination. # # With a typical Erlang VM release, it is normally expected to provide # the ability to attach to the Erlang VM shell of the running node using # pipes. The setup of the Erlang VM shell pipes needs to be handled with # Erlang VM execution that also handles detaching the daemon process. # If the openrc default start-stop-daemon execution was used instead, # it would not be possible to easily setup the Erlang VM shell pipes. # # The termination of cloudi utilizes a 65000 millisecond timeout, allowing # all services a maximum of 60000 milliseconds for termination with # 5000 millisecond for internal Erlang VM delays. The cloudi script does # block for this termination to complete. # # The pid file path is set during the configuration step # (shown below with the assignment of CLOUDI_PID_FILE). pkgname=cloudi pkgver=1.7.5 pkgrel=8 pkgdesc="Cloud computing framework for efficient, scalable, and stable soft-realtime event processing." url="https://cloudi.org/" license="MIT" arch="all" depends="erlang g++" makedepends="autoconf automake binutils-dev boost-dev boost-system boost-thread erlang-asn1 erlang-common-test erlang-crypto erlang-dev erlang-erl-interface erlang-eunit erlang-inets erlang-jinterface erlang-public-key erlang-reltool erlang-sasl erlang-snmp erlang-ssh erlang-ssl erlang-syntax-tools erlang-tools erlang-xmerl gmp-dev go libexecinfo-dev libtool nodejs openjdk8 perl php7 python3 python3-dev ruby " subpackages="$pkgname-static $pkgname-openrc" source="https://osdn.net/dl/$pkgname/$pkgname-$pkgver.tar.gz 0005-Disable-tests-for-aports-buildservers.patch python-3.7.patch erlang-otp-ocaml-compattibility.patch $pkgname.initd" builddir="$srcdir/cloudi-$pkgver" # configure additional dependencies based on the package architecture CONFIGURE_ARGS="" # Enable OCaml on the appropriate architectures case "$CTARGET_ARCH" in x86 | armhf | armv7) ;; *) makedepends="$makedepends ocaml" CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-ocaml-support" ;; esac case "$CTARGET_ARCH" in x86_64) makedepends="$makedepends ghc cabal zlib-dev" CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-haskell-support" ;; esac prepare() { default_prepare cd "$builddir"/src ./autogen.sh } build() { cd "$builddir"/src export PATH="/usr/lib/jvm/java-1.8-openjdk/bin:$PATH" LIBS="-lexecinfo" CLOUDI_PID_FILE="/run/cloudi.pid" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --bindir=/usr/sbin \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --host="$CHOST" \ --build="$CBUILD" \ --with-cxx-backtrace \ --with-python-version=3 \ --enable-go-support $CONFIGURE_ARGS make } check() { cd "$builddir"/src make ct } package() { cd "$builddir"/src make DESTDIR="$pkgdir" install install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname } sha512sums="6684f498b501b47f583c86bb949aec68db4f8f91dd57c352989b01792e871d7e3e3386e658d6b71791c2baf7fc618c67b4fd85487ff27a17ef6f495cad5f241f cloudi-1.7.5.tar.gz d831cc9672c12f27cf958975d72a3cb02ca21e78347f278a840679ab89479f795aba5ff0378731f276863fc5a3237d1bd0f861ccedc41e77321a19d726da8ca9 0005-Disable-tests-for-aports-buildservers.patch 020e7c08867e2d84e75eeee74b72f1d79de481fb2affb815f6780d8ce9777dfda2aff71a5af4c066dce334b63b55f05706dfe751379479c086f6e573aa1b9ee0 python-3.7.patch 4b03608893095df39181e004a88372ed6d2752166f4b2867e053e9c07ee0793cd8590d2720906a9ff093924766349b548b0e5439b129b09193b64f02645f6824 erlang-otp-ocaml-compattibility.patch 053f860f656617012208a0e1909e43b2f8979d381a90d3fa5a745a9cf5021fe54556a641fef2badaa9955f2394d00e32183389cb9b501169dcbf8cbe4fbb0329 cloudi.initd"