summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f3dbe626393b50aaad9f1189a0403d860e4bb20c (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
# Maintainer: Arthur Vuillard <arthur@hashbang.fr>
pkgname=postgresql-multicorn
pkgver=1.3.4
pkgrel=1
pkgdesc="Python Wrapper for Postgresql 9.2+ Foreign Data Wrapper"
url="http://multicorn.org/"
arch=('x86_64' 'i686')
license=('Postgresql')
depends=('postgresql>=10.0' 'python')
makedepends=('python-setuptools')

_github_name="Multicorn"
_github_tag="v${pkgver}"

source=(
    "https://github.com/Kozea/${_github_name}/archive/${_github_tag}.zip"
)

md5sums=('961285cc5f8753af02bf6efb8e0e40f7')

build(){
    cd ${srcdir}/${_github_name}-${pkgver}
    make
}

package(){
    cd ${srcdir}/${_github_name}-${pkgver}
    python setup.py install --root="$pkgdir/"

    mkdir -p ${pkgdir}/usr/lib/postgresql
    mkdir -p ${pkgdir}/usr/share/postgresql/extension

    cp sql/multicorn--${pkgver}.sql multicorn.control ${pkgdir}/usr/share/postgresql/extension
    chmod 644 ${pkgdir}/usr/share/postgresql/extension/*
    cp multicorn.so ${pkgdir}/usr/lib/postgresql
}