summaryrefslogtreecommitdiff
path: root/package/samba/Makefile
blob: cd051459b4f9d389828c24db45f43d3da0f1784a (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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		samba
PKG_VERSION:=		4.4.5
PKG_RELEASE:=		1
PKG_HASH:=		b876ef2e63f66265490e80a122e66ef2d7616112b839df68f56ac2e1ce17a7bd
PKG_DESCR:=		file and print server
PKG_SECTION:=		net/fs
PKG_BUILDDEP:=		gettext-tiny util-linux popt python2 gnutls
PKG_BUILDDEP+=		heimdal-host python2-host libtirpc
PKG_DEPENDS:=		libuuid libpopt libgnutls libtirpc
PKG_NEEDS:=		threads rt
PKG_URL:=		http://www.samba.org/
PKG_SITES:=		http://samba.org/samba/ftp/stable/

DISTFILES:=		$(PKG_NAME)-$(PKG_VERSION).tar.gz

include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call PKG_template,SAMBA,samba,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))

XAKE_ENV+=		V=1
CONFIG_STYLE:=		minimal
CONFIGURE_ARGS+=	--enable-fhs \
			--prefix=/usr \
			--sysconfdir=/etc \
			--localstatedir=/var \
			--with-privatedir=/etc/samba \
			--cross-compile \
			--cross-answers=$(WRKSRC)/cache.txt \
			--hostcc=gcc \
			--without-pie \
			--without-relro \
			--without-systemd \
			--without-automount \
			--without-pam \
			--without-fam \
			--without-dmapi \
			--without-ads \
			--without-ldap \
			--without-acl-support \
			--disable-glusterfs \
			--disable-iprint \
			--disable-cups \
			--disable-avahi \
			--disable-rpath \
			--bundled-libraries='com_err,!asn1_compile,!compile_et' \
			--disable-rpath-install
CONFIGURE_ENV+=		PYTHON_CONFIG="$(STAGING_TARGET_DIR)/usr/bin/python-config" \
			python_LDFLAGS="" \
			python_LIBDIR=""

pre-configure:
	$(CP) ./files/cache.txt $(WRKSRC)
	echo 'Checking uname machine type: "$(ADK_TARGET_ARCH)"' >>$(WRKSRC)/cache.txt

samba-install:
	$(INSTALL_DIR) $(IDIR_SAMBA)/etc/samba
	$(INSTALL_DIR) $(IDIR_SAMBA)/usr/{sbin,bin,lib}
	$(INSTALL_DATA) ./files/smb.conf $(IDIR_SAMBA)/etc/samba
	$(INSTALL_BIN) $(WRKINST)/usr/sbin/{nmbd,smbd} \
		$(IDIR_SAMBA)/usr/sbin
	$(INSTALL_BIN) $(WRKINST)/usr/bin/{smbpasswd,smbclient} \
		$(IDIR_SAMBA)/usr/bin
	$(CP) $(WRKINST)/usr/lib/lib*.so* \
		$(IDIR_SAMBA)/usr/lib
	$(CP) $(WRKINST)/usr/lib/samba \
		$(IDIR_SAMBA)/usr/lib

include $(ADK_TOPDIR)/mk/pkg-bottom.mk