aboutsummaryrefslogtreecommitdiff
path: root/multimedia/dvdwizard/Makefile
blob: 4db40616e84a4e04b55810a4b934d6c64ead8224 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# New ports collection makefile for:	dvdwizard
# Date created:		Fri Dec  9 03:01:18 UTC 2005
# Whom:			Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	dvdwizard
PORTVERSION=	0.4.1
PORTREVISION=	4
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR=	udrecsuite
DISTNAME=	udrec_suite-${PORTVERSION}

MAINTAINER=	lioux@FreeBSD.org
COMMENT=	Automated creation of DVDs with chapters and menus

RUN_DEPENDS=	\
		toolame:${PORTSDIR}/audio/toolame \
		convert:${PORTSDIR}/graphics/ImageMagick \
		gnuls:${PORTSDIR}/misc/gnuls \
		seq2:${PORTSDIR}/misc/seq2 \
		dvdauthor:${PORTSDIR}/multimedia/dvdauthor \
		spumux:${PORTSDIR}/multimedia/dvdauthor \
		mpeg2enc:${PORTSDIR}/multimedia/mjpegtools \
		ppmtoy4m:${PORTSDIR}/multimedia/mjpegtools \
		transcode:${PORTSDIR}/multimedia/transcode \
		y4mscaler:${PORTSDIR}/multimedia/y4mscaler \
		bash:${PORTSDIR}/shells/bash

IGNORE=		has an incomplete dependency list

USE_REINPLACE=	yes
NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${DISTNAME}/${PORTNAME}

MANLANG=	de.ISO8859-1
MAN1=		chaptercheck.1 \
		dvdcpics.1 \
		dvdtguess.1 \
		dvdwizard.1
MAN5=		dvdwizard.conf.5

SCRIPT_FILES=	\
		chaptercheck \
		dvdcpics \
		dvdtguess \
		dvdwizard \
		mk_vmgm \
		mk_vtsm \
		mk_vtsm_audio \
		mpgprobe

PLIST_DIRS=	\
		%%DATADIR%% \
		%%EXAMPLESDIR%%
PLIST_FILES=	\
		${SCRIPT_FILES:S,^,bin/,} \
		bin/dvdwizard_seq \
		%%DATADIR%%/dvdwizardrc \
		%%EXAMPLESDIR%%/dvdwizard.conf.sample

.ifndef(NOPORTDOCS)
PORTDOCS=	README
.endif

post-patch:
	@${REINPLACE_CMD} -E \
		-e 's|/bin/bash|${LOCALBASE}/bin/bash|' \
		-e 's|^(rcfile[[:space:]]*=).*$$|\1"${DATADIR}/dvdwizardrc"|' \
		-e 's|`seq[[:space:]]+(.+)`|`dvdwizard_seq \1`|' \
		-e 's|\(seq[[:space:]]+(.+)\)|(dvdwizard_seq \1)|' \
		-e 's|==|=|' \
		-e 's|ls -QS|gnuls -QS|' \
		-e 's|ls -S|gnuls -S|' \
		-e 's|sed[[:space:]]+-i[[:space:]]|sed -i \"\" |' \
		${WRKSRC}/*

do-install:
# script
.for script in ${SCRIPT_FILES}
	@${INSTALL_SCRIPT} ${WRKSRC}/${script} ${PREFIX}/bin
.endfor
# examples
	@${MKDIR} ${EXAMPLESDIR}
	@${INSTALL_DATA} ${WRKSRC}/dvdwizard.conf.sample \
		${EXAMPLESDIR}
# shared data
	@${MKDIR} ${DATADIR}
	@${INSTALL_DATA} ${WRKSRC}/dvdwizardrc \
		${DATADIR}
# emulation
	@${INSTALL_SCRIPT} ${FILESDIR}/dvdwizard_seq \
		${PREFIX}/bin
# man
.for file in ${MAN1}
	@${INSTALL_MAN} ${WRKSRC}/../man/${file} ${MAN1PREFIX}/man/${MANLANG}/man1
.endfor
.for file in ${MAN5}
	@${INSTALL_MAN} ${WRKSRC}/../man/${file} ${MAN1PREFIX}/man/${MANLANG}/man5
.endfor
# docs
.ifndef(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/README \
		${DOCSDIR}
.endif

.include <bsd.port.mk>