aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/subtools/Makefile
blob: 7f65806d23eaa7de6ae10ad46c7a7a31ada63681 (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
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$

PORTNAME=   subtools
PORTVERSION=    20081026
CATEGORIES= multimedia
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Command-line tools for movie subtitles in SubRipper format

USES=       python tar:bzip2

WRKSRC=     ${WRKDIR}/${PORTNAME}/src

PLIST_FILES=    bin/srtshift bin/srtrate bin/udvd2srt.py bin/udvdshift.py

PORTDOCS=   CHANGELOG.TXT README.TXT

OPTIONS_DEFINE= DOCS

post-patch:
    @${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|' \
        ${WRKSRC}/*.py

do-build:
.for f in srtshift srtrate
    cd ${WRKSRC} && ${CC} ${CFLAGS} -D${f:tu} -o ${f} ${PORTNAME}.c
.endfor

do-install:
.for f in srtshift srtrate
    @(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${f} ${STAGEDIR}${PREFIX}/bin/)
.endfor
.for f in *.py
    @(cd ${WRKSRC} && ${INSTALL_SCRIPT} ${f} ${STAGEDIR}${PREFIX}/bin/)
.endfor

do-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/../|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>