# New ports collection makefile for:	afterstep-h
# Version required:	1.0pre3h1
# Date created:		2 Apr 1997
# Whom:			Choi Jun Ho <junker@jazz.snu.ac.kr>
#
# $FreeBSD: ports/korean/afterstep/Makefile,v 1.13 1999/08/30 12:08:37 peter Exp $
#

DISTNAME=	AfterStep-1.0pre3h1
PKGNAME=	ko-afterstep-1.0pr3h1
CATEGORIES=	korean x11-wm afterstep
MASTER_SITES=	ftp://jazz.snu.ac.kr/pub/unix/util/X11/

MAINTAINER=	junker@jazz.snu.ac.kr

LIB_DEPENDS=	Xpm.4:${PORTSDIR}/graphics/xpm

USE_X_PREFIX=	yes
WRKSRC=		${WRKDIR}/AfterStep-1.0pre3h1
INSTALL_TARGET=	install install.man
MANCOMPRESSED=	yes
MAN1=		afterstep.1 asclock.1 Audio.1 Auto.1 Banner.1 Pager.1 Wharf.1

SRCDIRS=	afterstep \
		modules/Audio modules/Auto \
		modules/Banner modules/Pager modules/Wharf \
		modules/Wharf/ASSound

post-patch:
		@ for i in ${SRCDIRS}; do \
			cd ${WRKSRC}/$$i; \
			${MV} Imakefile Imakefile.orig; \
			${SED} -e 's/#ifdef AlphaArchitecture/#if defined(AlphaArchitecture) \&\& !defined(FreeBSDArchitecture)/' < Imakefile.orig  >  Imakefile; \
		done

pre-build:
		@ cd ${WRKSRC}; sh MakeMakefiles

post-install:	
		@ ${MKDIR} ${PREFIX}/lib/X11/afterstep/backgrounds/
		${INSTALL_DATA} ${WRKSRC}/backgrounds/* ${PREFIX}/lib/X11/afterstep/backgrounds/
		@ ${MKDIR} ${PREFIX}/lib/X11/afterstep/sounds/
		${INSTALL_DATA} ${WRKSRC}/sounds/* ${PREFIX}/lib/X11/afterstep/sounds/
		@ ${MKDIR} ${PREFIX}/lib/X11/afterstep/icons/
		${MKDIR} ${PREFIX}/lib/X11/afterstep/icons/8bit
		${MKDIR} ${PREFIX}/lib/X11/afterstep/icons/8bit-lesscolor
		${INSTALL_DATA} ${WRKSRC}/icons/*.xpm \
				${PREFIX}/lib/X11/afterstep/icons/
		${INSTALL_DATA} ${WRKSRC}/icons/8bit/*.xpm \
				${PREFIX}/lib/X11/afterstep/icons/8bit/
		${INSTALL_DATA} ${WRKSRC}/icons/8bit-lesscolor/*.xpm \
				${PREFIX}/lib/X11/afterstep/icons/8bit-lesscolor/
		@ ${MKDIR} ${PREFIX}/lib/X11/afterstep/doc/
		@for file in CHANGES CREDITS README README.Hangul README.8bit afterstep.faq; do \
			${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/lib/X11/afterstep/doc/; \
		done

.include <bsd.port.mk>
