summaryrefslogtreecommitdiff
path: root/community/mod_wsgi/PKGBUILD
blob: cae5a5490276232aa8ef410fde62426953bd6333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id: PKGBUILD 111823 2014-05-25 10:39:16Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Ryan Coyner <rcoyner@gmail.com>

pkgbase=mod_wsgi
pkgname=($pkgbase 'mod_wsgi2')
pkgver=3.5
pkgrel=1
pkgdesc='Python2 WSGI adapter module for Apache'
arch=('x86_64' 'i686')
url='http://www.modwsgi.org/'
license=('APACHE')
makedepends=('apache' 'python' 'python2')
install='mod_wsgi.install'
source=("https://github.com/GrahamDumpleton/$pkgname/archive/$pkgver.tar.gz")
sha256sums=('f0674c38f0f568ece55610bcc6a775c179835c4cba23aa7f876d2a2a8520bf93')

build() {
  cp -r "$pkgbase-$pkgver" py2

  # Build the Python 3 version
  cd "$pkgbase-$pkgver"
  ./configure --prefix=/usr \
    --with-apxs=/usr/bin/apxs \
    --with-python=/usr/bin/python
  make LDLIBS='-lpython3 -lpthread -ldl -lutil -lm'

  # Build the Python 2 version
  cd "$srcdir/py2"
  ./configure \
    --prefix=/usr \
    --with-apxs=/usr/bin/apxs \
    --with-python=/usr/bin/python2
  make
}

package_mod_wsgi() {
  pkgdesc='Python WSGI adapter module for Apache'
  depends=('apache' 'python')
  conflicts=('mod_wsgi2')
  make -C "$pkgbase-$pkgver" DESTDIR="$pkgdir" install
}

package_mod_wsgi2() {
  pkgdesc='Python2 WSGI adapter module for Apache'
  depends=('apache' 'python2')
  conflicts=('mod_wsgi')
  make -C py2 DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et: