[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FLAVOR and PLIST
- To: ports_(_at_)_openbsd_(_dot_)_org
- Subject: FLAVOR and PLIST
- From: Peter Hessler <phessler_(_at_)_theapt_(_dot_)_org>
- Date: Tue, 23 Sep 2003 18:29:49 -0700
In my GkrellM2 port, I have a FLAVOR of 'server'. That builds just the
server. The reasoning for this, is that the client needs GTK+2, but the
server module allows for glib1 or glib2. I chose to use glib1, to minimize
the amount of bloat on their server. When I build the server FLAVOR, it
pulls 'PLIST', not 'PLIST-server'. I am using FLAVOR to manipulate
{SUB,MULTI}_PACKAGES. I have attached the Makefile, and you can see it in
action in my GkrellM2 port. I won't be suprised if I am doing this the
wrong way, but some help would be greatly appriciated.
--
A language that doesn't have everything is actually easier to program
in than some that do.
-- Dennis M. Ritchie
# $OpenBSD$
COMMENT= "single process stack of system monitors for GTK+2"
COMMENT-server= "GkrellM2 server module"
VERSION= 2.1.19
DISTNAME= gkrellm-${VERSION}
PKGNAME= gkrellm2-${VERSION}
PKGNAME-server= gkrellm2-server-${VERSION}
CATEGORIES= sysutils gkrellm2
HOMEPAGE= http://www.gkrellm.net/
MAINTAINER= Peter Hessler <spambox_(_at_)_theapt_(_dot_)_org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://web.wt.net/~billw/gkrellm/
EXTRACT_SUFX= .tar.bz2
USE_GMAKE= Yes
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
NO_REGRESS= Yes
PSEUDO_FLAVORS= server
FLAVOR?=
MULTI_PACKAGES=
.if ${FLAVOR:L} == "server"
MULTI_PACKAGES+= -server
.endif
LIB_DEPENDS= gthread-2.0.0.0::devel/glib2 \
gdk-x11-2.0.0.0,gdk_pixbuf-2.0.0.0,gtk-x11-2.0.0.0::x11/gtk+2
USE_X11= Yes
ALL_TARGET= openbsd
INSTALL_TARGET= install_openbsd
SUBPACKAGE?=
.if defined(PACKAGING)
. if ${SUBPACKAGE} == "-server"
LIB_DEPENDS= gthread.1.2,glib.1.2,gmodule.1.2::devel/glib
. endif
.else
. if ${MULTI_PACKAGES:M-server}
LIB_DEPENDS= gthread.1.2,glib.1.2,gmodule.1.2::devel/glib
WRKSRC= ${WRKDIST}/server
ALL_TARGET= netbsd
INSTALL_TARGET= install_netbsd
. endif
.endif
pre-extract:
@if [ -f ${LOCALBASE}/include/gkrellm/gkrellm.h ]; then \
echo "+-------------------"; \
echo "| ERROR: GkrellM2 conflicts with GkrellM 1.x"; \
echo "| Before compiling this version, fully remove GkrellM 1.x"; \
echo "| by running these commands as user root"; \
echo "|"; \
echo "| pkg_delete -f `pkg_info -e 'gkrellm-1*'`"; \
echo "|"; \
echo "| You will have to migrate to the GkrellM2 plugins as well";\
echo "+-------------------"; \
exit 1; \
fi
.include <bsd.port.mk>
Visit your host, monkey.org