summaryrefslogtreecommitdiff
path: root/geomyidae-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'geomyidae-git/PKGBUILD')
-rw-r--r--geomyidae-git/PKGBUILD84
1 files changed, 84 insertions, 0 deletions
diff --git a/geomyidae-git/PKGBUILD b/geomyidae-git/PKGBUILD
new file mode 100644
index 0000000..d5a7cf0
--- /dev/null
+++ b/geomyidae-git/PKGBUILD
@@ -0,0 +1,84 @@
+# Maintainer: Deposite Pirate <dpirate at metalpunks dot info>
+
+_pkgname=geomyidae
+pkgname=${_pkgname}-git
+pkgver=0.195.c89bef3
+pkgrel=1
+pkgdesc="A gopher server daemon"
+arch=('i686' 'x86_64')
+url="http://r-36.net/scm/geomyidae"
+license=('MIT')
+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')
+sha256sums=('SKIP'
+ '2e26b4fce0590d68b27c0d70b7d5302ac4c14f9888d52020efc372bc327d6f6b'
+ 'd8a791643036d8cfccd7ffd64df7a99f2da5a3b3306d32b59a625c0285c1b9a1'
+ '816de9b6211254663c0e2bbce039f869b1efc4b8fdce8bd4fdb676e8a722cce4'
+ '813ca5000327453e91259119805474e78d0d31e81404a823cf47171cca1cb76f'
+ 'caa4378e7b64790d0eeb77682749e81684124065bac826f4b0905c7905bcded5')
+
+pkgver() {
+ cd "${_pkgname}"
+ echo "0.$(git rev-list --count HEAD).$(git describe --always)"
+}
+
+prepare() {
+ cd "${_pkgname}"
+
+ # 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
+
+ # Use Arch Linux standard CFLAGS
+ sed -i 's|CFLAGS = -O2 -Wall|CFLAGS = $(FLAGS)|g' Makefile
+}
+
+build() {
+ cd "${_pkgname}"
+ make FLAGS="${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 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"
+}