49 lines
1.5 KiB
Bash
49 lines
1.5 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=opendbx
|
|
pkgver=1.4.6
|
|
_debver=$pkgver
|
|
_debrel=15
|
|
pkgrel=4
|
|
pkgdesc="Extremely lightweight but extensible database access library written in C"
|
|
arch=('i686' 'x86_64')
|
|
url='https://www.linuxnetworks.de/doc/index.php/OpenDBX'
|
|
license=('LGPL-2.1')
|
|
depends=('postgresql-libs' 'sqlite')
|
|
makedepends=('quilt')
|
|
source=("https://linuxnetworks.de/opendbx/download/${pkgname}-${pkgver}.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/libo/libopendbx/libopendbx_${_debver}-${_debrel}.debian.tar.xz")
|
|
sha512sums=('dd6d53d29157057dbf4e273fd82c7694e8bc626d3409d6ab9c25627a0fec96418326550fa8004b5341facdc4cd8aae12516224e8bb84e2562482885780ff0e55'
|
|
'65c76ead971a3276bf3f1e3c197b3337073d66278bbb283373fd3d34a35e4e9d4435ebb3e8ea52fde6f3d0664f8e437969014e24901bbde5a9e0f59c15150de7')
|
|
|
|
prepare() {
|
|
cd "${pkgname}-${pkgver}"
|
|
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
rm -rf ./debian
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
cd "${pkgname}-${pkgver}"
|
|
CPPFLAGS=${CPPFLAGS}" -I/usr/include/mysql"\
|
|
./configure \
|
|
--with-backends="pgsql sqlite3" \
|
|
--prefix=/usr
|
|
make all
|
|
}
|
|
|
|
package() {
|
|
cd "${pkgname}-${pkgver}"
|
|
make DESTDIR="${pkgdir}/" install
|
|
install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|