Last active
January 24, 2021 22:11
-
-
Save JanMarvin/17b0c154da84d5d31b677874c188e364 to your computer and use it in GitHub Desktop.
soci PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Marcin (CTRL) Wieczorek <marcin@marcin.co> | |
# Contributor: Daniel Nagy <danielnagy at gmx de> | |
# Contributor: Mika Fischer <mika.fischer@zoopnet.de> | |
pkgname=soci | |
pkgver=4.0.1 | |
pkgrel=4 | |
pkgdesc="Database access library for C++" | |
arch=('i686' 'x86_64') | |
url="http://soci.sf.net" | |
license=('custom:boost') | |
depends=('gcc-libs') | |
makedepends=('cmake' 'postgresql-libs' 'sqlite3' 'unixodbc' 'boost') | |
optdepends=('oracle-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' | |
'libmysqlclient' | |
'boost-libs') | |
source=("http://downloads.sourceforge.net/project/soci/soci/${pkgname}-${pkgver}/${pkgname}-${pkgver}.zip") | |
sha1sums=('183ceafdc1ed064731d3ebe82770a338a204e736') | |
build() { | |
cmake -B build -S $srcdir/$pkgname-$pkgver \ | |
-DSOCI_TESTS=OFF \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCMAKE_CXX_STANDARD=11 | |
cmake --build build | |
} | |
package() { | |
DESTDIR="${pkgdir}" cmake --install build | |
# 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 | |
# https://github.com/SOCI/soci/issues/849 | |
mv $pkgdir/usr/cmake $pkgdir/usr/lib/cmake | |
install -Dm0644 "${srcdir}/${pkgname}-${pkgver}/LICENSE_1_0.txt" \ | |
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment