summaryrefslogtreecommitdiff
path: root/app-misc/oddjob/oddjob-0.34.7-r1.ebuild
blob: 2436d3190716db9d5603bd4a6f9a8d31c2082a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

inherit autotools systemd

DESCRIPTION="A D-Bus service which runs odd jobs on behalf of client applications"

HOMEPAGE="https://pagure.io/oddjob"
SRC_URI="https://releases.pagure.org/oddjob/${P}.tar.gz"
LICENSE="BSD"

SLOT="0"
KEYWORDS="~amd64"
IUSE="doc examples pam selinux"

RESTRICT="test"

RDEPEND="sys-apps/dbus[selinux?]
	dev-libs/libxml2
	pam? ( sys-libs/pam )
	selinux? (
		sec-policy/selinux-oddjob
		sys-libs/libselinux
	 )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig
	doc? ( app-text/docbook-xml-dtd:4.3
		app-text/xmlto
	)"

PATCHES=(
	"${FILESDIR}/${PN}-0.34.7-build-Fix-broken-AC_ARG_ENABLE-install-logic.patch"
	"${FILESDIR}/${PN}-0.34.7-build-Keep-non-PAM-mkhomedir-parts-when-PAM-support-.patch"
	"${FILESDIR}/${PN}-0.34.7-build-Remove-with-systemd-and-with-sysvinit.patch"
	"${FILESDIR}/${PN}-0.34.7-build-Restore-conditional-with-pam-flag.patch"
	"${FILESDIR}/${PN}-0.34.7-src-oddjobd.c-Fix-non-selinux-build.patch"
)

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	 local myeconfargs=(
		--libdir=/$(get_libdir)
		$(use_with pam)
		$(use_with selinux selinux-labels)
		$(use_with selinux selinux-acls)
		$(use_enable examples sample)
		$(use_enable doc xml-docs)
		$(use_enable doc compat-dtd)
		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
	)

	econf "${myeconfargs[@]}"
}

src_install() {
	default
	rm -f "${ED}/etc/rc.d/init.d/oddjobd"
	newinitd "${FILESDIR}/oddjob.init.d" "oddjobd"

	find "${ED}" -iname \*.la -type f -delete
}