# Maintainer: Guillaume Horel # Contributor: Marcin (CTRL) Wieczorek # Contributor: Daniel Nagy # Contributor: Mika Fischer pkgname=soci pkgver=4.0.3.r0.g438e3549 pkgrel=2 pkgdesc="Database access library for C++" arch=('x86_64') url="http://soci.sf.net" license=('custom:boost') depends=('postgresql-libs' 'sqlite3' 'unixodbc' 'boost-libs' 'mariadb-libs') makedepends=('cmake' 'git' 'boost') optdepends=('instantclient-basic: support for oracle databases' 'libmysqlclient: support for mysql databases' 'postgresql-libs: support for postgresql databases' 'sqlite3: support for sqlite databases' 'unixodbc: support for ODBC databases') source=("git+https://github.com/SOCI/soci.git#branch=release/4.0") sha1sums=('SKIP') pkgver() { cd "${srcdir}/${pkgname}" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/; s/-/./g' } build() { cmake -B build "${pkgname}" \ -DSOCI_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_CXX_FLAGS="-Wno-format-overflow" \ -DSOCI_CXX11=ON \ -Wno-dev make -C build } package() { make DESTDIR="${pkgdir}" -C build install # For some reason -DLIBDIR=lib causes libsoci_empty.so to disappear if [ -e "${pkgdir}/usr/lib64" ]; then mv "${pkgdir}/usr/lib64" "${pkgdir}/usr/lib" fi install -Dm0644 "${srcdir}/${pkgname}/LICENSE_1_0.txt" \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }