aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/packagekit/Makefile
blob: 35e24c67ebc6166f3b6168c243f8e860bdd5ab7e (plain) (blame)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Created by: Anders F Bjorklund <afb@users.sourceforge.net>
#   $MCom: ports/ports-mgmt/packagekit/Makefile,v 1.26 2010/10/10 15:49:51 marcus Exp $

PORTNAME=	PackageKit
PORTVERSION=	0.6.11
PORTREVISION?=	9
CATEGORIES=	ports-mgmt sysutils
MASTER_SITES=	http://www.packagekit.org/releases/

MAINTAINER=	gnome@FreeBSD.org
COMMENT?=	DBUS packaging abstraction layer

BUILD_DEPENDS=	${LOCALBASE}/bin/docbook2man:textproc/docbook-utils
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
		libpolkit-gobject-1.so:sysutils/polkit \
		libck-connector.so:sysutils/consolekit2
RUN_DEPENDS=	lsof:sysutils/lsof \
		bash:shells/bash

IGNORE=		does not build with new polkit

USES=		cpe gettext gmake gnome iconv libtool pathfix pkgconfig \
		python:build shared-mime-info shebangfix sqlite:3
CPE_VENDOR=	packagekit_project
SHEBANG_FILES=	backends/test/helpers/search-name.sh \
		contrib/cron/packagekit-background.cron
USE_GNOME=	glib20 intltool introspection
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
LIBS+=		-lexecinfo
CONFIGURE_ARGS+=--with-security-framework=polkit \
		--localstatedir=/var \
		--disable-static \
		--disable-gtk-doc \
		--disable-managed \
		--disable-browser-plugin \
		--disable-gstreamer-plugin \
		--disable-networkmanager \
		--disable-connman
INSTALL_TARGET=	install-strip

MAKE_JOBS_UNSAFE=yes

.if !defined(SLAVEPORT)
OPTIONS_DEFINE=	PORTS MANPAGES
OPTIONS_DEFAULT=PORTS
PORTS_DESC=Use portupgrade for management, dummy if disabled

.include <bsd.port.options.mk>

. if ${PORT_OPTIONS:MMANPAGES}
BUILD_DEPENDS+=	docbook-sgml>0:textproc/docbook-sgml \
		xsltproc:textproc/libxslt \
		${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl
PLIST_SUB+=	MAN=''
. else
CONFIGURE_ARGS+=--disable-man-pages
PLIST_SUB+=	MAN='@comment '
. endif

. if ${PORT_OPTIONS:MPORTS}
RUN_DEPENDS+=	${LOCALBASE}/sbin/portupgrade:ports-mgmt/portupgrade
USE_RUBY=	yes
CONFIGURE_ARGS+=--enable-ports --with-default-backend=ports
PLIST_SUB+=	PORTS=""
. else
CONFIGURE_ARGS+=--disable-ports --with-default-backend=dummy
PLIST_SUB+=	PORTS="@comment "
. endif

CONFIGURE_ARGS+=--disable-gtk-module
PLIST_SUB+=	GTK="@comment "

CONFIGURE_ARGS+=--disable-qt
.endif

post-patch:
	@${REINPLACE_CMD} -E -e 's/.*WARNINGFLAGS_CPP.*-Werror/#$$&/' \
		-e 's|-DG_DISABLE_DEPRECATED||g' \
		-e 's|-Wmissing-include-dirs||g' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
		${WRKSRC}/src/pk-lsof.c
	@${REINPLACE_CMD} -e 's|girepositry|girepository|g' \
		${WRKSRC}/lib/packagekit-glib2/Makefile.in
	@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \
		'/xsltproc/s|.xsl [$$]? &> /dev|.xsl $$? > /dev|g'

post-install:
.if !defined(SLAVEPORT)
	@${INSTALL_DATA} ${WRKSRC}/data/transactions.db \
		${STAGEDIR}${PREFIX}/share/PackageKit/transactions.db
.endif

.include <bsd.port.mk>