blob: ee88122acc8d8e8578a675aa9e361a2a55dc093a (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# $NetBSD: Makefile,v 1.37 2005/07/08 16:47:42 kristerw Exp $
DISTNAME= samba-${SAMBA_VERSION}-ja-${JA_VERSION}
PKGNAME= ja-samba-${SAMBA_VERSION}.${JA_PKG_VERSION}
CATEGORIES= net
MASTER_SITES= ${JA_SAMBA_MASTER_SITES:S/$/beta\//}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= tech-pkg-ja@jp.NetBSD.org
HOMEPAGE= http://www.jp.samba.org/project/samba-ja/index.html.en
COMMENT= Samba supporting I18N swat and L10N for Japanese
CONFLICTS+= samba-[0-9]* pam-smbpass-[0-9]* tdb-[0-9]* winbind-[0-9]*
WRKSRC?= ${WRKDIR}/${DISTNAME}/source
GNU_CONFIGURE= yes
SAMBA_VERSION= 2.2.12
JA_VERSION= 1.0beta1
JA_PKG_VERSION= 0.9.1
.include "../../mk/bsd.prefs.mk"
PKG_SYSCONFSUBDIR?= samba
PKG_SYSCONFVAR= samba
SAMBA_USER?= samba
SAMBA_GROUP?= samba
SAMBA_ETCDIR?= ${PKG_SYSCONFDIR}
SAMBA_LIBDIR?= ${PREFIX}/lib/samba
SAMBA_LOCKDIR?= ${SAMBA_VARDIR}/db/samba
SAMBA_LOGDIR?= ${SAMBA_VARDIR}/log
SAMBA_PIDDIR?= ${SAMBA_VARDIR}/run
SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
SAMBA_VARDIR?= ${VARBASE}
FILES_SUBST= SAMBA_ETCDIR=${SAMBA_ETCDIR}
FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR}
FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR}
FILES_SUBST+= SAMBA_PIDDIR=${SAMBA_PIDDIR}
FILES_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
FILES_SUBST+= SAMBA_VARDIR=${SAMBA_VARDIR}
CONFIGURE_ARGS+= --with-configdir=${SAMBA_ETCDIR}
CONFIGURE_ARGS+= --with-libdir=${SAMBA_LIBDIR}
CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR}
CONFIGURE_ARGS+= --with-logfilebase=${SAMBA_LOGDIR}
CONFIGURE_ARGS+= --with-piddir=${SAMBA_PIDDIR}
CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE}
CONFIGURE_ARGS+= --localstatedir=${SAMBA_VARDIR}
CONFIGURE_ARGS+= --with-codepagedir=${SAMBA_LIBDIR}/codepages
CONFIGURE_ARGS+= --with-swatdir=${PREFIX}/share/samba/swat
CONFIGURE_ARGS+= --with-libsmbclient
CONFIGURE_ARGS+= --with-msdfs
CONFIGURE_ARGS+= --with-winbind
CONFIGURE_ARGS+= --with-i18n-swat
.include "../../converters/libiconv/buildlink3.mk"
CONFIGURE_ARGS+= --with-libiconv=${BUILDLINK_PREFIX.iconv}
## Force the use of the included gettext library this doesn't seem to link
## with the gettext-lib package.
##
CONFIGURE_ARGS+= --with-included-gettext
USE_GNU_READLINE= yes # uses rl_event_hook interface to GNU readline
.include "../../devel/readline/buildlink3.mk"
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
CONFIGURE_ENV+= ac_cv_lib_curses_tgetent=no
.include "options.mk"
# mktemp is useful for the replacement adduser script, but don't require
# a full dependency since it's not actually needed by samba.
#
USE_TOOLS+= mktemp
#
# findsmb script use perl
#
USE_TOOLS+= perl
.if !defined(PWD_MKDB)
PWD_MKDB!= ${TYPE} pwd_mkdb 2>&1 | \
${AWK} '/not found/ { print "pwd_mkdb"; exit } { print $$3 }'
MAKEFLAGS+= PWD_MKDB=${PWD_MKDB:Q}
.endif
FILES_SUBST+= MKTEMP=${MKTEMP:Q}
FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
.if !empty(NSS_WINBIND)
PLIST_SUBST+= NSS_WINBIND=lib/${NSS_WINBIND}
.else
PLIST_SUBST+= NSS_WINBIND="@comment no NSS winbind module"
.endif
.if !empty(NSS_WINS)
PLIST_SUBST+= NSS_WINS=lib/${NSS_WINS}
.else
PLIST_SUBST+= NSS_WINS="@comment no NSS WINS module"
.endif
DOCDIR= ${PREFIX}/share/doc/samba
EGDIR= ${PREFIX}/share/examples/samba
USE_PKGLOCALEDIR= YES
USE_LANGUAGE= c
USE_LIBTOOL= yes
SHLIBTOOL_OVERRIDE= libtool
INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
USE_PKGINSTALL= YES
CONF_FILES= ${EGDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
SUPPORT_FILES_PERMS+= ${EGDIR}/adduser.sh ${SAMBA_ETCDIR}/adduser \
${ROOT_USER} ${ROOT_GROUP} 0555
SUPPORT_FILES_PERMS+= ${EGDIR}/deluser.sh ${SAMBA_ETCDIR}/deluser \
${ROOT_USER} ${ROOT_GROUP} 0555
#SUPPORT_FILES_PERMS= ${SMBPASSWD_FILE}
MAKE_DIRS= ${SAMBA_VARDIR} ${SAMBA_LOGDIR} ${SAMBA_PIDDIR}
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_LOCKDIR}
OWN_DIRS_PERMS= ${SAMBA_PRIVATE} ${ROOT_USER} ${ROOT_GROUP} 0500
RCD_SCRIPTS= samba nmbd smbd winbindd
PKG_GROUPS= ${SAMBA_GROUP}
PKG_USERS= ${SAMBA_USER}:${SAMBA_GROUP}::Samba\\ pseudo-user
BUILD_DEFS+= SAMBA_USER SAMBA_GROUP
MAKE_FLAGS= CFLAGS='-DGUEST_ACCOUNT=\"${SAMBA_USER:Q}\"'
INSTALL_LIBRARY= \
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
MESSAGE_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
MESSAGE_SUBST+= ROOT_GROUP=${ROOT_GROUP}
MESSAGE_SUBST+= ROOT_USER=${ROOT_USER}
# mktemp is useful for the replacement adduser script, but don't require
# a full dependency since it's not actually needed by samba.
#
USE_TOOLS+= mktemp
.if !defined(PWD_MKDB)
PWD_MKDB!= ${TYPE} pwd_mkdb 2>&1 | \
${AWK} '/not found/ { print "pwd_mkdb"; exit } { print $$3 }'
MAKEFLAGS+= PWD_MKDB=${PWD_MKDB:Q}
.endif
FILES_SUBST+= MKTEMP=${MKTEMP:Q}
FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
REPLACE_PERL= script/findsmb.in
# Remove irrelevant files for this package.
post-extract:
${FIND} ${WRKDIR}/${DISTNAME} -name ".cvsignore" -print | \
${XARGS} ${RM} -f
${RM} -r ${WRKDIR}/${DISTNAME}/docs/textdocs/outdated
${RM} -r ${WRKDIR}/${DISTNAME}/examples/VFS
${RM} -r ${WRKDIR}/${DISTNAME}/examples/appliance
${RM} -r ${WRKDIR}/${DISTNAME}/examples/autofs
${RM} -r ${WRKDIR}/${DISTNAME}/examples/dce-dfs
${RM} -r ${WRKDIR}/${DISTNAME}/examples/libsmbclient
${RM} -r ${WRKDIR}/${DISTNAME}/examples/smbchartool
${RM} -r ${WRKDIR}/${DISTNAME}/examples/svr4-startup
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/adduser.sh > ${WRKDIR}/adduser.sh
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/deluser.sh > ${WRKDIR}/deluser.sh
post-install:
-cd ${PREFIX}/lib && ${LN} -s libsmbclient.so libsmbclient.so.0
.if !empty(NSS_WINBIND)
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/${NSS_WINBIND} ${PREFIX}/lib
.endif
.if !empty(PKG_OPTIONS:Mpam)
${INSTALL_LIB_DIR} ${PREFIX}/lib/security
${INSTALL_LIBRARY} ${WRKSRC}/bin/pam_smbpass.so ${PREFIX}/lib/security
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/pam_winbind.so \
${PREFIX}/lib/security
.endif
${INSTALL_DATA_DIR} ${DOCDIR}
cd ${WRKDIR}/${DISTNAME}/docs; \
for f in announce textdocs/* Registry/*.reg; do \
${INSTALL_DATA} $${f} ${DOCDIR}; \
done
# Install Samba examples.
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_SCRIPT} ${WRKDIR}/adduser.sh ${EGDIR}/adduser.sh
${INSTALL_SCRIPT} ${WRKDIR}/deluser.sh ${EGDIR}/deluser.sh
${CP} -R ${WRKDIR}/${DISTNAME}/examples/* ${EGDIR}
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EGDIR}
${CHMOD} -R ugo-w ${EGDIR}
${INSTALL_SCRIPT} ${WRKSRC}/script/convert_smbpasswd \
${EGDIR}/misc
${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \
${PREFIX}/sbin/mksmbpasswd
.include "../../mk/bsd.pkg.mk"
|