summaryrefslogtreecommitdiff
path: root/audio/realplayer/Makefile
blob: b26734437fddfd75d5f50dba66e59aea6e47b9c4 (plain)
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
# $NetBSD: Makefile,v 1.11 2002/08/09 13:07:06 wiz Exp $

DISTNAME=		rp8_linux20_libc6_i386_cs2
PKGNAME=		realplayer-8.0.1
WRKSRC=			${WRKDIR}/RealPlayer8
CATEGORIES=		audio
MASTER_SITES=		# empty
EXTRACT_SUFX=		.bin

MAINTAINER=		packages@netbsd.org
HOMEPAGE=		http://www.real.com/products/player/
COMMENT=		RealAudio and RealVideo player

DEPENDS+=		suse_x11>=6.1:../../emulators/${SUSE_DIR_PREFIX}_x11

RESTRICTED=		"Redistribution not permitted"
NO_SRC_ON_FTP=		${RESTRICTED}
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}

ONLY_FOR_PLATFORM=	NetBSD-*-i386

CRYPTO=			# defined
INTERACTIVE_STAGE=	fetch extract
CHECK_SHLIBS=		NO

XAUTHORITY?=		${HOME}/.Xauthority
.if exists(${XAUTHORITY})
EXTRACT_CMD=		HOME=${WRKDIR} XAUTHORITY=${XAUTHORITY} ${RP_INSTALLER}
.else
EXTRACT_CMD=		HOME=${WRKDIR} ${RP_INSTALLER}
.endif

DOWNLOAD=		http://proforma.real.com/real/player/unix/unix.html
RP_INSTALLER=		${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}
REALPLAYER_HOME=	${PREFIX}/lib/RealPlayer8
NS_PLUGINS_DIR=		${PREFIX}/lib/netscape/plugins
MESSAGE_SUBST+=		REALPLAYER_HOME=${REALPLAYER_HOME}

_FETCH_MESSAGE= \
	    ${ECHO} "==============================================================="; \
	    ${ECHO} "  RealPlayer 8 for Linux 2.x (libc6 i386, Self-Extracting) must"; \
	    ${ECHO} "  be fetched into ${DISTDIR} from"; \
	    ${ECHO} "  ${DOWNLOAD}."; \
	    ${ECHO} "==============================================================="

pre-extract:
	@delay=15;							\
	${SED}	-e "s|@WRKSRC@|${WRKSRC}|g"				\
		-e "s|@delay@|$${delay}|g"				\
		${FILESDIR}/extract_instructions;			\
	sleep $${delay}
	@if [ ! -x ${RP_INSTALLER} ]; then				\
		${CHMOD} +x ${RP_INSTALLER};				\
	fi

do-build:
	cd ${WRKSRC};							\
		${MV} -f mimeinstall.sh mimeinstall.sh.old;		\
		${SED}	-e "s,@PREFIX@,${PREFIX},g"			\
			-e "s,@REALPLAYER_HOME@,${REALPLAYER_HOME},g"	\
			mimeinstall.sh.old > mimeinstall.sh;		\
		${CHMOD} +x mimeinstall.sh
	${SED}	-e "s,@REALPLAYER_HOME@,${REALPLAYER_HOME},g"		\
		${FILESDIR}/realplay.sh > ${WRKDIR}/realplay.sh

pre-install:
	${FIND} ${WRKSRC} \( -name "*.orig" -o -name "*.old" \) -print	\
		| ${XARGS} ${RM}

do-install:
	${INSTALL_SCRIPT} ${WRKDIR}/realplay.sh ${PREFIX}/bin/realplay
	cd ${WRKDIR}; ${PAX} -rw RealPlayer8 ${PREFIX}/lib

post-install:
	${INSTALL_DATA_DIR} ${NS_PLUGINS_DIR}
	${INSTALL_DATA} ${REALPLAYER_HOME}/raclass.zip ${NS_PLUGINS_DIR}
	${INSTALL_DATA} ${REALPLAYER_HOME}/rpnp.so ${NS_PLUGINS_DIR}

.include "../../emulators/suse_linux/Makefile.application"