1 ################################################################################
5 ################################################################################
8 SAMBA4_SITE
= https
://download.samba.org
/pub
/samba
/stable
9 SAMBA4_SOURCE
= samba-
$(SAMBA4_VERSION
).
tar.gz
10 SAMBA4_INSTALL_STAGING
= YES
11 SAMBA4_LICENSE
= GPLv3
+
12 SAMBA4_LICENSE_FILES
= COPYING
13 SAMBA4_DEPENDENCIES
= \
14 host-e2fsprogs host-heimdal host-python \
15 e2fsprogs popt python zlib \
16 $(if
$(BR2_PACKAGE_LIBAIO
),libaio
) \
17 $(if
$(BR2_PACKAGE_LIBCAP
),libcap
) \
18 $(if
$(BR2_PACKAGE_READLINE
),readline
)
20 ifeq ($(BR2_PACKAGE_ACL
),y
)
21 SAMBA4_CONF_OPTS
+= --with-acl-support
22 SAMBA4_DEPENDENCIES
+= acl
24 SAMBA4_CONF_OPTS
+= --without-acl-support
27 ifeq ($(BR2_PACKAGE_CUPS
),y
)
28 SAMBA4_CONF_ENV
+= CUPS_CONFIG
="$(STAGING_DIR)/usr/bin/cups-config"
29 SAMBA4_CONF_OPTS
+= --enable-cups
30 SAMBA4_DEPENDENCIES
+= cups
32 SAMBA4_CONF_OPTS
+= --disable-cups
35 ifeq ($(BR2_PACKAGE_DBUS
)$(BR2_PACKAGE_AVAHI_DAEMON
),yy
)
36 SAMBA4_CONF_OPTS
+= --enable-avahi
37 SAMBA4_DEPENDENCIES
+= avahi
39 SAMBA4_CONF_OPTS
+= --disable-avahi
42 ifeq ($(BR2_PACKAGE_GAMIN
),y
)
43 SAMBA4_CONF_OPTS
+= --with-fam
44 SAMBA4_DEPENDENCIES
+= gamin
46 SAMBA4_CONF_OPTS
+= --without-fam
49 ifeq ($(BR2_PACKAGE_GETTEXT
),y
)
50 SAMBA4_DEPENDENCIES
+= gettext
52 SAMBA4_CONF_OPTS
+= --without-gettext
55 ifeq ($(BR2_PACKAGE_GNUTLS
),y
)
56 SAMBA4_CONF_OPTS
+= --enable-gnutls
57 SAMBA4_DEPENDENCIES
+= gnutls
59 SAMBA4_CONF_OPTS
+= --disable-gnutls
62 ifeq ($(BR2_PACKAGE_NCURSES
),y
)
63 SAMBA4_CONF_ENV
+= NCURSES_CONFIG
="$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)"
64 SAMBA4_DEPENDENCIES
+= ncurses
66 SAMBA4_CONF_OPTS
+= --without-regedit
69 # The ctdb tests (cluster) need bash and take up some space
70 # They're normally intended for debugging so remove them
71 define SAMBA4_REMOVE_CTDB_TESTS
72 rm -rf
$(TARGET_DIR
)/usr
/lib
/ctdb-tests
73 rm -rf
$(TARGET_DIR
)/usr
/share
/ctdb-tests
74 rm -f
$(TARGET_DIR
)/usr
/bin
/ctdb_run_
*tests
76 SAMBA4_POST_INSTALL_TARGET_HOOKS
+= SAMBA4_REMOVE_CTDB_TESTS
78 define SAMBA4_CONFIGURE_CMDS
79 cp package
/samba4
/samba4-cache.txt
$(@D
)/cache.txt
;
80 echo
'Checking uname machine type: $(BR2_ARCH)' >>$(@D
)/cache.txt
;
82 PYTHON_CONFIG
="$(STAGING_DIR)/usr/bin/python-config" \
85 $(TARGET_CONFIGURE_OPTS
) \
87 .
/buildtools
/bin
/waf configure \
90 --localstatedir
=/var \
91 --with-libiconv
=$(STAGING_DIR
)/usr \
94 --cross-answers
=$(@D
)/cache.txt \
97 --disable-rpath-install \
101 --disable-glusterfs \
102 --with-cluster-support \
103 --bundled-libraries
='!asn1_compile,!compile_et' \
104 $(SAMBA4_CONF_OPTS
) \
108 define SAMBA4_BUILD_CMDS
109 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
112 define SAMBA4_INSTALL_STAGING_CMDS
113 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(STAGING_DIR
) install
116 define SAMBA4_INSTALL_TARGET_CMDS
117 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(TARGET_DIR
) install
120 ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC
),)
121 SAMBA4_CONF_OPTS
+= --without-ad-dc
124 ifeq ($(BR2_PACKAGE_SAMBA4_ADS
),y
)
125 SAMBA4_CONF_OPTS
+= --with-ads
--with-ldap
--with-shared-modules
=idmap_ad
126 SAMBA4_DEPENDENCIES
+= openldap
128 SAMBA4_CONF_OPTS
+= --without-ads
--without-ldap
131 ifeq ($(BR2_PACKAGE_SAMBA4_SMBTORTURE
),)
132 define SAMBA4_REMOVE_SMBTORTURE
133 rm -f
$(TARGET_DIR
)/usr
/bin
/smbtorture
135 SAMBA4_POST_INSTALL_TARGET_HOOKS
+= SAMBA4_REMOVE_SMBTORTURE
138 define SAMBA4_INSTALL_INIT_SYSV
139 $(INSTALL
) -m
0755 -D package
/samba4
/S91smb \
140 $(TARGET_DIR
)/etc
/init.d
/S91smb
143 define SAMBA4_INSTALL_INIT_SYSTEMD
144 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/nmb.service \
145 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/nmb.service
146 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/smb.service \
147 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/smb.service
148 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/winbind.service \
149 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/winbind.service
150 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
151 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/nmb.service \
152 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/nmb.service
153 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/smb.service \
154 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/smb.service
155 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/winbind.service \
156 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/winbind.service
157 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/samba.conf.tmp \
158 $(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/samba.conf
159 printf
"d /var/log/samba 755 root root\n" >>$(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/samba.conf
162 $(eval
$(generic-package
))