summaryrefslogtreecommitdiffstats
path: root/sysutils/hal/Makefile
blob: a3916305dd944581fd82d8381ddd7c332c5e3452 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# New ports collection makefile for:   HAL
# Date Created:         02 May 2006
# Whom:             Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
#   $MCom: ports/sysutils/hal/Makefile,v 1.34 2008/02/05 05:54:21 marcus Exp $
#

PORTNAME=   hal
PORTVERSION=    ${HALVERSION}.${SNAPVERSION}
CATEGORIES= sysutils
MASTER_SITES=   http://www.marcuscom.com/downloads/

MAINTAINER= gnome@FreeBSD.org
COMMENT=    Hardware Abstraction Layer for simplifying device access

LIB_DEPENDS=    polkit.2:${PORTSDIR}/sysutils/policykit \
        volume_id.0:${PORTSDIR}/devel/libvolume_id \
        ck-connector.0:${PORTSDIR}/sysutils/consolekit
RUN_DEPENDS=    ${LOCALBASE}/share/pciids/pci.ids:${PORTSDIR}/misc/pciids

USE_BZIP2=  yes
USE_GETTEXT=    yes
USE_GMAKE=  yes
USE_GNOME=  gnomehack gnometarget intlhack ltverhack
USE_AUTOTOOLS=  libtool:15
USE_LDCONFIG=   yes
USE_PYTHON= yes
CONFIGURE_ARGS= --disable-gtk-doc \
        --with-backend=freebsd \
        --disable-docbook-docs \
        --with-pci-ids=${LOCALBASE}/share/pciids \
        --disable-usb-ids \
        --without-libpci \
        --disable-usb \
        --disable-smbios \
        --disable-apm \
        --disable-pmu \
        --enable-policy-kit \
        --enable-console-kit \
        --with-socket-dir=/var/run/hald \
        --with-eject=/usr/sbin/cdcontrol \
        --with-pid-file=/var/run/hald/hald.pid \
        --localstatedir=/var
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib" \
        GTKDOC="false"

HALVERSION= 0.5.10
SNAPVERSION=    20080205

USE_RC_SUBR=    hald
USE_GNOME_SUBR= yes
DOCSDIR=    ${PREFIX}/share/doc/${PORTNAME}-${HALVERSION}
PLIST_SUB=  VERSION=${HALVERSION}

RC_FILES=   hal.conf:${PREFIX}/etc/dbus-1/system.d
PLIST_FILES=    ${PRIV_FILES:S|^|%%DATADIR%%/dist/|}

SUB_FILES=  pkg-install pkg-deinstall
SUB_LIST=   RC_FILES="${RC_FILES}"

MAN1=       hal-disable-polling.1 hal-find-by-capability.1 \
        hal-find-by-property.1 hal-get-property.1 \
        hal-is-caller-locked-out.1 hal-is-caller-privileged.1 \
        hal-lock.1 hal-set-property.1 lshal.1
MAN8=       hald.8

OPTIONS=    FIXED_MOUNTPOINTS "use fixed mountpoints" off

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 505000
IGNORE= not supported on FreeBSD prior to 5.5-RELEASE
.endif

.if (${ARCH}=="i386" || ${ARCH}=="amd64" || ${ARCH}=="ia64")
RUN_DEPENDS+=   dmidecode:${PORTSDIR}/sysutils/dmidecode
.endif

.if ${OSVERSION} <= 601100
NEEDS_MEDIA=    yes
PLIST_SUB+= MEDIA=""
.else
PLIST_SUB+= MEDIA="@comment "
.endif

.if defined(WITH_FIXED_MOUNTPOINTS)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-tools_hal-storage-mount.c
.endif

post-patch:
    @${REINPLACE_CMD} -e '/^scriptdir = /s|libdir|libexecdir|' \
        ${WRKSRC}/tools/Makefile.in \
        ${WRKSRC}/tools/freebsd/Makefile.in
    @${REINPLACE_CMD} -e 's|[(]libdir[)]/hal/scripts|(libexecdir)/hal/scripts|' \
        ${WRKSRC}/hald/Makefile.in
    @${REINPLACE_CMD} -e 's|user="0"|group="operator"|g' \
        ${WRKSRC}/hal.conf.in

post-install:
    ${MKDIR} ${DATADIR}/dist
    ${INSTALL_DATA} ${WRKSRC}/hal.conf ${DATADIR}/dist
    @${SETENV} PKG_PREFIX=${PREFIX} PACKAGE_BUILDING=${PACKAGE_BUILDING} \
        ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !defined(PACKAGE_BUILDING) && defined(NEEDS_MEDIA)
    ${MKDIR} /media
.endif
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/hald/freebsd/README \
        ${DOCSDIR}/README.freebsd
.endif

.include <bsd.port.post.mk>