net-im/matterircd: New package
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
8fb7d5eb02
commit
9d430df08a
1
net-im/matterircd/Manifest
Normal file
1
net-im/matterircd/Manifest
Normal file
|
@ -0,0 +1 @@
|
|||
DIST matterircd-0.20.0.tar.gz 2575792 BLAKE2B f079a2dd3a756835589161e9b20d47c6b01f4bd815679e5a32b98804a5d80990c35eb952b8e1a5c3fee09d55c1be337a9ca3de5b16f4e116a04c1acec8114b1b SHA512 17fd5d9ccf3e2fb04ccbf82f0816e6a5e7217ab3e940a88a4518fae71e3a81081ebab7e611b3e4916d9daddbe0993ea717eb84deca9d6da1ea6cbb8b93c6ef8c
|
11
net-im/matterircd/files/matterircd.confd
Normal file
11
net-im/matterircd/files/matterircd.confd
Normal file
|
@ -0,0 +1,11 @@
|
|||
# config file for /etc/init.d/matterircd
|
||||
|
||||
MATTERIRCD_LOGDIR="/var/log/matterircd"
|
||||
MATTERIRCD_CONFIG="/etc/matterircd/matterircd.toml"
|
||||
|
||||
# Additional options (avoid -config use the variable above)
|
||||
MATTERIRCD_OPTS=""
|
||||
|
||||
# Logging
|
||||
#output_log="${MATTERIRCD_LOGDIR}/matterircd.log"
|
||||
#error_log="${MATTERIRCD_LOGDIR}/error.log"
|
23
net-im/matterircd/files/matterircd.initd
Normal file
23
net-im/matterircd/files/matterircd.initd
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
output_log="${output_log:-/dev/null}"
|
||||
error_log="${error_log:-${MATTERIRCD_LOGDIR}/error.log}"
|
||||
|
||||
command="/usr/bin/matterircd"
|
||||
command_args="-config ${MATTERIRCD_CONFIG} ${MATTERIRCD_OPTS}"
|
||||
command_background=true
|
||||
command_user="${command_user:-matterircd:matterircd}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
required_files="${MATTERIRCD_CONFIG}"
|
||||
retry="${retry:-TERM/30/KILL/5}"
|
||||
start_stop_daemon_args="${SSD_OPTS}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0750 -o "${command_user}" "${MATTERIRCD_LOGDIR}"
|
||||
}
|
64
net-im/matterircd/matterircd-0.20.0.ebuild
Normal file
64
net-im/matterircd/matterircd-0.20.0.ebuild
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
EGO_PN="github.com/42wim/${PN}"
|
||||
|
||||
inherit golang-build golang-vcs-snapshot user
|
||||
|
||||
DESCRIPTION="Connect to your Mattermost or Slack using your IRC-client of choice"
|
||||
HOMEPAGE="https://github.com/42wim/matterircd"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug pie static"
|
||||
|
||||
DOCS=( README.md )
|
||||
QA_PRESTRIPPED="usr/bin/.*"
|
||||
|
||||
G="${WORKDIR}/${P}"
|
||||
S="${G}/src/${EGO_PN}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup matterircd
|
||||
enewuser matterircd -1 -1 -1 matterircd
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export GOPATH="${G}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
(use static && ! use pie) && export CGO_ENABLED=0
|
||||
(use static && use pie) && CGO_LDFLAGS+=" -static"
|
||||
|
||||
local mygoargs=(
|
||||
-v -work -x
|
||||
-buildmode "$(usex pie pie exe)"
|
||||
-asmflags "all=-trimpath=${S}"
|
||||
-gcflags "all=-trimpath=${S}"
|
||||
-ldflags "$(usex !debug '-s -w' '')"
|
||||
-tags "$(usex static 'netgo' '')"
|
||||
-installsuffix "$(usex static 'netgo' '')"
|
||||
)
|
||||
|
||||
go build "${mygoargs[@]}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin matterircd
|
||||
use debug && dostrip -x /usr/bin/matterircd
|
||||
einstalldocs
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||
|
||||
insinto /etc/matterircd
|
||||
doins matterircd.toml.example
|
||||
|
||||
diropts -o matterircd -g matterircd -m 0750
|
||||
keepdir /var/log/matterircd
|
||||
}
|
8
net-im/matterircd/metadata.xml
Normal file
8
net-im/matterircd/metadata.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>alarig@swordarmor.fr</email>
|
||||
<name>Alarig Le Lay</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
Loading…
Reference in a new issue