blob: f541cbaaf0b06f27238f9f7ca12761fa26d14dfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# $NetBSD: Makefile,v 1.12 2008/03/03 17:45:34 jlam Exp $
#
DISTNAME= cvs2p4-2.3.3
CATEGORIES= devel scm
MASTER_SITES= ftp://public.perforce.com/public/perforce/utils/cvs2p4/
EXTRACT_SUFX= .tar
MAINTAINER= schmonz@NetBSD.org
HOMEPAGE= # none
COMMENT= Converts CVS repository to Perforce depot
DEPENDS+= p4-[0-9]*:../../devel/p4
DEPENDS+= p4d-[0-9]*:../../devel/p4d
.if !exists(/usr/bin/co) && !exists(${LOCALBASE}/bin/co)
DEPENDS+= rcs-[0-9]*:../../devel/rcs
.endif
PKG_DESTDIR_SUPPORT= user-destdir
USE_TOOLS+= perl:run
NO_BUILD= yes
DOCDIR= share/doc/${PKGBASE}
EGDIR= share/examples/${PKGBASE}
LIBDIR= lib/perl5
PLIST_SUBST+= DOCDIR=${DOCDIR:Q}
PLIST_SUBST+= EGDIR=${EGDIR:Q}
CVS2P4_INLIB= $$Mydir/lib/util\.pl
CVS2P4_OUTLIB= ${LIBDIR}/${PKGBASE}-util.pl
INSTALLATION_DIRS= bin ${LIBDIR}
SUBST_CLASSES+= paths
SUBST_FILES.paths= test/config
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
SUBST_SED.paths+= -e 's,@P4PORT@,${P4PORT},g'
SUBST_SED.paths+= -e 's,@P4ROOT@,${P4ROOT},g'
SUBST_STAGE.paths= post-patch
do-configure:
for f in ${WRKSRC}/bin/*; do \
( ${ECHO} \#!${PERL5}; ${CAT} $${f} ) | ${SED} -e '2,5d' \
-e 's|${CVS2P4_INLIB}|${PREFIX}/${CVS2P4_OUTLIB}|' \
> $${f}.new; \
${MV} -f $${f}.new $${f}; \
done
do-install:
${INSTALL_DATA} ${WRKSRC}/lib/util.pl \
${DESTDIR}${PREFIX}/${CVS2P4_OUTLIB}
${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/NEWS ${DESTDIR}${PREFIX}/${DOCDIR}
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${EGDIR}
${INSTALL_DATA} ${WRKSRC}/test/config ${DESTDIR}${PREFIX}/${EGDIR}
.include "../../mk/bsd.pkg.mk"
|