Lines 1-101
Link Here
|
1 |
# Created by: alepulver |
|
|
2 |
# $FreeBSD$ |
3 |
|
4 |
PORTNAME= xrdp |
5 |
PORTVERSION= 0.9.3 |
6 |
DISTVERSIONPREFIX= v |
7 |
PORTEPOCH= 1 |
8 |
CATEGORIES= net |
9 |
PKGNAMESUFFIX= -devel |
10 |
DIST_SUBDIR?= ${PORTNAME} |
11 |
|
12 |
MAINTAINER= meta+ports@vmeta.jp |
13 |
COMMENT= Open source Remote Desktop Protocol (RDP) server |
14 |
|
15 |
LICENSE= APACHE20 |
16 |
LICENSE_FILE= ${WRKSRC}/COPYING |
17 |
|
18 |
# pulseaudio's built source is required for audio redirection |
19 |
BUILD_DEPENDS= ${NONEXISTENT}:audio/pulseaudio:configure \ |
20 |
${LOCALBASE}/bin/nasm:devel/nasm |
21 |
RUN_DEPENDS= ${LOCALBASE}/lib/xorg/modules/libxorgxrdp.so:x11-drivers/xorgxrdp |
22 |
|
23 |
USES= autoreconf:build jpeg libtool pkgconfig ssl |
24 |
USE_XORG= ice pixman sm x11 xfixes xrandr |
25 |
GNU_CONFIGURE= yes |
26 |
USE_LDCONFIG= ${PREFIX}/lib/xrdp |
27 |
USE_GITHUB= yes |
28 |
GH_ACCOUNT= neutrinolabs |
29 |
GH_PROJECT= xrdp librfxcodec:librfxcodec libpainter:libpainter |
30 |
GH_TAGNAME= v0.1.2:librfxcodec v0.1.1:libpainter |
31 |
|
32 |
CONFIGURE_ARGS= --localstatedir=/var --enable-strict-locations \ |
33 |
--with-pkgconfigdir=${LOCALBASE}/libdata/pkgconfig \ |
34 |
--enable-jpeg --enable-pixman --enable-rfxcodec --enable-painter |
35 |
LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} -lssl |
36 |
CFLAGS+= -I${LOCALBASE}/include -L${OPENSSLINC} |
37 |
CONFLICTS= xrdp-[0-9]* |
38 |
INSTALL_TARGET= install-strip |
39 |
SUB_FILES= pkg-install pkg-message |
40 |
SUB_LIST= OPENSSLBASE=${OPENSSLBASE} |
41 |
|
42 |
OPTIONS_DEFINE= DEBUG FUSE IPV6 MP3LAME OPUS |
43 |
OPTIONS_DEFAULT= OPUS MP3LAME |
44 |
FUSE_DESC= Enable drive redirection via FUSE (experimental) |
45 |
MP3LAME_DESC= Enable MP3 Lame for audio redirection |
46 |
OPUS_DESC= Enable Opus for audio redirection |
47 |
|
48 |
IPV6_CONFIGURE_ENABLE= ipv6 |
49 |
DEBUG_CONFIGURE_ENABLE= xrdpdebug |
50 |
FUSE_CONFIGURE_ENABLE= fuse |
51 |
FUSE_USES= fuse |
52 |
MP3LAME_CONFIGURE_ENABLE= mp3lame |
53 |
MP3LAME_LIB_DEPENDS= libmp3lame.so:audio/lame |
54 |
OPUS_CONFIGURE_ENABLE= opus |
55 |
OPUS_LIB_DEPENDS= libopus.so:audio/opus |
56 |
|
57 |
# don't forget to increase PORTREVISION after pulseaudio update |
58 |
PULSE_VERSION= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VPORTVERSION |
59 |
PULSE_WRKSRC= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VWRKSRC |
60 |
|
61 |
post-extract: |
62 |
# librfxcodec is provided as git submodule |
63 |
@${CP} -r ${WRKSRC_librfxcodec}/ ${WRKSRC}/librfxcodec/ |
64 |
@${CP} -r ${WRKSRC_libpainter}/ ${WRKSRC}/libpainter/ |
65 |
|
66 |
post-patch: |
67 |
@${REINPLACE_CMD} \ |
68 |
-e "s|^PULSE_SCRIPT=/etc/xrdp/pulse/default.pa|PULSE_SCRIPT=${PREFIX}/etc/xrdp/pulse/default.pa|" \ |
69 |
${WRKSRC}/sesman/sesman.ini |
70 |
@${REINPLACE_CMD} \ |
71 |
-e "s|^PULSE_DIR = .*|PULSE_DIR = `${PULSE_WRKSRC}`|" \ |
72 |
-e "s|-Wall -O2|-Wall -O2 -I${LOCALBASE}/include|" \ |
73 |
${WRKSRC}/sesman/chansrv/pulse/Makefile |
74 |
|
75 |
pre-configure: |
76 |
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./bootstrap |
77 |
|
78 |
post-build: |
79 |
# build pulseaudio module |
80 |
@${CP} -r "`${PULSE_WRKSRC}`" ${WRKDIR} |
81 |
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} -C sesman/chansrv/pulse |
82 |
|
83 |
post-install: |
84 |
# install pulseaudio module |
85 |
${MKDIR} "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" |
86 |
.for f in module-xrdp-sink.so module-xrdp-source.so |
87 |
${INSTALL_LIB} -m 0755 ${WRKSRC}/sesman/chansrv/pulse/$f \ |
88 |
"${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" |
89 |
.endfor |
90 |
# substitute pkg-plist not using PLIST_SUB |
91 |
${REINPLACE_CMD} -e "s|%%PULSE_VERSION%%|`${PULSE_VERSION}`|g" ${TMPPLIST} |
92 |
|
93 |
post-stage: |
94 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/rsakeys.ini |
95 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/cert.pem |
96 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/key.pem |
97 |
.for f in sesman.ini startwm.sh reconnectwm.sh xrdp.ini xrdp_keyboard.ini |
98 |
@${MV} ${STAGEDIR}${PREFIX}/etc/xrdp/$f ${STAGEDIR}${PREFIX}/etc/xrdp/$f.sample |
99 |
.endfor |
100 |
|
101 |
.include <bsd.port.mk> |