Skip to content

Instantly share code, notes, and snippets.

@mtorromeo
Last active August 3, 2017 12:52
Show Gist options
  • Save mtorromeo/83bb510f7f8d2274e276961fe9ae0ad2 to your computer and use it in GitHub Desktop.
Save mtorromeo/83bb510f7f8d2274e276961fe9ae0ad2 to your computer and use it in GitHub Desktop.
Split passenger package
# $Id: PKGBUILD 247762 2017-08-03 10:17:52Z spupykin $
# Maintainer: Sergej Pupykin <[email protected]>
pkgbase=passenger
pkgname=(passenger mod_passenger nginx-mod-passenger)
pkgver=5.1.7
pkgrel=2
_nginxver=1.12.1
pkgdesc="Fast and robust web server and application server for Ruby, Python and Node.js"
arch=('i686' 'x86_64')
url="https://www.phusionpassenger.com"
_watch="https://github.com/phusion/passenger/releases"
license=('MIT')
makedepends=('ruby' 'ruby-rack' 'curl' 'apache')
options=('!emptydirs' 'staticlibs')
validpgpkeys=('D5F0851426939232F437AB722AC745A50A212A8C'
'16378A33A6EF16762922526E561F9B9CAC40B2F7')
source=(https://s3.amazonaws.com/phusion-passenger/releases/passenger-$pkgver.tar.gz{,.asc}
https://nginx.org/download/nginx-$_nginxver.tar.gz)
sha256sums=('2b40a00a3fdc90a6acf784319f60fd53549f036ffc99fcbb23a0658cb7e2b215'
'SKIP'
'8793bf426485a30f91021b6b945a9fd8a84d87d17b566562c3797aba8fac76fb')
build(){
cd "$srcdir"/nginx-$_nginxver
./configure --with-compat --add-dynamic-module=../$pkgbase-$pkgver/src/nginx_module
make modules
cd "$srcdir"/$pkgbase-$pkgver
rake nginx CACHING=false
./bin/passenger-install-apache2-module -a
}
package_passenger() {
cd "$srcdir"/passenger-$pkgver
depends=('ruby' 'ruby-rack' 'curl')
mkdir -p "$pkgdir"/usr/lib/passenger/
cp -R * "$pkgdir"/usr/lib/passenger/
install -Dm644 "$srcdir"/$pkgbase-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_mod_passenger() {
pkgdesc="Passenger apache module"
depends=('passenger' 'apache')
install=passenger.install
cd "$srcdir"/passenger-$pkgver
mkdir -p "$pkgdir"/usr/lib/httpd/modules
ln -sf /usr/lib/passenger/buildout/apache2/mod_passenger.so "$pkgdir"/usr/lib/httpd/modules/mod_passenger.so
install -Dm644 "$srcdir"/$pkgbase-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_nginx-mod-passenger() {
pkgdesc="Passenger nginx module"
depends=('passenger' "nginx=$_nginxver")
cd "$srcdir"/nginx-$_nginxver/objs
for mod in ngx_*.so; do
install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
done
install -Dm644 "$srcdir"/$pkgbase-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment