mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Make pointyhat happy: by changing RSA key pair generation behaviour now key
will be generated on first xrdp daemon start - Add options to select VNC variants - Build with freerdp since net/freerdp has been updated to 1.0.2 PR: ports/179542 Submitted by: Koichiro IWAO <meta+ports@vmeta.jp> (maintainer)
This commit is contained in:
parent
9b3cceeb60
commit
caac310e09
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321348
3 changed files with 35 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= xrdp
|
||||
PORTVERSION= 0.6.0
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= SF/xrdp/xrdp/${PORTVERSION}
|
||||
|
@ -24,20 +24,40 @@ USE_AUTOTOOLS= autoconf:env automake:env libtool
|
|||
GNU_CONFIGURE= yes
|
||||
USE_RC_SUBR= xrdp
|
||||
|
||||
CONFIGURE_ARGS= --localstatedir=/var
|
||||
CONFIGURE_ARGS= --localstatedir=/var --enable-freerdp1
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
CONFLICTS= xrdp-devel-[0-9]*
|
||||
BUILD_DEPENDS+= freerdp>=1.0.2:${PORTSDIR}/net/freerdp
|
||||
|
||||
USE_LDCONFIG= ${PREFIX}/lib/xrdp
|
||||
|
||||
OPTIONS_DEFINE= DEBUG GATEWAY JP106
|
||||
OPTIONS_DEFAULT= JP106
|
||||
GATEWAY_DESC= Install xrdp as RDP gateway (no VNC backend)
|
||||
OPTIONS_DEFINE= DEBUG JP106
|
||||
OPTIONS_DEFAULT= JP106 TIGERVNC
|
||||
OPTIONS_RADIO= XVNC
|
||||
OPTIONS_RADIO_XVNC= REALVNC TIGERVNC TIGHTVNC TRIDIAVNC
|
||||
REALVNC_DESC= Use RealVNC
|
||||
TIGERVNC_DESC= Use TigerVNC (recommended)
|
||||
TIGHTVNC_DESC= Use TightVNC
|
||||
TRIDIAVNC_DESC= Use TridiaVNC
|
||||
JP106_DESC= Install Japanese JP106 keymap
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
# Which Xserver to use
|
||||
.if ${PORT_OPTIONS:MREALVNC}
|
||||
RUN_DEPENDS= Xvnc:${PORTSDIR}/net/vnc
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MTIGERVNC}
|
||||
RUN_DEPENDS= Xvnc:${PORTSDIR}/net/tigervnc
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MTIGHTVNC}
|
||||
RUN_DEPENDS= Xvnc:${PORTSDIR}/net/tightvnc
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MTRIDIAVNC}
|
||||
RUN_DEPENDS= Xvnc:${PORTSDIR}/net/tridiavnc
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDEBUG}
|
||||
CONFIGURE_ARGS+= --enable-xrdpdebug
|
||||
CFLAGS+= -DXRDP_DEBUG
|
||||
|
@ -54,10 +74,6 @@ PLIST_SUB+= JP106=""
|
|||
PLIST_SUB+= JP106="@comment "
|
||||
.endif
|
||||
|
||||
.if !${PORT_OPTIONS:MGATEWAY}
|
||||
RUN_DEPENDS+= Xvnc:${PORTSDIR}/net/vnc
|
||||
.endif
|
||||
|
||||
MAN5= sesman.ini.5 xrdp.ini.5
|
||||
MAN8= xrdp-sesman.8 xrdp-sesrun.8 xrdp.8
|
||||
|
||||
|
@ -72,13 +88,11 @@ pre-configure:
|
|||
@cd ${WRKSRC} && ./bootstrap
|
||||
|
||||
post-install:
|
||||
.for f in rsakeys.ini sesman.ini startwm.sh xrdp.ini
|
||||
.for f in sesman.ini startwm.sh xrdp.ini
|
||||
@if [ ! -f ${PREFIX}/etc/xrdp/$f ]; then \
|
||||
${CP} -p ${PREFIX}/etc/xrdp/$f.sample ${PREFIX}/etc/xrdp/$f ; \
|
||||
fi
|
||||
.endfor
|
||||
@if cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini; then \
|
||||
${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini; fi
|
||||
@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -38,6 +38,11 @@ xrdp_cmd() {
|
|||
if [ "${rc_arg}" = "stop" ] ; then
|
||||
xrdp_daemons=$(reverse_list ${xrdp_daemons})
|
||||
fi
|
||||
# Generate rsakeys.ini on start
|
||||
if [ "${rc_arg}" = "start" -a ! -f %%PREFIX%%/etc/xrdp/rsakeys.ini ] ; then
|
||||
%%PREFIX%%/bin/xrdp-keygen xrdp %%PREFIX%%/etc/xrdp/rsakeys.ini
|
||||
fi
|
||||
|
||||
# Apply to all the daemons.
|
||||
for name in ${xrdp_daemons}; do
|
||||
rcvar=${name}_enable
|
||||
|
|
|
@ -33,6 +33,10 @@ lib/xrdp/libxup.a
|
|||
lib/xrdp/libxup.la
|
||||
lib/xrdp/libxup.so
|
||||
lib/xrdp/libxup.so.0
|
||||
lib/xrdp/libxrdpfreerdp1.la
|
||||
lib/xrdp/libxrdpfreerdp1.a
|
||||
lib/xrdp/libxrdpfreerdp1.so
|
||||
lib/xrdp/libxrdpfreerdp1.so.0
|
||||
etc/pam.d/xrdp-sesman
|
||||
etc/xrdp/km-0407.ini
|
||||
etc/xrdp/km-0409.ini
|
||||
|
@ -52,8 +56,6 @@ etc/xrdp/rsakeys.ini.sample
|
|||
etc/xrdp/sesman.ini.sample
|
||||
etc/xrdp/startwm.sh.sample
|
||||
etc/xrdp/xrdp.ini.sample
|
||||
@comment backup pre-compile-time keypair and generate new one
|
||||
@exec if [ -f %D/etc/xrdp/rsakeys.ini ]; then cp -a %D/etc/xrdp/rsakeys.ini %D/etc/xrdp/rsakeys.ini.bak`date +%%Y%%m%%d`; %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini; fi
|
||||
@exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini
|
||||
@exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh
|
||||
@exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini
|
||||
|
|
Loading…
Add table
Reference in a new issue