1 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
6 pkgdesc="Fast, simple, scalable HTTP microservice for high-level image processing"
7 url='https://github.com/h2non/imaginary'
10 depends=('glibc' 'libvips' 'lcms2' 'openjpeg2' 'poppler-glib' 'openslide' 'libjxl')
13 "${pkgname}-${pkgver}.tar.gz::https://github.com/h2non/imaginary/archive/refs/tags/v${pkgver}.tar.gz"
15 sha512sums=('f0848158eb0cb70b111c46c24a9ef324114608fca3f73daf97c296a7e7805890f739e9a65e7bce979204f387e528ccffb139b1deb1417b7187a567bc0cbe4c9f'
16 'a561c34735bed4eca5bcd20e99e8294d7eaef85a0293ce742981eb4152b3caf7c26a1b07d6680028f82585437d2c35bfae52d4e6a161591864d0ccff78d65c39')
19 cd ${pkgname}-${pkgver}
24 cd ${pkgname}-${pkgver}
25 export CGO_CPPFLAGS="${CPPFLAGS}"
26 export CGO_CFLAGS="${CFLAGS}"
27 export CGO_CXXFLAGS="${CXXFLAGS}"
28 export CGO_LDFLAGS="${LDFLAGS}"
29 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
30 go build -v -o ${pkgname} \
31 -ldflags "-linkmode=external -X main.Version=${pkgver}" \
36 install -Dm644 imaginary.service "${pkgdir}/usr/lib/systemd/system/imaginary.service"
37 cd ${pkgname}-${pkgver}
38 install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md"
39 install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
40 install -Dm755 ${pkgname} -t "${pkgdir}"/usr/bin/