diff options
Diffstat (limited to 'community')
-rw-r--r-- | community/ruby-puma/APKBUILD | 25 | ||||
-rw-r--r-- | community/ruby-puma/puma.confd | 5 | ||||
-rw-r--r-- | community/ruby-puma/puma.initd | 18 |
3 files changed, 43 insertions, 5 deletions
diff --git a/community/ruby-puma/APKBUILD b/community/ruby-puma/APKBUILD index 60f5d38745..238adec32e 100644 --- a/community/ruby-puma/APKBUILD +++ b/community/ruby-puma/APKBUILD @@ -3,7 +3,7 @@ pkgname=ruby-puma _gemname=puma pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server" url="http://puma.io/" arch="all" @@ -13,7 +13,10 @@ depends_dev="" makedepends="$depends_dev ruby-dev" install="" subpackages="" -source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem" +source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem + $_gemname.confd + $_gemname.initd + " build() { return 0 @@ -31,9 +34,21 @@ package() { "$pkgdir"/$_geminstdir/ext \ "$pkgdir"/$_geminstdir/.require_paths mkdir -p "$pkgdir"/usr/bin + ln -s $_gemdir/bin/puma "$pkgdir"/usr/bin/ || return 1 ln -s $_gemdir/bin/pumactl "$pkgdir"/usr/bin/ || return 1 + + install -Dm644 "$srcdir"/$_gemname.confd \ + "$pkgdir"/etc/conf.d/$_gemname || return 1 + install -Dm755 "$srcdir"/$_gemname.initd \ + "$pkgdir"/etc/init.d/$_gemname || return 1 } -md5sums="e1c66fa8d134bef5cfd680612238d725 puma-3.2.0.gem" -sha256sums="eca7283e0558c3c6229b169c181973cfe4568a97955bacdeb2de793962b3ebae puma-3.2.0.gem" -sha512sums="58452a5460295795bb8200a907c87dbad7f173695fddc7d155a492f274a83d353d79d007eb9e88b73249bef1fe3737f006bf10ad2f4266b3dee28a7e8c86dbb8 puma-3.2.0.gem" +md5sums="e1c66fa8d134bef5cfd680612238d725 puma-3.2.0.gem +623b3b79ca0dbb8c0877024b49c5cbc5 puma.confd +2ce1b6b52c7f138aa0b932a0c79a97da puma.initd" +sha256sums="eca7283e0558c3c6229b169c181973cfe4568a97955bacdeb2de793962b3ebae puma-3.2.0.gem +d386c3d1f4513387c740ef718d2a52bb112d42824af55e412baad885c15becef puma.confd +53566388af2a2567dcac0113d9862196d4fbc884f360d39ae72dd7147e0193b0 puma.initd" +sha512sums="58452a5460295795bb8200a907c87dbad7f173695fddc7d155a492f274a83d353d79d007eb9e88b73249bef1fe3737f006bf10ad2f4266b3dee28a7e8c86dbb8 puma-3.2.0.gem +f90c461f8a257cd7ce91c2d5f621db209d312547ece0a782cdf317c16dc2a49764722df41bffdc1a1e4a44a9711a1c4fed307aea8bb35b8c457d55df2521841d puma.confd +3ae546b1702cb4ebf19a3052722d1754d79ac95089ecb1c42c6fc0dfed8f88aa20ede7a36d47b50e64f83230a4efbdc5f3d4c89798a63ef7fe2de9c1cc7ee5ed puma.initd" diff --git a/community/ruby-puma/puma.confd b/community/ruby-puma/puma.confd new file mode 100644 index 0000000000..d7c0770116 --- /dev/null +++ b/community/ruby-puma/puma.confd @@ -0,0 +1,5 @@ +# puma options +puma_args="-e production" +puma_user="nobody" +puma_group="www-data" +puma_approot="" diff --git a/community/ruby-puma/puma.initd b/community/ruby-puma/puma.initd new file mode 100644 index 0000000000..600dffe1e3 --- /dev/null +++ b/community/ruby-puma/puma.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +name=puma +command=/usr/bin/puma +pidfile=/var/run/puma/puma.pid +command_args="--daemon --pidfile $pidfile ${puma_args}" +start_stop_daemon_args="--background --user $puma_user --group $puma_group --chdir $puma_approot" + +depend() { + use logger dns + need net + after firewall +} + +start_pre() { + checkpath --directory --owner $puma_user:$puma_group --mode 0775 \ + /var/run/$name +} + |