ticket #2718
[pkgsrc.git] / doc / Makefile-example
1 # $NetBSD: Makefile-example,v 1.16 2008/01/04 19:53:36 heinz Exp $
2
3 # First paragraph - distfile and binary package data
4 # DISTNAME PKGNAME PKGREVISION SVR4_PKGNAME CATEGORIES MASTER_SITES
5 # MASTER_SITE_SUBDIR EXTRACT_SUFX DISTFILES
6 DISTNAME=               make-3.80
7 PKGNAME=                gmake-3.80      # only to be added if the package name is different from DISTNAME
8 #PKGREVISION=           2               # should be added/incremented for user-visible changes
9 CATEGORIES=             devel gnu       # multiple categories are allowed
10 MASTER_SITES=           ${MASTER_SITE_GNU:=make/}
11 #EXTRACT_SUFX=          .tar.bz2        # .tar.gz is the default, only needed in unusual circumstances
12
13 # Second paragraph - MAINTAINER/OWNER, HOMEPAGE and COMMENT
14 MAINTAINER=             pkgsrc-users@NetBSD.org # set this to your email address, pkgsrc-users@ is the default
15 HOMEPAGE=               http://www.gnu.org/software/make/make.html
16 COMMENT=                GNU version of 'make' utility   # start with a capital, no articles at start
17
18 # Third paragraph - licensing information
19 # Licences should be added to the pkgsrc/licenses directory.
20 LICENSE=                hptools-license
21 # Set RESTRICTED to a very short explanation (typically "No permission to
22 # redistribute for a fee.").  NO_*_ON_* may only be set to ${RESTRICTED}.
23 RESTRICTED=             "Redistribution of unmodified source only; resale prohibited."
24 NO_SRC_ON_CDROM=        ${RESTRICTED}
25 NO_BIN_ON_FTP=          ${RESTRICTED}
26 NO_BIN_ON_CDROM=        ${RESTRICTED}
27
28 # Fourth paragraph - PKG_INSTALLATION_TYPES
29 PKG_INSTALLATION_TYPES= overwrite pkgviews      # needed for package views-ready packages
30 # if the package can be created without root privileges
31 PKG_DESTDIR_SUPPORT=    user-destdir
32
33 # Fifth paragraph - all build definitions that describe things used by
34 # the package.  These include: WRKSRC, GNU_CONFIGURE,
35 # HAS_CONFIGURE, USE_PKGLOCALEDIR, USE_INSTALL, TEXINFO_REQD, USE_JAVA,
36 # INFO_FILES, DIST_SUBDIR, etc.
37 DIST_SUBDIR=            gmake
38 GNU_CONFIGURE=          yes
39 INFO_FILES=             # defined if the package installs info files
40 TEXINFO_REQD=           4.0             # version of texinfo which is necessary
41 USE_PKGLOCALEDIR=       yes
42 WRKSRC=                 ${WRKDIR}/src
43
44 # Sixth paragraph - file overrides; these are all *_OVERRIDE variables
45 LIBTOOL_OVERRIDE+=      build/unix/tools/libtool
46 PKGCONFIG_OVERRIDE+=    glib-2.0.pc.in
47
48 # Seventh paragraph - modification of configure and make environments
49 CONFIGURE_ARGS+=        --disable-gtk-doc
50 CONFIGURE_ENV+=         ac_cv_path_PYTHON="${PYTHONBIN}"
51 MAKE_ENV+=              PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
52
53 # Eighth paragraph - different targets
54 # BUILD_TARGET, INSTALL_TARGET, TEST_TARGET
55 TEST_TARGET=            check
56
57 # always include bsd.prefs.mk before any .if or .ifdef statements
58 .include "../../mk/bsd.prefs.mk"
59
60 .if defined(GNU_PROGRAM_PREFIX)
61 # indent nested "if" by 2 spaces please
62 .  if ${GNU_PROGRAM_PREFIX} == "g"
63 CONFIGURE_ARGS+=        --program-prefix=${GNU_PROGRAM_PREFIX}
64 .  endif
65 .endif
66 PLIST_SUBST+=           GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX}
67 BUILD_DEFS+=            GNU_PROGRAM_PREFIX
68
69 # buildlink3 files should come after all variables have been set,
70 # sorted alphabetically.
71 .include "../../devel/gettext-lib/buildlink3.mk"
72
73 # The section that handles pthreads should come after all other buildlink3
74 # files have been included.
75 .include "../../mk/pthread.buildlink3.mk"
76 .if ${PTHREAD_TYPE} == "none"
77 CONFIGURE_ARGS+=        --disable-threads
78 .endif
79
80 # Makefile targets should occur after all the other definitions in the file
81 post-install:
82         ${CHMOD} g-s ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
83         ${CHGRP} ${BINGRP} ${PREFIX}/bin/${GNU_PROGRAM_PREFIX}make
84 .if !defined(GNU_PROGRAM_PREFIX) || ${GNU_PROGRAM_PREFIX} != "g"
85         # Solaris's "ln -fs" is not the same as on *BSD - use an explicit rm(1) instead
86         ${RM} -f ${PREFIX}/bin/gmake
87         ${LN} -s ${GNU_PROGRAM_PREFIX}make ${PREFIX}/bin/gmake
88 .endif
89
90 # Finally, please include bsd.pkg.mk
91 .include "../../mk/bsd.pkg.mk"