You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.8 KiB
83 lines
1.8 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
9 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
9 years ago
|
|
||
6 years ago
|
inherit cmake-utils systemd user
|
||
9 years ago
|
|
||
6 years ago
|
DESCRIPTION="Server part of Taskwarrior, a command-line todo list manager"
|
||
7 years ago
|
HOMEPAGE="https://taskwarrior.org/"
|
||
|
SRC_URI="https://taskwarrior.org/download/${P}.tar.gz"
|
||
9 years ago
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
IUSE=""
|
||
|
|
||
6 years ago
|
DEPEND="
|
||
|
net-libs/gnutls:=
|
||
|
sys-apps/util-linux
|
||
|
sys-libs/readline:0="
|
||
9 years ago
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
src_configure() {
|
||
6 years ago
|
local mycmakeargs=(
|
||
9 years ago
|
-DTASKD_DOCDIR=share/doc/${PF}
|
||
|
)
|
||
|
cmake-utils_src_configure
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
cmake-utils_src_install
|
||
|
|
||
|
systemd_dounit "${S}"/scripts/systemd/taskd.service
|
||
|
|
||
|
insinto /usr/share/${PN}/pki
|
||
|
doins pki/*
|
||
|
|
||
|
insinto /usr/share/${PN}/mon
|
||
|
doins mon/*
|
||
|
|
||
|
newinitd "${FILESDIR}"/taskd.initd taskd
|
||
|
newconfd "${FILESDIR}"/taskd.confd taskd
|
||
|
|
||
6 years ago
|
grep ^TASKDDATA= "${FILESDIR}"/taskd.confd > 90taskd || die
|
||
9 years ago
|
doenvd 90taskd
|
||
|
|
||
|
dodir /etc/taskd
|
||
|
keepdir /usr/libexec/taskd
|
||
|
|
||
|
diropts -m 0750
|
||
|
dodir /var/lib/taskd
|
||
|
keepdir /var/log/taskd
|
||
|
|
||
|
diropts -m 0700
|
||
|
keepdir /var/lib/taskd/orgs /etc/taskd/tls
|
||
|
|
||
|
insopts -m0600
|
||
|
insinto /etc/taskd
|
||
|
doins "${FILESDIR}"/config
|
||
|
|
||
7 years ago
|
dosym ../../../etc/taskd/config /var/lib/taskd/config
|
||
9 years ago
|
|
||
|
insinto /etc/logrotate.d
|
||
|
newins "${FILESDIR}"/taskd.logrotate taskd
|
||
|
}
|
||
|
|
||
9 years ago
|
pkg_setup() {
|
||
9 years ago
|
enewgroup taskd
|
||
9 years ago
|
enewuser taskd -1 /bin/bash /var/lib/taskd taskd
|
||
9 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
chown taskd:taskd /var/lib/taskd{,/orgs} /var/log/taskd /etc/taskd/{config,tls}
|
||
|
|
||
6 years ago
|
elog "For configuration see 'man taskdrc' and edit /etc/taskd/config"
|
||
|
elog "You will need to configure certificates first in order to use taskd"
|
||
|
ewarn
|
||
9 years ago
|
ewarn "Do not use 'taskd init' as this will replace the config file and set"
|
||
|
ewarn "default but unsuitable paths"
|
||
6 years ago
|
ewarn
|
||
9 years ago
|
ewarn "In order to manage taskd via 'taskd' either relogin or run 'source /etc/profile'"
|
||
|
}
|