1 ################################################################################
5 ################################################################################
8 SAMBA4_SITE
= http
://ftp.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_LIBBSD
),libbsd
) \
18 $(if
$(BR2_PACKAGE_LIBCAP
),libcap
) \
19 $(if
$(BR2_PACKAGE_READLINE
),readline
)
21 ifeq ($(BR2_PACKAGE_ACL
),y
)
22 SAMBA4_CONF_OPTS
+= --with-acl-support
23 SAMBA4_DEPENDENCIES
+= acl
25 SAMBA4_CONF_OPTS
+= --without-acl-support
28 ifeq ($(BR2_PACKAGE_CUPS
),y
)
29 SAMBA4_CONF_ENV
+= CUPS_CONFIG
="$(STAGING_DIR)/usr/bin/cups-config"
30 SAMBA4_CONF_OPTS
+= --enable-cups
31 SAMBA4_DEPENDENCIES
+= cups
33 SAMBA4_CONF_OPTS
+= --disable-cups
36 ifeq ($(BR2_PACKAGE_DBUS
)$(BR2_PACKAGE_AVAHI_DAEMON
),yy
)
37 SAMBA4_CONF_OPTS
+= --enable-avahi
38 SAMBA4_DEPENDENCIES
+= avahi
40 SAMBA4_CONF_OPTS
+= --disable-avahi
43 ifeq ($(BR2_PACKAGE_GAMIN
),y
)
44 SAMBA4_CONF_OPTS
+= --with-fam
45 SAMBA4_DEPENDENCIES
+= gamin
47 SAMBA4_CONF_OPTS
+= --without-fam
50 ifeq ($(BR2_PACKAGE_GETTEXT
),y
)
51 SAMBA4_DEPENDENCIES
+= gettext
53 SAMBA4_CONF_OPTS
+= --without-gettext
56 ifeq ($(BR2_PACKAGE_GNUTLS
),y
)
57 SAMBA4_CONF_OPTS
+= --enable-gnutls
58 SAMBA4_DEPENDENCIES
+= gnutls
60 SAMBA4_CONF_OPTS
+= --disable-gnutls
63 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM
)$(BR2_PACKAGE_NCURSES_TARGET_MENU
)$(BR2_PACKAGE_NCURSES_TARGET_PANEL
),yyy
)
64 SAMBA4_CONF_ENV
+= NCURSES_CONFIG
="$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)"
65 SAMBA4_DEPENDENCIES
+= ncurses
67 SAMBA4_CONF_OPTS
+= --without-regedit
70 # The ctdb tests (cluster) need bash and take up some space
71 # They're normally intended for debugging so remove them
72 define SAMBA4_REMOVE_CTDB_TESTS
73 rm -rf
$(TARGET_DIR
)/usr
/lib
/ctdb-tests
74 rm -rf
$(TARGET_DIR
)/usr
/share
/ctdb-tests
75 rm -f
$(TARGET_DIR
)/usr
/bin
/ctdb_run_
*tests
77 SAMBA4_POST_INSTALL_TARGET_HOOKS
+= SAMBA4_REMOVE_CTDB_TESTS
79 define SAMBA4_CONFIGURE_CMDS
80 cp package
/samba4
/samba4-cache.txt
$(@D
)/cache.txt
;
81 echo
'Checking uname machine type: $(BR2_ARCH)' >>$(@D
)/cache.txt
;
83 PYTHON_CONFIG
="$(STAGING_DIR)/usr/bin/python-config" \
86 $(TARGET_CONFIGURE_OPTS
) \
88 .
/buildtools
/bin
/waf configure \
91 --localstatedir
=/var \
92 --with-libiconv
=$(STAGING_DIR
)/usr \
95 --cross-answers
=$(@D
)/cache.txt \
98 --disable-rpath-install \
102 --disable-glusterfs \
103 --with-cluster-support \
104 --bundled-libraries
='!asn1_compile,!compile_et' \
105 $(SAMBA4_CONF_OPTS
) \
109 define SAMBA4_BUILD_CMDS
110 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
113 define SAMBA4_INSTALL_STAGING_CMDS
114 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(STAGING_DIR
) install
117 define SAMBA4_INSTALL_TARGET_CMDS
118 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(TARGET_DIR
) install
121 ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC
),)
122 SAMBA4_CONF_OPTS
+= --without-ad-dc
125 ifeq ($(BR2_PACKAGE_SAMBA4_ADS
),y
)
126 SAMBA4_CONF_OPTS
+= --with-ads
--with-ldap
--with-shared-modules
=idmap_ad
127 SAMBA4_DEPENDENCIES
+= openldap
129 SAMBA4_CONF_OPTS
+= --without-ads
--without-ldap
132 ifeq ($(BR2_PACKAGE_SAMBA4_SMBTORTURE
),)
133 define SAMBA4_REMOVE_SMBTORTURE
134 rm -f
$(TARGET_DIR
)/usr
/bin
/smbtorture
136 SAMBA4_POST_INSTALL_TARGET_HOOKS
+= SAMBA4_REMOVE_SMBTORTURE
139 define SAMBA4_INSTALL_INIT_SYSV
140 $(INSTALL
) -m
0755 -D package
/samba4
/S91smb \
141 $(TARGET_DIR
)/etc
/init.d
/S91smb
144 define SAMBA4_INSTALL_INIT_SYSTEMD
145 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/nmb.service \
146 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/nmb.service
147 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/smb.service \
148 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/smb.service
149 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/winbind.service \
150 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/winbind.service
151 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
152 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/nmb.service \
153 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/nmb.service
154 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/smb.service \
155 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/smb.service
156 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/winbind.service \
157 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/winbind.service
158 $(INSTALL
) -D
-m
644 $(@D
)/packaging
/systemd
/samba.conf.tmp \
159 $(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/samba.conf
160 printf
"d /var/log/samba 755 root root\n" >>$(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/samba.conf
163 $(eval
$(generic-package
))