summaryrefslogtreecommitdiffstats
path: root/www/plugger/Makefile
blob: bb0df54cccb120c6e9da4ab3e6a05de1b4940858 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# New ports collection makefile for:	plugger
# Date created:		11 Februrary 1999
# Whom:			Jay Sachs <sachs@cs.williams.edu>
#
# $FreeBSD$
#

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

MAINTAINER=	coop9211@uidaho.edu
COMMENT=	A multimedia front-end plugin for Mozilla or Opera

USE_X_PREFIX=	yes
USE_REINPLACE=	yes

MAN7=		plugger.7
ALL_TARGET=	freebsd-elf
PKGDEINSTALL=	${PKGINSTALL}

.include <bsd.port.pre.mk>

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/local/|${PREFIX}/|g' \
		${WRKSRC}/plugger.c
	@${REINPLACE_CMD} -e 's|CC=gcc|CC=${CC}|g' \
		-e 's|LD=gcc|LD=${CC}|g' ${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e 's|/usr/X11R6/|${X11BASE}|g' \
		${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e 's|oowriter|openoffice-1.1-swriter|g' \
		-e 's|oocalc|openoffice-1.1-scalc|g' \
		-e 's|ooimpress|openoffice-1.1-simpress|g' \
		-e 's|oodraw|openoffice-1.1-sdraw|g' \
		-e 's|oomath|openoffice-1.1-smath|g' \
		${WRKSRC}/pluggerrc
	@${REINPLACE_CMD} -e \
	's|/usr/X11R6/lib/xscreensaver|${X11BASE}/bin/xscreensaver-hacks|g' \
		${WRKSRC}/pluggerrc

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

do-install:
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-${PORTVERSION} \
		${PREFIX}/bin
	@${MKDIR} ${PREFIX}/lib/browser_plugins
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-${PORTVERSION} \
		${PREFIX}/bin
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-controller \
		${PREFIX}/bin
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger.so \
		${PREFIX}/lib/browser_plugins/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}/.mozilla/plugins
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger.so \
		${HOME}/.mozilla/plugins/npplugger.so
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-${PORTVERSION} \
		${HOME}/.mozilla
	@${INSTALL_PROGRAM} ${WRKSRC}/plugger-controller \
		${HOME}/.mozilla
	@if [ -f ${HOME}/.mozilla/pluggerrc-${PORTVERSION} ]; then \
		${MV} ${HOME}/.mozilla/pluggerrc-${PORTVERSION} \
			${HOME}/.mozilla/pluggerrc-${PORTVERSION}.old; \
	fi
	@${INSTALL_DATA} ${WRKSRC}/pluggerrc \
		${HOME}/.mozilla/pluggerrc-${PORTVERSION}

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

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

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud