summaryrefslogtreecommitdiff
path: root/www/opera/Makefile
blob: c7e2671a3ac5f753683ffc567cbc0d8266e709e9 (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
# $NetBSD: Makefile,v 1.91 2011/01/28 09:33:35 ahoka Exp $
#

DISTNAME=	opera-${OPERA_VERSION}-${OPERA_BUILD}.i386
PKGNAME=	${DISTNAME:S/-${OPERA_BUILD}.i386//}
CATEGORIES=	www
MASTER_SITES=	ftp://ftp.opera.com/pub/opera/linux/${OPERA_VERSION:S/.//}/
EXTRACT_SUFX=	.rpm

MAINTAINER=	ahoka@NetBSD.org
HOMEPAGE=	http://www.opera.com/
COMMENT=	Opera web browser
LICENSE=	opera-eula

ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-x86_64
EMUL_PLATFORMS+=        linux-i386

OPERA_VERSION=		11.01
OPERA_BUILD=		1190

# TODO: add gstreamer
EMUL_MODULES.linux=     x11 fontconfig
EMUL_REQD=              suse>=10.0

EMUL_PKG_FMT=           rpm
RPM2PKG_PREFIX=         ${DESTDIR}${PREFIX}
RPM2PKG_SUBPREFIX=      ${EMULSUBDIR}
RPM2PKG_STAGE=          do-install

PKG_DESTDIR_SUPPORT=	user-destdir

#.include "../../mk/bsd.prefs.mk"

WRKSRC=			${WRKDIR}
BUILD_DIRS=		# empty
USE_LANGUAGES=		# none

SUBST_CLASSES+=		opera-sh
SUBST_STAGE.opera-sh=	post-build
SUBST_FILES.opera-sh=	opera.sh
SUBST_VARS.opera-sh=	EMULDIR SH

INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1

PLIST_SUBST+=		OPERA_VER_DATE=${OPERA_VER_DATE:Q}
PLIST_SUBST+=		OPERA_PKG_VERSION=${OPERA_PKG_VERSION:C/u.*//}

post-extract:
	${CP} ${FILESDIR}/opera.sh ${WRKSRC}

post-install:
	${INSTALL_SCRIPT} ${WRKDIR}/opera.sh ${DESTDIR}${PREFIX}/bin/opera
	${LN} -fs ${EMULDIR}/usr/share/man/man1/opera.1			\
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${ECHO} "bin/opera" >> ${RPM2PKG_PLIST}
	${ECHO} "${PKGMANDIR}/man1/opera.1" >> ${RPM2PKG_PLIST}
	${ECHO} "${PREFIX}/lib/netscape/plugins=1" >> \
		${DESTDIR}${PREFIX}/${EMULSUBDIR}/usr/share/opera/defaults/pluginpath.ini

.include "../../mk/bsd.pkg.mk"