# Maintainer: Deposite Pirate # # Upstream: https://git.metalpunks.info/arch-ports _pkgname=geomyidae pkgname=${_pkgname}-git pkgver=0.293.1c649c8 pkgrel=1 pkgdesc="A gopher server daemon" arch=('i686' 'x86_64') url="http://r-36.net/scm/geomyidae" license=('MIT') depends=('libressl') makedepends=('git') conflicts=('geomyidae') provides=('geomyidae') backup=("etc/conf.d/${_pkgname}") source=("git://r-36.net/${_pkgname}" 'service' 'confd' 'sysusers' 'geomyidae-chroot.patch' 'geomyidae-journald.patch' 'geomyidae-libressl.patch') sha256sums=('SKIP' '484c45b6fd6534e959d7d1786ebada94f96e772060702cb3002dc7664fc33f91' 'd8a791643036d8cfccd7ffd64df7a99f2da5a3b3306d32b59a625c0285c1b9a1' '816de9b6211254663c0e2bbce039f869b1efc4b8fdce8bd4fdb676e8a722cce4' '813ca5000327453e91259119805474e78d0d31e81404a823cf47171cca1cb76f' 'caa4378e7b64790d0eeb77682749e81684124065bac826f4b0905c7905bcded5' '19605684acf29fd058663850b15ae81da82a950e238448cb99cf0a1ac0c11d30') pkgver() { cd "${_pkgname}" echo "0.$(git rev-list --count HEAD).$(git describe --always)" } prepare() { cd "${_pkgname}" # Fix libressl paths patch -p1 -i ../geomyidae-libressl.patch # Fix chroot patch -p1 -i ../geomyidae-chroot.patch # Log with systemd-journald patch -p1 -i ../geomyidae-journald.patch # Arch Linux uses /srv sed -i 's|/var/gopher|/srv/gopher|g' geomyidae.8 main.c # Install to /usr sed -i 's|/usr/local|/usr|g' Makefile # No /usr/sbin on Arch sed -i 's|BINDIR = ${PREFIX}/sbin|BINDIR = ${PREFIX}/bin|g' Makefile } build() { cd "${_pkgname}" make CFLAGS="${CFLAGS}" } package() { cd "${_pkgname}" make install DESTDIR="${pkgdir}" install -dm755 "${pkgdir}/srv/gopher" install -Dm644 "${srcdir}/confd" \ "${pkgdir}/etc/conf.d/${_pkgname}" install -Dm644 "${srcdir}/service" \ "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service" install -Dm644 "${srcdir}/sysusers" \ "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf" install -Dm644 LICENSE \ "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" install -dm755 "${pkgdir}/usr/share/doc/${_pkgname}" install -m644 README CGI.md LINKS index.gph \ "${pkgdir}/usr/share/doc/${_pkgname}/" install -dm755 "${pkgdir}"/usr/share/vim/vimfiles/{ftdetect,syntax} install -m644 gph/vim/ftdetect/gph.vim \ "${pkgdir}/usr/share/vim/vimfiles/ftdetect" install -m644 gph/vim/syntax/gph.vim \ "${pkgdir}/usr/share/vim/vimfiles/syntax" }