| 1 | # Contributor: 7222e800 <[email protected]> |
| 2 | # Maintainer: 7222e800 <[email protected]> |
| 3 | pkgname=heatshrink |
| 4 | pkgver=0.4.1 |
| 5 | pkgrel=0 |
| 6 | pkgdesc="Data compression library for embedded/real-time systems" |
| 7 | url="https://github.com/atomicobject/heatshrink" |
| 8 | arch="all" |
| 9 | license="ISC" |
| 10 | makedepends="cmake samurai" |
| 11 | subpackages="$pkgname-dev" |
| 12 | _prusaslicer_ver=69c8e569410efe82259e706cd09a05ea82da9359 |
| 13 | source="https://github.com/atomicobject/heatshrink/archive/v$pkgver/heatshrink-$pkgver.tar.gz |
| 14 | CMakeLists.txt-$pkgname-$_prusaslicer_ver::https://raw.githubusercontent.com/prusa3d/PrusaSlicer/$_prusaslicer_ver/deps/%2Bheatshrink/CMakeLists.txt |
| 15 | Config.cmake.in-$pkgname-$_prusaslicer_ver::https://raw.githubusercontent.com/prusa3d/PrusaSlicer/$_prusaslicer_ver/deps/%2Bheatshrink/Config.cmake.in" |
| 16 | |
| 17 | prepare() { |
| 18 | default_prepare |
| 19 | cp "$srcdir/CMakeLists.txt-$pkgname-$_prusaslicer_ver" "$builddir/CMakeLists.txt" |
| 20 | cp "$srcdir/Config.cmake.in-$pkgname-$_prusaslicer_ver" "$builddir/Config.cmake.in" |
| 21 | } |
| 22 | |
| 23 | build() { |
| 24 | if [ "$CBUILD" != "$CHOST" ]; then |
| 25 | local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" |
| 26 | fi |
| 27 | cmake -B build \ |
| 28 | -DCMAKE_INSTALL_PREFIX=/usr \ |
| 29 | -DCMAKE_INSTALL_LIBDIR=lib \ |
| 30 | -DBUILD_SHARED_LIBS=ON \ |
| 31 | -DCMAKE_BUILD_TYPE=None \ |
| 32 | $crossopts |
| 33 | cmake --build build |
| 34 | } |
| 35 | |
| 36 | check() { |
| 37 | make test |
| 38 | } |
| 39 | |
| 40 | package() { |
| 41 | DESTDIR="$pkgdir" cmake --install build |
| 42 | install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"/ |
| 43 | } |
| 44 | |
| 45 | sha512sums=" |
| 46 | bb9610b963da0762b1ac21d0907f3801b525431abff495b66cadc244a2b2b334441de2b14442b722bfeb56cb4459fe4021eae0d0454f9e26a80e6efa11f079d2 heatshrink-0.4.1.tar.gz |
| 47 | cdf551973c575b66f21cbf896e8ef1a1c723ce78094cbc227507ba32e4e0b921c4fddf2e5d6307dcece048aba1da48b2495390f36970fa25c4c7442c2f9ac41c CMakeLists.txt-heatshrink-69c8e569410efe82259e706cd09a05ea82da9359 |
| 48 | 6950225861f373a631d0d89d136fc640bba0ef66524682a0a41c6119ceab19b0e0da292f656be08a35b14ae389d11f33cc11358c929ef66947a17f2bafd8f9f5 Config.cmake.in-heatshrink-69c8e569410efe82259e706cd09a05ea82da9359 |
| 49 | " |