Skip to content

Instantly share code, notes, and snippets.

@aL3xa
Created November 21, 2012 01:51
Show Gist options
  • Save aL3xa/4122561 to your computer and use it in GitHub Desktop.
Save aL3xa/4122561 to your computer and use it in GitHub Desktop.
RApache github PKGBUILD
# Maintainer: Aleksandar Blagotić <aca.blagotic_at_gmail.com>
# Based on work by: Florian Breitwieser <florian.bw_at_gmail.com>
pkgname=rapache-git
pkgver=20121121
pkgrel=1
pkgdesc="R embedded inside Apache"
arch=('i686' 'x86_64')
url="https://github.com/jeffreyhorner/rapache"
license=('Apache License Version 2.0')
depends=('apache' 'r')
makedepends=('git' 'make')
install="$pkgname.install"
conflicts=('rapache')
_gitroot="git://github.com/jeffreyhorner/rapache.git"
build() {
cd "$srcdir"
if [ -d $pkgname ]; then
cd $pkgname && git pull origin master
else
git clone $_gitroot $pkgname
fi
}
package() {
cd "$srcdir/$pkgname"
./configure --with-R=$(which R) --with-apache2-apxs=$(which apxs)
make || return 1
install -m 644 -D .libs/mod_R.so $pkgdir/etc/httpd/modules/mod_R.so || return 1
}
post_install() {
echo "You're almost done, now just put:"
echo ''
echo 'LoadModule R_module modules/mod_R.so'
echo ''
echo 'in Apache conf file: /etc/httpd/conf/httpd.conf'
}
@daroczig
Copy link

You should definitely push this to AUR too. If you've not done that already :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment