~alpine/aports

testing/dictd: new aport v3 NEEDS REVISION

Ngô Ngọc Đức Huy
Ngô Ngọc Đức Huy: 1
 testing/dictd: new aport

 4 files changed, 86 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/3505/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH v3] testing/dictd: new aport Export this patch

Ngô Ngọc Đức Huy
Sorry for multiple patches at a time -- I'm a bit messy.  I forgot to
update the checksum in the last patch.

https://sourceforge.net/projects/dict/
Client/server software and tools supporting DICT protocol (RFC 2229)
---
 testing/dictd/APKBUILD     | 33 +++++++++++++++++++++++++++++++++
 testing/dictd/colorit.conf | 32 ++++++++++++++++++++++++++++++++
 testing/dictd/dict.conf    |  6 ++++++
 testing/dictd/dictd.conf   | 15 +++++++++++++++
 4 files changed, 86 insertions(+)
 create mode 100644 testing/dictd/APKBUILD
 create mode 100644 testing/dictd/colorit.conf
 create mode 100644 testing/dictd/dict.conf
 create mode 100644 testing/dictd/dictd.conf

diff --git a/testing/dictd/APKBUILD b/testing/dictd/APKBUILD
new file mode 100644
index 0000000000..6dd1d6f405
--- /dev/null
+++ b/testing/dictd/APKBUILD
@@ -0,0 +1,33 @@
# Maintainer: Ngô Ngọc Đức Huy <huyngo@disroot.org>
pkgname=dictd
pkgver=1.13.0
pkgrel=2
pkgdesc="Client/server software and tools for the DICT protocol (RFC 2229)"
url="http://sourceforge.net/projects/dict/"
arch="all"
license="GPL-2.0-only"
makedepends="zlib-dev libmaa-dev libtool byacc flex"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/dict/dictd-$pkgver.tar.gz
	dictd.conf
	dict.conf
	colorit.conf"
options="libtool"

build() {
	./configure --prefix=/usr --sysconfdir=/etc/dict --sbindir=/usr/bin
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 $srcdir/dictd.conf "$pkgdir"/etc/dictd.conf
	install -Dm644 $srcdir/dict.conf "$pkgdir"/etc/dict.conf
	install -Dm644 $srcdir/colorit.conf "$pkgdir"/etc/dict.conf
}
sha512sums="
86871aaf34a182d1d7aac1a1282d4a75f2d7c112c762e92f303924c324f665dae75c51e7ca91e3cc1dde2053ad8e2d1fd50a76934a5f84ff70975aa858e26439  dictd-1.13.0.tar.gz
c59667c81e1e15e7af5ef175642ba78a96e9cac47dcc2a00d1be1ed5c2e83350deb0bc514966749e8ed7a73f03266d8b57e81581b3a21a91514eb54f6b731a1c  dictd.conf
22fbfd3bf8c4f88801aab848e160f46bf17757086ffe8fe7a4cdb78f983e88f6c923cac8714f78d31ab311957aa860731f663324b742febd0a5039085672aeb5  dict.conf
5df19904f25f482b4b4c90c26279ba8e8747ecf6a0f0045e456613891bc8447f1ee150d51ab3f36a5f8f8f967a07169dbfda2a6743abb842f6ed1d3fd7f88411  colorit.conf
"
diff --git a/testing/dictd/colorit.conf b/testing/dictd/colorit.conf
new file mode 100644
index 0000000000..8355dae158
--- /dev/null
+++ b/testing/dictd/colorit.conf
@@ -0,0 +1,32 @@
dnl /etc/dictd/colorit.conf   vim:ft=m4
dnl
dnl Sample configuration file for colorit(1) program
dnl
divert(-1)
dnl
dnl Define some useful color variables
dnl
define(`black',   `0')
define(`red',     `1')
define(`green',   `2')
define(`brown',   `3')
define(`blue',    `4')
define(`magenta', `5')
define(`cyan',    `6')
define(`white',   `7')
dnl
dnl Mark macro arguments: regexp foreground-color [background-color]
dnl
define(`mark', ``mark "$1"''  `ifelse(`$#', `3', ``"\033[3$2;4$3m"'', ``"\033[3$2m"'')' `"\033[m"')
dnl
divert
mark(`^From.*$',red,cyan)
mark(`^  [^ ]+',green)
mark(`^ *Note:',red)
mark(`{[^{]+}',green)
mark(`^ *\[[^\[]+\]', cyan)
mark(`^[    ]*(adj|n|v|adv)? *[0-9]+[\.:]',cyan)
mark(`^ *\([a-z]+\)',cyan)
mark(`(Syn|Ant|syn|ant):', blue, white)
mark(` (t|i|a|adj|adv|n|v)\. ',cyan)
mark(` (t|i|a|adj|adv|n|v)\.$',cyan)
diff --git a/testing/dictd/dict.conf b/testing/dictd/dict.conf
new file mode 100644
index 0000000000..e06c3d296e
--- /dev/null
+++ b/testing/dictd/dict.conf
@@ -0,0 +1,6 @@
# This is the configuration file for dict.
# Usually all you will ever need here is the server keywords.
# Refer to the dict manpage for other options.
# It will only check the second server if the first fails
server localhost
server dict.org
diff --git a/testing/dictd/dictd.conf b/testing/dictd/dictd.conf
new file mode 100644
index 0000000000..08b250e358
--- /dev/null
+++ b/testing/dictd/dictd.conf
@@ -0,0 +1,15 @@
# dictd configuration file.
# whipped up by michael conrad tilstra <michael@gentoo.org>

# Informational message

global {
    site site.info
}

# who's allowed.  You might want to change this.
access {
  allow *
}

# List your dictionary databases below.
-- 
2.31.1
Ngô Ngọc Đức Huy
A few hours after this I realized I didn't link the config files
correctly *facepalm*.  Also, it looks like the config files should be
somewhere else by default, rather than at /etc, since dict can't detect
/etc/dict.conf

Also, I need to work with the init system to start dictd daemon as well.
This patch is in no way ready for review.