aboutsummaryrefslogtreecommitdiff
path: root/www/plugger/Makefile
blob: 5fe718239ef170cb3fcca867c982ad8b2a924923 (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
# Created by: Jay Sachs <sachs@cs.williams.edu>
# $FreeBSD$

PORTNAME=	plugger
PORTVERSION=	5.1.5
CATEGORIES=	www audio graphics multimedia
MASTER_SITES=	http://fredrik.hubbe.net/plugger/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A multimedia front-end plugin for Mozilla or Opera

USE_XORG=	xext xt sm ice xext x11
GNU_CONFIGURE=	yes

MAN7=		plugger.7
PKGDEINSTALL=	${PKGINSTALL}

USE_WEBPLUGINS=	native
WEBPLUGINS_FILES=npplugger.so

.include <bsd.port.pre.mk>
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"

post-patch:
	@${REINPLACE_CMD} -e \
	's|/usr/X11R6/lib/xscreensaver|${LOCALBASE}/bin/xscreensaver-hacks|g ; \
	s|+useFrontEndProgram||g' \
		${WRKSRC}/pluggerrc

pre-install:
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
		${PKGINSTALL} ${PKGNAME} PRE-INSTALL

do-install:
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-${PORTVERSION} \
		${PREFIX}/bin
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-controller \
		${PREFIX}/bin
	@${INSTALL_SCRIPT} ${WRKSRC}/plugger-oohelper \
		${PREFIX}/bin
	@${MKDIR} ${WEBPLUGINS_DIR}
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger.so \
		${WEBPLUGINS_DIR}/npplugger.so
	@if [ -f ${PREFIX}/etc/pluggerrc-${PORTVERSION} ]; then \
		${MV} ${PREFIX}/etc/pluggerrc-${PORTVERSION} \
			${PREFIX}/etc/pluggerrc-${PORTVERSION}.old; \
	fi
	@${INSTALL_DATA} ${WRKSRC}/pluggerrc \
		${PREFIX}/etc/pluggerrc-${PORTVERSION}.sample
	@${INSTALL_MAN} ${WRKSRC}/plugger.7 ${MANPREFIX}/man/man7

local-install:
	@${MKDIR} ${HOME}/.plugger
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-${PORTVERSION} \
		${HOME}/.plugger
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-controller \
		${HOME}/.plugger
	@${INSTALL_SCRIPT} ${WRKSRC}/plugger-oohelper \
		${HOME}/.plugger
	@if [ -f ${HOME}/.plugger/pluggerrc-${PORTVERSION} ]; then \
		${MV} ${HOME}/.plugger/pluggerrc-${PORTVERSION} \
			${HOME}/.plugger/pluggerrc-${PORTVERSION}.old; \
	fi
	@${INSTALL_DATA} ${WRKSRC}/pluggerrc \
		${HOME}/.plugger/pluggerrc-${PORTVERSION}

local-mozilla-install: local-install
	@${MKDIR} ${HOME}/.mozilla/plugins
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger.so \
		${HOME}/.mozilla/plugins/npplugger.so

local-opera-install: local-install
	@${MKDIR} ${HOME}/.opera/plugins
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger.so \
		${HOME}/.opera/plugins/npplugger.so

post-install:
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
		${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.post.mk>