aboutsummaryrefslogtreecommitdiff
path: root/multimedia/mplayer-skins/Makefile
blob: cca07017c9b33c6a88d7ac37b5f5846e5d2818e1 (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
# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>

PORTNAME=	mplayer-skins
PORTVERSION=	1.1.5
CATEGORIES=	multimedia
MASTER_SITES=	http://www.mplayerhq.hu/MPlayer/skins/ \
		http://ftp.icm.edu.pl/packages/mplayer/skins/
DISTFILES=	# filled in later after options
DIST_SUBDIR=	mplayer-skins

MAINTAINER=	riggs@FreeBSD.org
COMMENT=	Skins for MPlayer's Graphical User Interface (GUI)

#
# When adding a new skin, please make sure to add it into the following
# Makefiles:
# - Makefile.skins
# - Makefile.options
#
# Then do "make config", select "All Skins" and run "make makesum".
#

USES=		tar:bzip2
NO_WRKSUBDIR=	yes
NO_BUILD=	yes

NO_ARCH=	yes

.include "${.CURDIR}/Makefile.options"

.include <bsd.port.pre.mk>

.include "${.CURDIR}/Makefile.skins"

myDATADIR=	share/${PORTNAME:S/-skins//}/skins
myWRKSRC=		${WRKSRC}/skins

post-extract:
	@${FIND} ${WRKSRC} -type d \( -name '.svn' \) -delete
	@${MKDIR} ${myWRKSRC}
	@for dir in `cd ${WRKSRC} && ${FIND} . -type d ! -name ".*" ! -name "skins" -maxdepth 1` ; do \
		${MV} ${WRKSRC}/$${dir#./} ${myWRKSRC}; \
	done

pre-build:
.if ${PORT_OPTIONS:MALL}
PORT_OPTIONS+=	${ALLSKINS}
.endif

post-build-script:
DISTFILES+=	${DEFAULT_FILE}${EXTRACT_SUFX}
.for f in ${ALLSKINS}
.if ${PORT_OPTIONS:M${f}}
PLIST_SUB+=	${f}="" WITHOUT_SKIN_${f}="@comment "
DISTFILES+=	${${f}_FILE}${EXTRACT_SUFX}
.else
PLIST_SUB+=	${f}="@comment " WITHOUT_SKIN_${f}=""
.endif
.endfor

do-install:
# both anotate and create target directories
	@for dir in `cd ${myWRKSRC} && ${FIND} . -type d | ${SORT} -r` ; do \
		${MKDIR} "${STAGEDIR}${PREFIX}/${myDATADIR}/$${dir#./}" ; \
	done
# both anotate installed and install files
	@for f in `cd ${myWRKSRC} && ${FIND} . -type f | ${SORT}` ; do \
		${INSTALL_DATA} "${myWRKSRC}/$${f#./}" ${STAGEDIR}${PREFIX}/${myDATADIR}/$${f#./} ; \
	done
# Create link to the default skin
	@${LN} -sfh Blue ${STAGEDIR}${PREFIX}/${myDATADIR}/default

.include <bsd.port.post.mk>