summaryrefslogtreecommitdiff
path: root/packages/samba/samba.inc
blob: b5995c1b2e34eaee08a85f172e3e903138c12f00 (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
SECTION = "console/network"
DEPENDS = readline
LICENSE = "GPL"
MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"

PACKAGES =+ "libsmbclient libsmbclient-dev cifs cifs-doc"
FILES_cifs = "${bindir}/mount.cifs"
FILES_cifs-doc = "${docdir}/mount.cifs.8"
FILES_libsmbclient = "${libdir}/libsmbclient.so.*"
FILES_libsmbclient-dev = "${libdir}/libsmbclient.so ${includedir}"

inherit autotools

EXTRA_OECONF='--disable-cups --with-readline=${STAGING_LIBDIR}/.. \
	      --without-ads --without-automount --with-smbmount'
do_configure_prepend () {
	./script/mkversion.sh
	if [ ! -e acinclude.m4 ]; then
		cat aclocal.m4 > acinclude.m4
	fi
}

do_compile () {
	oe_runmake proto_exists
	base_do_compile
	${CC} client/mount.cifs.c -o mount.cifs
}

do_install_append() {
	mv ${D}${libdir}/libsmbclient.so ${D}${libdir}/libsmbclient.so.0
	ln -sf libsmbclient.so.0 ${D}${libdir}/libsmbclient.so
	rm -f ${D}${bindir}/*.old
	rm -f ${D}${sbindir}/*.old
	install -c -m 755 mount.cifs  ${D}${bindir}/mount.cifs
}

do_stage() {
	install -m 0644 include/libsmbclient.h ${STAGING_INCDIR}
	oe_libinstall -C bin -a -so libsmbclient ${STAGING_LIBDIR}
}