2014-06-05 15:36:38 +02:00
|
|
|
# $NetBSD: Makefile,v 1.47 2014/06/05 13:36:38 gdt Exp $
|
2009-06-08 15:58:26 +02:00
|
|
|
|
2013-06-16 16:37:33 +02:00
|
|
|
GHCOMMIT= 3859170568fbe4fe21b5660dbaeca8d65ac10f1b
|
|
|
|
DISTNAME= ${GHCOMMIT}
|
|
|
|
PKGNAME= pkgin-0.6.4
|
2014-06-05 15:36:38 +02:00
|
|
|
PKGREVISION= 7
|
2009-06-08 15:58:26 +02:00
|
|
|
CATEGORIES= pkgtools
|
2013-06-16 16:37:33 +02:00
|
|
|
MASTER_SITES= https://github.com/NetBSDfr/pkgin/archive/
|
2009-06-08 15:58:26 +02:00
|
|
|
|
2011-02-13 17:03:56 +01:00
|
|
|
MAINTAINER= imil@NetBSD.org
|
2011-03-06 19:44:59 +01:00
|
|
|
HOMEPAGE= http://pkgin.net/
|
2009-06-08 15:58:26 +02:00
|
|
|
COMMENT= Apt / yum like tool for managing pkgsrc binary packages
|
|
|
|
LICENSE= modified-bsd
|
|
|
|
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
|
|
CONF_FILES= ${EGDIR}/repositories.conf.example \
|
|
|
|
${PKG_SYSCONFDIR}/${PKGBASE}/repositories.conf
|
|
|
|
|
2010-01-24 15:56:24 +01:00
|
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/${PKGBASE}
|
2014-01-21 17:31:27 +01:00
|
|
|
INSTALLATION_DIRS+= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 ${EGDIR}
|
2009-06-08 15:58:26 +02:00
|
|
|
|
2013-06-16 16:37:33 +02:00
|
|
|
WRKSRC= ${WRKDIR}/pkgin-${GHCOMMIT}
|
2009-06-08 15:58:26 +02:00
|
|
|
|
|
|
|
SUBST_CLASSES+= path
|
|
|
|
SUBST_STAGE.path= pre-configure
|
|
|
|
SUBST_MESSAGE.path= Adjusting path.
|
2010-01-24 15:56:24 +01:00
|
|
|
SUBST_FILES.path= Makefile.in actions.c pkgin.1
|
|
|
|
SUBST_SED.path= -e "s|/usr/pkg/etc|${PKG_SYSCONFDIR}|g"
|
2009-06-08 15:58:26 +02:00
|
|
|
SUBST_SED.path+= -e "s|/usr/sbin|${PKG_TOOLS_BIN}|g"
|
2010-01-24 15:56:24 +01:00
|
|
|
SUBST_SED.path+= -e "s|/var|${VARBASE}|g"
|
2011-02-13 17:03:56 +01:00
|
|
|
SUBST_SED.path+= -e "s|/usr/pkg|${PREFIX}|g"
|
2012-10-02 13:28:42 +02:00
|
|
|
SUBST_SED.path+= -e "s|!=.*uname -p|= ${MACHINE_ARCH}|g"
|
2009-06-08 15:58:26 +02:00
|
|
|
|
2013-03-25 11:09:04 +01:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_FEATURES= nbcompat
|
|
|
|
USE_TOOLS+= nroff
|
|
|
|
|
2013-02-25 20:35:38 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
SUBST_CLASSES+= osrel
|
|
|
|
SUBST_STAGE.osrel= pre-configure
|
|
|
|
SUBST_MESSAGE.osrel= Adjusting repository OS release
|
|
|
|
SUBST_FILES.osrel= REPOSITORIES
|
|
|
|
SUBST_SED.osrel= -e "s|@OSREL@|${OS_VERSION:C/_.*//}|"
|
|
|
|
.endif
|
|
|
|
|
2013-05-24 17:08:00 +02:00
|
|
|
CFLAGS.SunOS+= -D_FILE_OFFSET_BITS=64
|
|
|
|
|
2012-10-02 13:28:42 +02:00
|
|
|
MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH}
|
|
|
|
|
2013-09-02 13:01:42 +02:00
|
|
|
DEPENDS+= pkg_install>=20130901:../../pkgtools/pkg_install
|
2011-10-16 11:26:36 +02:00
|
|
|
|
2011-02-13 17:03:56 +01:00
|
|
|
# those have official repositories
|
|
|
|
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "Minix"
|
|
|
|
pre-install:
|
2013-06-16 16:37:33 +02:00
|
|
|
${GREP} -i ${OPSYS} ${WRKSRC}/REPOSITORIES >> \
|
2011-02-13 17:03:56 +01:00
|
|
|
${WRKSRC}/repositories.conf
|
|
|
|
.endif
|
2009-06-08 15:58:26 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/pkgin ${DESTDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/pkgin.1 \
|
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
2014-01-21 17:31:27 +01:00
|
|
|
.if !empty(MANINSTALL:Mcatinstall)
|
|
|
|
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/pkgin.cat1 \
|
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/pkgin.1
|
|
|
|
. else
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/pkgin.cat1 \
|
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/pkgin.0
|
|
|
|
. endif
|
|
|
|
.endif
|
2009-06-08 15:58:26 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/repositories.conf \
|
|
|
|
${DESTDIR}${EGDIR}/repositories.conf.example
|
|
|
|
|
|
|
|
# libfetch has no builtin.mk and is included in NetBSD>=5
|
|
|
|
.if ${OPSYS} != "NetBSD" || \
|
|
|
|
(${OPSYS} == "NetBSD" && !empty(OS_VERSION:M[0-4].*))
|
|
|
|
. include "../../net/libfetch/buildlink3.mk"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include "../../archivers/libarchive/buildlink3.mk"
|
2012-08-22 18:55:27 +02:00
|
|
|
.include "../../databases/sqlite3/buildlink3.mk"
|
2014-06-05 15:36:38 +02:00
|
|
|
.include "../../net/libfetch/buildlink3.mk"
|
2012-08-22 18:55:27 +02:00
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
2009-06-08 15:58:26 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|