Annotation of pkgsrc/net/arla/Makefile, Revision 1.5
1.5 ! wennmach 1: # $NetBSD: Makefile,v 1.4 2000/08/01 09:31:00 wennmach Exp $
1.1 wennmach 2: #
3:
4: DISTNAME= arla-0.33
5: CATEGORIES= net security
6: MASTER_SITES= ftp://ftp.stacken.kth.se/pub/arla/
7:
8: MAINTAINER= wennmach@netbsd.org
9: HOMEPAGE= http://www.stacken.kth.se/project/arla/
10:
11: DEPENDS+= kth-krb4-1.0.1:../../security/kth-krb4
1.4 wennmach 12:
1.5 ! wennmach 13: GNU_CONFIGURE= yes
! 14:
! 15: .include "../../mk/bsd.prefs.mk"
! 16:
1.4 wennmach 17: .if !exists(/sys/lib/libkern/libkern.h)
1.5 ! wennmach 18: .if exists(${BSDSRCDIR}/sys/lib/libkern/libkern.h)
! 19: CONFIGURE_ARGS+= --with-sys=${BSDSRCDIR}/sys
! 20: .else
! 21: IGNORE= "requires kernel sources available under \$$BSDSRCDIR/sys (or /sys)"
! 22: .endif
! 23: .endif
1.1 wennmach 24:
25: CONFIGURE_ARGS+= --with-krb4=${PREFIX}
26: .if defined(ARLA_CACHE)
27: CONFIGURE_ARGS+= --with-arlacachedir=${ARLA_CACHE}
28: .endif
29:
30: PLIST_SRC= ${WRKDIR}/PLIST
31: MESSAGE_FILE= ${WRKDIR}/MESSAGE
32:
33: .if defined(ARLA_CACHE)
34: CACHEDIR= ${ARLA_CACHE}
35: .else
36: CACHEDIR= ${LOCALBASE}/cache
37: .endif
38:
39: post-patch:
40: # This is ugly. Utterly ugly. Sigh.
41: # kth-krb4 and arla both have their own, different, versions or libroken.
42: # To resolve this conflict, which manifests in the inability to recompile
43: # kth-krb4 once it is installed, we rename arla's roken to arla-roken.
44: @${ECHO} "===> Applying more NetBSD patches for ${DISTNAME}"
45: @${ECHO} -n "=> Patching configure,"
46: @${MV} ${WRKSRC}/configure ${WRKSRC}/configure.old
47: # Notice, the following sed produces some funny comments in configure :-)
48: @${SED} -e 's/roken/arla-roken/g' ${WRKSRC}/configure.old > ${WRKSRC}/configure
49: @${CHMOD} 755 ${WRKSRC}/configure
50: @${ECHO} -n " Makefile.in,"
51: @for file in `${FIND} ${WRKSRC} -name Makefile.in -print`; { \
52: ${MV} $$file $$file.old; \
53: ${SED} -e 's/roken/arla-roken/g' $$file.old > $$file; \
54: }
55: @${ECHO} -n " .c files,"
56: @for file in `${FIND} ${WRKSRC} -name "*.c" -print`; { \
57: ${MV} $$file $$file.old; \
58: ${SED} -e 's/roken.h/arla-roken.h/g' $$file.old > $$file; \
59: }
60: @${ECHO} -n " .h files,"
61: @for file in `${FIND} ${WRKSRC} -name "*.h" -print`; { \
62: ${MV} $$file $$file.old; \
63: ${SED} -e 's/roken.h/arla-roken.h/g' $$file.old > $$file; \
64: }
65: @${ECHO} -n " .y files,"
66: @for file in `${FIND} ${WRKSRC} -name "*.y" -print`; { \
67: ${MV} $$file $$file.old; \
68: ${SED} -e 's/roken.h/arla-roken.h/g' $$file.old > $$file; \
69: }
70: @${ECHO} -n " .l files"
71: @for file in `${FIND} ${WRKSRC} -name "*.l" -print`; { \
72: ${MV} $$file $$file.old; \
73: ${SED} -e 's/roken.h/arla-roken.h/g' $$file.old > $$file; \
74: }
75: @${ECHO} "."
76: @${MV} ${WRKSRC}/lib/roken/roken.h ${WRKSRC}/lib/roken/arla-roken.h
77: @${MV} ${WRKSRC}/lib/roken ${WRKSRC}/lib/arla-roken
78:
79: do-configure:
80: # *Sometimes* it's bad to try to be too smart:
81: # pkgsrc's LDFLAGS choice is completely inadequate for arla, since
82: # arla's configure uses $LDFLAGS as flags for $LD, whereas
83: # pkgsrc's LDFLAGS are conceived to be used with $CC
84: # So, basically, bsd.pkg.mk sets LDFLAGS=-Wl,-R${LOCALBASE}
85: # while arla expects LDFLAGS=-R${LOCALBASE}
86: @(LDFLAGS= ; cd ${WRKSRC}; ./configure ${CONFIGURE_ARGS})
87:
88: pre-install:
89: @${SED} -e 's|@ARLA_CACHE@|${CACHEDIR}|g' \
90: <${PKGDIR}/PLIST \
91: >${PLIST_SRC}
92: @${SED} -e 's|@PREFIX@|${PREFIX}|g' \
93: -e 's|@ARLA_CACHE@|${CACHEDIR}|g' \
94: <${PKGDIR}/MESSAGE \
95: >${MESSAGE_FILE}
96:
97: post-install:
98: @${ECHO} " "
99: @if [ -e ${CACHEDIR} ]; then \
100: ${ECHO} "Arla cache dir (${CACHEDIR}) already exists"; \
101: else \
102: ${ECHO} "Creating arla cache directory ${CACHEDIR}"; \
103: ${MKDIR} ${CACHEDIR}; \
104: ${CHMOD} 700 ${CACHEDIR}; \
105: ${CHOWN} root ${CACHEDIR}; \
106: fi
107: @if [ -e /sbin/mount_xfs ]; then \
108: ${ECHO} "/sbin/mount_xfs already exists"; \
109: else \
110: ${ECHO} "Creating /sbin/mount_xfs"; \
111: ${LN} -s ${PREFIX}/bin/mount_xfs /sbin/mount_xfs; \
112: fi
113: @-${MKDIR} ${PREFIX}/share/examples/arla
114: @${SED} -e 's|@PREFIX@|${PREFIX}|g' \
115: < ${FILESDIR}/lkm.conf \
116: > ${PREFIX}/share/examples/arla/lkm.conf
117: @${INSTALL} -c -o root -g wheel -m 444 \
1.3 wennmach 118: ${FILESDIR}/services ${PREFIX}/share/examples/arla
1.1 wennmach 119: @${INSTALL} -c -o root -g wheel -m 444 \
120: ${FILESDIR}/fstab ${PREFIX}/share/examples/arla
121: @${SED} -e 's|@PREFIX@|${PREFIX}|' ${FILESDIR}/arlad.sh \
122: > ${PREFIX}/etc/rc.d/arlad.sh
123: @${ECHO} " "
124:
125: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>