Date: Wednesday, April 26, 2023 @ 12:12:07 Author: hashworks Revision: 1448786
archrelease: copy trunk to community-x86_64 Added: imaginary/repos/community-x86_64/ imaginary/repos/community-x86_64/PKGBUILD (from rev 1448785, imaginary/trunk/PKGBUILD) imaginary/repos/community-x86_64/imaginary.service (from rev 1448785, imaginary/trunk/imaginary.service) -------------------+ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ imaginary.service | 24 ++++++++++++++++++++++++ 2 files changed, 67 insertions(+) Copied: imaginary/repos/community-x86_64/PKGBUILD (from rev 1448785, imaginary/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2023-04-26 12:12:07 UTC (rev 1448786) @@ -0,0 +1,43 @@ +# Maintainer: Justin Kromlinger <hashwo...@archlinux.org> + +pkgname='imaginary' +pkgver=1.2.4 +pkgrel=1 +pkgdesc="Fast, simple, scalable HTTP microservice for high-level image processing" +url='https://github.com/h2non/imaginary' +arch=('x86_64') +license=('MIT') +depends=('glibc' 'libvips' 'lcms2' 'openjpeg2' 'poppler-glib' 'openslide' 'libjxl') +makedepends=('go') +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/h2non/imaginary/archive/refs/tags/v${pkgver}.tar.gz" + "imaginary.service") +sha512sums=('f0848158eb0cb70b111c46c24a9ef324114608fca3f73daf97c296a7e7805890f739e9a65e7bce979204f387e528ccffb139b1deb1417b7187a567bc0cbe4c9f' + 'a561c34735bed4eca5bcd20e99e8294d7eaef85a0293ce742981eb4152b3caf7c26a1b07d6680028f82585437d2c35bfae52d4e6a161591864d0ccff78d65c39') + +prepare() { + cd ${pkgname}-${pkgver} + go mod vendor +} + +build() { + cd ${pkgname}-${pkgver} + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go build -v -o ${pkgname} \ + -ldflags "-linkmode=external -X main.Version=${pkgver}" \ + . +} + +package() { + install -Dm644 imaginary.service "${pkgdir}/usr/lib/systemd/system/imaginary.service" + cd ${pkgname}-${pkgver} + install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm755 ${pkgname} -t "${pkgdir}"/usr/bin/ +} + +# vim: ts=2 sw=2 et: Copied: imaginary/repos/community-x86_64/imaginary.service (from rev 1448785, imaginary/trunk/imaginary.service) =================================================================== --- community-x86_64/imaginary.service (rev 0) +++ community-x86_64/imaginary.service 2023-04-26 12:12:07 UTC (rev 1448786) @@ -0,0 +1,24 @@ +[Service] +ExecStart=/usr/bin/imaginary -a localhost + +DynamicUser=true + +NoNewPrivileges=true +ProtectSystem=full +ProtectKernelModules=true +ProtectKernelTunables=true +PrivateTmp=true +LockPersonality=true +ProtectHostname=true +ProtectHome=true +ProtectControlGroups=true +ProtectKernelLogs=true +PrivateDevices=true +RestrictRealtime=true +CapabilityBoundingSet= +MemoryDenyWriteExecute=true +CapabilityBoundingSet=CAP_NET_RAW +AmbientCapabilities=CAP_NET_RAW + +[Install] +WantedBy=default.target