# Contributor: Leon Marz # Maintainer: Leon Marz pkgname=pystring pkgver=1.1.4 pkgrel=0 pkgdesc="C++ functions matching the interface and behavior of python string methods with std::string" url="https://github.com/imageworks/pystring" arch="all" license="BSD-3-Clause" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/imageworks/pystring/archive/refs/tags/v$pkgver.tar.gz pystring.pc " build() { # The repository doesn't have a good build system g++ -o libpystring.so.1.1 $CXXFLAGS $LDFLAGS -fPIC -shared -Wl,-soname,libpystring.so.1 pystring.cpp sed -i "s/@VERSION@/$pkgver/g" ../pystring.pc } check() { g++ -o test $CXXFLAGS $LDFLAGS -DPYSTRING_UNITTEST=1 pystring.cpp test.cpp ./test } package() { mkdir -p "$pkgdir/usr/lib/pkgconfig" mkdir -p "$pkgdir/usr/include" mv libpystring.so.1.1 "$pkgdir/usr/lib" ln -s "libpystring.so.1.1" "$pkgdir/usr/lib/libpystring.so.1" ln -s "libpystring.so.1" "$pkgdir/usr/lib/libpystring.so" mv ../pystring.pc "$pkgdir/usr/lib/pkgconfig" mv pystring.h "$pkgdir/usr/include" } sha512sums=" 9c0460fea67885492f9b0d29a9ba312d960fd5e43577cdcfd47faf04397ff4b7e456ed68f1948b923d2f63f9922d576b93e4ca1a27376bcb6d29c683828acb01 pystring-1.1.4.tar.gz b7b37d7b6b4d1dc5f745f047082d7629fe430198d0a1dee3d00147e8c638efc41e2af831da913c221099e8a944b8263fa7a7e8e0f0cc10f0fe99a01b46674692 pystring.pc "