blob: f114881216295cb0b79fa4aea507817d333db326 (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# $NetBSD: Makefile,v 1.45 2010/03/07 22:29:20 jmmv Exp $
#
DISTNAME= monotone-server-0.46
PKGREVISION= 1
CATEGORIES= devel scm
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= jmmv@NetBSD.org
HOMEPAGE= http://monotone.ca/
COMMENT= Simplifies the configuration of a dedicated Monotone server
DEPENDS+= monotone>=0.46:../../devel/monotone
PKG_DESTDIR_SUPPORT= user-destdir
NO_BUILD= yes
WRKSRC= ${WRKDIR}
RCD_SCRIPTS= monotone
PKG_SYSCONFSUBDIR= monotone-server
OWN_DIRS_PERMS= ${PKG_SYSCONFDIR}/keys \
${MONOTONE_USER} ${MONOTONE_GROUP} 700
EXAMPLEDIR= ${PREFIX}/share/examples/monotone-server
CONF_FILES_PERMS= ${EXAMPLEDIR}/hooks.conf \
${PKG_SYSCONFDIR}/hooks.conf \
${MONOTONE_USER} ${MONOTONE_GROUP} 600
CONF_FILES_PERMS+= ${EXAMPLEDIR}/read-permissions \
${PKG_SYSCONFDIR}/read-permissions \
${MONOTONE_USER} ${MONOTONE_GROUP} 600
CONF_FILES_PERMS+= ${EXAMPLEDIR}/write-permissions \
${PKG_SYSCONFDIR}/write-permissions \
${MONOTONE_USER} ${MONOTONE_GROUP} 600
PKG_GROUPS= ${MONOTONE_GROUP}
PKG_USERS= ${MONOTONE_USER}:${MONOTONE_GROUP}
PKG_GROUPS_VARS+= MONOTONE_GROUP
PKG_USERS_VARS+= MONOTONE_USER
.include "../../mk/bsd.prefs.mk"
PKG_GECOS.${MONOTONE_USER}= Monotone dedicated server
PKG_HOME.${MONOTONE_USER}= ${VARBASE}/monotone
PKG_SHELL.${MONOTONE_USER}= ${SH}
SUBST_CLASSES+= vars
SUBST_STAGE.vars= do-configure
SUBST_MESSAGE.vars= Configuring sources.
SUBST_FILES.vars= *
SUBST_SED.vars= -e 's|@MONOTONE@|${PREFIX}/bin/mtn|g'
SUBST_SED.vars+= -e 's|@MONOTONE_GROUP@|${MONOTONE_GROUP}|g'
SUBST_SED.vars+= -e 's|@MONOTONE_USER@|${MONOTONE_USER}|g'
SUBST_SED.vars+= -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
SUBST_SED.vars+= -e 's|@SH@|${SH}|g'
SUBST_SED.vars+= -e 's|@VARBASE@|${VARBASE}|g'
FILES_SUBST+= MONOTONE_GROUP=${MONOTONE_GROUP:Q}
FILES_SUBST+= MONOTONE_USER=${MONOTONE_USER:Q}
INSTALLATION_DIRS= sbin
do-extract:
.for f in hooks.conf monotone-server-init.sh read-permissions \
write-permissions
${CP} ${FILESDIR}/${f} ${WRKSRC}
.endfor
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/monotone-server-init.sh \
${DESTDIR}${PREFIX}/sbin/monotone-server-init
${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/hooks.conf ${DESTDIR}${EXAMPLEDIR}/hooks.conf
${INSTALL_DATA} ${WRKSRC}/read-permissions \
${DESTDIR}${EXAMPLEDIR}/read-permissions
${INSTALL_DATA} ${WRKSRC}/write-permissions \
${DESTDIR}${EXAMPLEDIR}/write-permissions
.include "../../mk/bsd.pkg.mk"
|