[BACK]Return to Makefile-example CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / doc

File: [cvs.NetBSD.org] / pkgsrc / doc / Makefile-example (download)

Revision 1.14, Thu Jul 27 15:16:44 2006 UTC (17 years, 8 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3
Changes since 1.13: +2 -2 lines

Apply the "convention over configuration" principle:

If ${FILESDIR}/getsite.sh exists, then use it to determine the fetch
URL for each of the distfiles for the package.  Otherwise, use
SITE_<file> and MASTER_SITES, in order, to determine the URL for each
distfile.

If the script path differs from ${FILESDIR}/getsite.sh, then set
DYNAMIC_SITE_SCRIPT to the full path to that script.

Remove the need to set DYNAMIC_MASTER_SITES explicitly in the package
Makefile for:

	graphics/ns-cult3d
	wm/sawfish-themes
	www/apache-tomcat55
	www/jakarta-tomcat4
	www/jakarta-tomcat5

# $NetBSD: Makefile-example,v 1.14 2006/07/27 15:16:44 jlam Exp $

# First paragraph - distfile and binary package data
# DISTNAME PKGNAME PKGREVISION SVR4_PKGNAME CATEGORIES MASTER_SITES
# MASTER_SITE_SUBDIR EXTRACT_SUFX DISTFILES
DISTNAME=		make-3.80
PKGNAME=		gmake-3.80	# only to be added if the package name is different from DISTNAME
#PKGREVISION=		2		# should be added/incremented for user-visible changes
CATEGORIES=		devel gnu	# multiple categories are allowed
MASTER_SITES=		${MASTER_SITE_GNU:=make/}
#EXTRACT_SUFX=		.tar.bz2	# .tar.gz is the default, only needed in unusual circumstances

# Second paragraph - MAINTAINER, HOMEPAGE and COMMENT
MAINTAINER=		pkgsrc-users@NetBSD.org	# set this to your email address, pkgsrc-users@ is the default
HOMEPAGE=		http://www.gnu.org/software/make/make.html
COMMENT=		GNU version of 'make' utility	# start with a capital, no articles at start

# Third paragraph - licensing information
# Please set RESTRICTED to the relevant reason, and use it to define NO_{SRC,BIN}_ON_{FTP,CDROM}
# Any specific licence should be added to the pkgsrc/licenses directory
RESTRICTED=		"Redistribution of unmodified source only; resale prohibited."
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}
LICENSE=		hptools-license

# Fourth paragraph - PKG_INSTALLATION_TYPES
PKG_INSTALLATION_TYPES=	overwrite pkgviews	# needed for package views-ready packages

# Fifth paragraph - all build definitions that describe things used by
# the package.  These include: WRKSRC, GNU_CONFIGURE,
# HAS_CONFIGURE, USE_PKGLOCALEDIR, USE_INSTALL, TEXINFO_REQD, USE_JAVA,
# INFO_FILES, DIST_SUBDIR, etc.
DIST_SUBDIR=		gmake
GNU_CONFIGURE=		yes
INFO_FILES=		# defined if the package installs info files
TEXINFO_REQD=		4.0		# version of texinfo which is necessary
USE_PKGLOCALEDIR=	yes
WRKSRC=			${WRKDIR}/src

# Sixth paragraph - file overrides; these are all *_OVERRIDE variables
LIBTOOL_OVERRIDE+=	build/unix/tools/libtool
PKGCONFIG_OVERRIDE+=	glib-2.0.pc.in

# Seventh paragraph - modification of configure and make environments
CONFIGURE_ARGS+=	--disable-gtk-doc
CONFIGURE_ENV+=		ac_cv_path_PYTHON="${PYTHONBIN}"
MAKE_ENV+=		PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"

# Eighth paragraph - different targets
# BUILD_TARGET, INSTALL_TARGET, TEST_TARGET
TEST_TARGET=		check

# always include bsd.prefs.mk before any .if or .ifdef statements
.include "../../mk/bsd.prefs.mk"

.if defined(GNU_PROGRAM_PREFIX)
# indent nested "if" by 2 spaces please
.  if ${GNU_PROGRAM_PREFIX} == "g"
CONFIGURE_ARGS+=	--program-prefix=${GNU_PROGRAM_PREFIX}
.  endif
.endif
PLIST_SUBST+=		GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX}
BUILD_DEFS+=		GNU_PROGRAM_PREFIX

# buildlink3 files should come after all variables have been set,
# sorted alphabetically.
.include "../../devel/gettext-lib/buildlink3.mk"

# The section that handles pthreads should come after all other buildlink3
# files have been included.
.include "../../mk/pthread.buildlink3.mk"
.if ${PTHREAD_TYPE} == "none"
CONFIGURE_ARGS+=	--disable-threads
.endif

# Makefile targets should occur after all the other definitions in the file
post-install:
	${CHMOD} g-s ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
	${CHGRP} ${BINGRP} ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
.if !defined(GNU_PROGRAM_PREFIX) || ${GNU_PROGRAM_PREFIX} != "g"
	# Solaris's "ln -fs" is not the same as on *BSD - use an explicit rm(1) instead
	${RM} -f ${PREFIX}/bin/gmake
	${LN} -s ${GNU_PROGRAM_PREFIX}make ${PREFIX}/bin/gmake
.endif

# Finally, please include bsd.pkg.mk
.include "../../mk/bsd.pkg.mk"