summaryrefslogtreecommitdiff
path: root/security/policykit/Makefile
blob: 2b0c4879e2c96e819aea6b4301b194d47a272f22 (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
67
68
69
70
71
72
73
74
75
76
77
# $NetBSD: Makefile,v 1.12 2009/07/22 09:01:45 wiz Exp $
#

POLICYKIT_VER=		0.9
DISTNAME=		PolicyKit-${POLICYKIT_VER}
PKGNAME=		policykit-${POLICYKIT_VER}
PKGREVISION=		4
CATEGORIES=		security
MASTER_SITES=		http://hal.freedesktop.org/releases/

MAINTAINER=		netbsd-desktop@NetBSD.org
HOMEPAGE=		http://hal.freedesktop.org/
COMMENT=		Framework for managing admin policies and privileges

PKG_DESTDIR_SUPPORT=	user-destdir
BUILD_DEPENDS+=		libxslt-[0-9]*:../../textproc/libxslt
BUILD_DEPENDS+=		docbook-xsl-[0-9]*:../../textproc/docbook-xsl

PKG_SYSCONFSUBDIR=	PolicyKit

EGDIR=		${PREFIX}/share/examples/policykit
CONF_FILES+=	${EGDIR}/PolicyKit.conf ${PKG_SYSCONFDIR}/PolicyKit.conf
CONF_FILES+=	${EGDIR}/org.freedesktop.PolicyKit.conf ${PKG_SYSCONFBASE}/dbus-1/system.d/org.freedesktop.PolicyKit.conf
#CONF_FILES+=	${EGDIR}/polkit ${PKG_SYSCONFBASE}/pam.d/polkit
#CONF_FILES+=	${EGDIR}/polkit-bash-completion.sh ${PKG_SYSCONFDIR}/profile.d/polkit-bash-completion.sh

BUILD_DEFS+=		VARBASE
BUILD_DEFS+=		PKG_SYSCONFBASE

GNU_CONFIGURE=		YES
USE_PKGLOCALEDIR=	YES
USE_TOOLS+=		gmake intltool msgfmt perl pkg-config autoconf
USE_LIBTOOL=		YES

USE_LANGUAGES=		c99

AUTOCONF_REQD=		2.59

POLICYKIT_USER?=	polkit
POLICYKIT_GROUP?=	polkit
PKG_GROUPS=		${POLICYKIT_GROUP}
PKG_USERS=		${POLICYKIT_USER}:${POLICYKIT_GROUP}
PKG_GROUPS_VARS+=	POLICYKIT_GROUP
PKG_USERS_VARS+=	POLICYKIT_USER

CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFBASE:Q}
CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
CONFIGURE_ARGS+=	--with-polkit-user=${POLICYKIT_USER}
CONFIGURE_ARGS+=	--with-polkit-group=${POLICYKIT_GROUP}

OWN_DIRS_PERMS+=	${VARBASE}/lib/PolicyKit \
				${ROOT_USER} ${POLICYKIT_GROUP} 0770
OWN_DIRS_PERMS+=	${VARBASE}/lib/PolicyKit-public \
				${POLICYKIT_USER} ${ROOT_GROUP} 0755
OWN_DIRS_PERMS+=	${VARBASE}/lib/misc ${ROOT_USER} ${ROOT_GROUP} 0755
CONF_FILES_PERMS+=	/dev/null ${VARBASE}/lib/misc/PolicyKit.reload \
				${POLICYKIT_USER} ${POLICYKIT_GROUP} 0664

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly"
post-install:
	${INSTALL_DATA} ${FILESDIR}/PolicyKit.conf.NetBSD ${DESTDIR}${EGDIR}/PolicyKit.conf
.endif

BUILDLINK_TRANSFORM+=	rm:-Wl,--as-needed

pre-configure:
	cd ${WRKSRC} && autoconf

.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../textproc/xmlcatmgr/buildlink3.mk"
.include "../../sysutils/dbus/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../mk/pam.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"