summaryrefslogtreecommitdiff
path: root/wm/wmthemes/Makefile
blob: a0cd96e65c73ac0e7d3ce3e52f997ae0e463602e (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
# $NetBSD: Makefile,v 1.19 2004/01/20 12:27:35 agc Exp $

#
# There is no distinfo file because users can specify alternate themes
# via the "WINDOWMAKER_THEMES" variable.
#

DISTNAME=	wmthemes-0.80.0
CATEGORIES=	x11 wm windowmaker
MASTER_SITES=	http://download.themes.org/wm/
DISTFILES=	${THEME_FILES}

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://wm.themes.org/
COMMENT=	Themes for the window manager WindowMaker

DEPENDS+=	windowmaker>=0.80.0nb1:../../wm/windowmaker

WRKSRC=		${WRKDIR}
DIST_SUBDIR=	wmthemes

USE_X11BASE=	yes
NO_BUILD=	yes
NO_CHECKSUM=	yes

PLIST_SRC=	${WRKDIR}/PLIST
THEME_SUBDIRS=	Backgrounds IconSets Icons Pixmaps Sounds Styles Themes
WM_DATADIR=	share/WindowMaker

.include "../../mk/bsd.prefs.mk"

BUILD_DEFS+=	WINDOWMAKER_THEMES

THEME_FILES=
.for theme in ${WINDOWMAKER_THEMES}
THEME_FILES+=	${theme}.tar.gz
SITES_${theme}.tar.gz=	http://download.freshmeat.net/themes/${theme:C/-[^-]*$//}/
.endfor
.undef theme

do-install:
	@${RM} -f ${PLIST_SRC}
	@${TOUCH} ${PLIST_SRC}
.for DIR in ${THEME_SUBDIRS}
	@if [ -d ${WRKSRC}/${DIR} ] && [ -n "`ls ${WRKSRC}/${DIR}`" ]; then \
	  ${ECHO} "Installing files in directory ${DIR}."; \
	  cd ${WRKSRC}/${DIR}; \
	  for FILE in *; do \
	    ${INSTALL_DATA} "$$FILE" ${PREFIX}/${WM_DATADIR}/${DIR}; \
	    ${ECHO} "${WM_DATADIR}/${DIR}/$$FILE" >>${PLIST_SRC}; \
	  done; \
	fi
.endfor
	@cd ${WRKSRC}; \
	for DIR in *.themed; do \
	  if [ -d "$$DIR" ] && [ -n "`${LS} "$$DIR"`" ]; then \
	    ${ECHO} "Installing \"`${BASENAME} "$$DIR" .themed`\" theme."; \
	    ${INSTALL_DATA_DIR} "${PREFIX}/${WM_DATADIR}/Themes/$$DIR"; \
	    cd "${WRKSRC}/$$DIR"; \
	    for FILE in *; do \
	      ${INSTALL_DATA} "$$FILE" "${PREFIX}/${WM_DATADIR}/Themes/$$DIR"; \
	      ${ECHO} "${WM_DATADIR}/Themes/$$DIR/$$FILE" >>${PLIST_SRC}; \
	    done; \
	    cd ..; \
	    ${ECHO} "@dirrm ${WM_DATADIR}/Themes/$$DIR" >>${PLIST_SRC}; \
	  fi; \
	done

.include "../../mk/bsd.pkg.mk"