samba-3.6.25.recipe revision ae94b127
1SUMMARY="Library bits of the samba network filesystem"
2DESCRIPTION="Samba is an free, open source software suite that provides \
3seamless file and print services to SMB/CIFS clients. Samba is freely \
4available, unlike other SMB/CIFS implementations, and allows for \
5interoperability between Linux/Unix servers and Windows-based clients.
6Samba can be run on platforms other than Microsoft Windows, for example, \
7UNIX, Linux, IBM System 390, OpenVMS, and other operating systems. Samba uses \
8the TCP/IP protocol that is installed on the host server. When correctly \
9configured, it allows that host to interact with a Microsoft Windows client \
10or server as if it were a Windows file and print server."
11HOMEPAGE="https://www.samba.org/"
12COPYRIGHT="1992-2015 Anrew Tridgell and the Samba Team"
13LICENSE="GNU GPL v3"
14REVISION="7"
15SOURCE_URI="https://download.samba.org/pub/samba/samba-$portVersion.tar.gz"
16CHECKSUM_SHA256="8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751"
17PATCHES="samba-$portVersion.patchset"
18
19ARCHITECTURES="x86_gcc2 x86 x86_64"
20SECONDARY_ARCHITECTURES="x86_gcc2 x86"
21DISABLE_SOURCE_PACKAGE="yes"
22
23GLOBAL_WRITABLE_FILES="
24	settings/samba directory keep-old
25	"
26
27PROVIDES="
28	samba$secondaryArchSuffix = $portVersion
29	cmd:eventlogadm$secondaryArchSuffix = $portVersion
30	cmd:findsmb$secondaryArchSuffix = $portVersion
31	cmd:net$secondaryArchSuffix = $portVersion
32	cmd:nmbd$secondaryArchSuffix = $portVersion
33	cmd:nmblookup$secondaryArchSuffix = $portVersion
34	cmd:ntlm_auth$secondaryArchSuffix = $portVersion
35	cmd:pdbedit$secondaryArchSuffix = $portVersion
36	cmd:profiles$secondaryArchSuffix = $portVersion
37	cmd:rpcclient$secondaryArchSuffix = $portVersion
38	cmd:sharesec$secondaryArchSuffix = $portVersion
39	cmd:smbcacls$secondaryArchSuffix = $portVersion
40	cmd:smbclient$secondaryArchSuffix = $portVersion
41	cmd:smbcontrol$secondaryArchSuffix = $portVersion
42	cmd:smbcquotas$secondaryArchSuffix = $portVersion
43	cmd:smbd$secondaryArchSuffix = $portVersion
44	cmd:smbget$secondaryArchSuffix = $portVersion
45	cmd:smbpasswd$secondaryArchSuffix = $portVersion
46	cmd:smbspool$secondaryArchSuffix = $portVersion
47	cmd:smbstatus$secondaryArchSuffix = $portVersion
48	cmd:smbta_util$secondaryArchSuffix = $portVersion
49	cmd:smbtar$secondaryArchSuffix = $portVersion
50	cmd:smbtree$secondaryArchSuffix = $portVersion
51#	cmd:swat$secondaryArchSuffix = $portVersion
52	cmd:tdbbackup$secondaryArchSuffix = $portVersion
53	cmd:tdbdump$secondaryArchSuffix = $portVersion
54	cmd:tdbrestore$secondaryArchSuffix = $portVersion
55	cmd:tdbtool$secondaryArchSuffix = $portVersion
56	cmd:testparm$secondaryArchSuffix = $portVersion
57	lib:libnetapi$secondaryArchSuffix = $portVersion
58	lib:libsmbclient$secondaryArchSuffix = $portVersion
59	lib:libsmbsharemodes$secondaryArchSuffix = $portVersion
60	lib:libtalloc$secondaryArchSuffix = $portVersion
61	lib:libtdb$secondaryArchSuffix = $portVersion
62	lib:libtevent$secondaryArchSuffix = $portVersion
63	"
64REQUIRES="
65	haiku$secondaryArchSuffix
66	lib:libiconv$secondaryArchSuffix
67	lib:libintl$secondaryArchSuffix
68	lib:libncurses$secondaryArchSuffix
69	lib:libreadline$secondaryArchSuffix
70	lib:libz$secondaryArchSuffix
71	"
72
73PROVIDES_devel="
74	samba${secondaryArchSuffix}_devel = $portVersion
75	devel:libnetapi$secondaryArchSuffix = $portVersion compat >= 0
76	devel:libsmbclient$secondaryArchSuffix = $portVersion
77	devel:libsmbsharemodes$secondaryArchSuffix = $portVersion compat >= 0
78	devel:libtalloc$secondaryArchSuffix = $portVersion compat >= 2
79	devel:libtdb$secondaryArchSuffix = $portVersion compat >= 1
80	devel:libtevent$secondaryArchSuffix = $portVersion compat >= 0
81	"
82REQUIRES_devel="
83	samba$secondaryArchSuffix == $portVersion base
84	"
85
86BUILD_REQUIRES="
87	haiku${secondaryArchSuffix}_devel
88	devel:libcrypto$secondaryArchSuffix
89	devel:libiconv$secondaryArchSuffix
90	devel:libintl$secondaryArchSuffix
91	devel:libncurses$secondaryArchSuffix
92	devel:libreadline$secondaryArchSuffix
93	devel:libz$secondaryArchSuffix
94	"
95BUILD_PREREQUIRES="
96	cmd:autoconf
97	cmd:find
98	cmd:gcc$secondaryArchSuffix
99	cmd:ld$secondaryArchSuffix
100	cmd:libtoolize$secondaryArchSuffix
101	cmd:make
102	cmd:perl
103	cmd:pkg_config$secondaryArchSuffix
104	cmd:python
105	cmd:which
106	"
107
108BUILD()
109{
110	cd source3
111	sed -i 's/| \*qnx\*/| \*qnx\* | haiku\*/g' configure
112	export LDFLAGS="-lnetwork -lbnetapi"
113	export CFLAGS="-D_BSD_SOURCE"
114
115	runConfigure ./configure --disable-swat --disable-pie \
116		--with-configdir=$settingsDir/samba \
117		--with-privatedir=$settingsDir/samba \
118		--with-localedir=$dataRootDir/locale \
119		--with-logfilebase=$sharedStateDir/log
120
121	sed -i 's/-lpthread//g' Makefile
122	sed -i 's/-lc//g' Makefile
123	make $jobArgs
124}
125
126INSTALL()
127{
128	cd source3
129	make $jobArgs install
130
131	# move headers to the correct location
132	mkdir -p $(dirname $includeDir)
133	mv $prefix/include $includeDir
134
135	# copy sample config file
136	cp ../testdata/samba3/smb.conf $settingsDir/samba
137
138	# copy pkgconfig file
139	mkdir -p $developLibDir/pkgconfig
140	cp pkgconfig/smbclient.pc $developLibDir/pkgconfig
141
142	prepareInstalledDevelLibs \
143		libnetapi \
144		libsmbclient \
145		libsmbsharemodes \
146		libtalloc \
147		libtdb \
148		libtevent
149
150	fixPkgconfig
151	packageEntries devel $developDir
152}
153