openbsd-ports/sysutils/polkit/Makefile
ajacoutot d34b61f6dd Update to polkit-0.116.
- uses mozjs-6.0
2019-04-27 08:08:42 +00:00

81 lines
2.2 KiB
Makefile

# $OpenBSD: Makefile,v 1.76 2019/04/27 08:08:42 ajacoutot Exp $
COMMENT= framework for granting privileged operations to users
DISTNAME= polkit-0.116
SHARED_LIBS += polkit-gobject-1 2.0 # .0.0
SHARED_LIBS += polkit-agent-1 2.0 # .0.0
CATEGORIES= sysutils security
HOMEPAGE= http://www.freedesktop.org/wiki/Software/polkit
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += ${COMPILER_LIBCXX} c expat ffi gio-2.0 glib-2.0 gmodule-2.0
WANTLIB += gobject-2.0 iconv intl m mozjs-60 pcre z
MASTER_SITES= http://www.freedesktop.org/software/polkit/releases/
# C++11
COMPILER= base-clang ports-gcc
MODULES= lang/python \
textproc/intltool
BUILD_DEPENDS= devel/gobject-introspection
# man pages
BUILD_DEPENDS+= textproc/docbook-xsl
LIB_DEPENDS= devel/glib2 \
devel/spidermonkey60
# /usr/local/share/dbus-1/system-services/
RUN_DEPENDS += x11/dbus,-suid
# org.freedesktop.ConsoleKit
# XXX cyclic dependency: consolekit -> polkit -> consolekit
#RUN_DEPENDS += sysutils/consolekit
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --disable-libelogind \
--disable-libsystemd-login \
--with-os-type=openbsd \
--with-authfw=bsdauth \
--with-polkitd-user=_polkitd
# fgetgrent, fgetpwent
CONFIGURE_ARGS += --disable-test
MODPY_BUILDDEP= No
MODPY_RUNDEP= No
USE_GMAKE= Yes
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/polkit
pre-configure:
perl -pi \
-e "s,/usr/bin/pkexec,${PREFIX}/bin/pkexec,g;" \
-e "s,/usr/bin/python,${MODPY_BIN},g;" \
-e "s,/usr/bin/my-pk-test,${PREFIX}/bin/my-pk-test,g;" \
-e "s,/usr/share/polkit-1,${PREFIX}/share/polkit-1,g;" \
-e "s,/etc/polkit-1,${SYSCONFDIR}/polkit-1,g;" \
-e "s,/usr/bin/bash,${LOCALBASE}/bin/bash,g;" \
-e "s,/usr/bin/cat,/bin/cat,g;" \
-e "s,/usr/bin/pk-example-frobnicate,${PREFIX}/bin/pk-example,g;" \
-e "s,>/etc<,>${SYSCONFDIR}<,g;" \
-e "s,>/usr<,>${PREFIX}<,g" \
${WRKSRC}/docs/man/pkexec.xml \
${WRKSRC}/docs/man/polkit.xml \
${WRKSRC}/docs/extensiondir.xml \
${WRKSRC}/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
.include <bsd.port.mk>