blob: 9e43549e83c7bc82261b55b40731fa116b7d1975 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Kernel based automounter for linux"
2SECTION = "utils"
3LICENSE = "GPL-2.0"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
5
6DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2"
7
8CFLAGS += "-I${STAGING_INCDIR}/tirpc"
9
10inherit autotools-brokensep systemd update-rc.d pkgconfig
11
12SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
13 file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \
14 file://no-bash.patch \
15 file://cross.patch \
16 file://fix_disable_ldap.patch \
17 file://autofs-5.0.7-fix-lib-deps.patch \
18 file://add-the-needed-stdarg.h.patch \
19 file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \
20 file://force-STRIP-to-emtpy.patch \
21 file://remove-bashism.patch \
22 file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
23 file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
24 file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
25 file://pkgconfig-libnsl.patch \
26 file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \
27 file://0001-Do-not-hardcode-path-for-pkg.m4.patch \
28 "
29
30
31SRC_URI[md5sum] = "03b13168ec7bd66a6f2d5f6fea705eee"
32SRC_URI[sha256sum] = "86a8e56ea9d72bb53ff8cdfeefb5cafe983592c6b0178fb99c4a731e59879181"
33
34UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/"
35
36INITSCRIPT_NAME = "autofs"
37INITSCRIPT_PARAMS = "defaults"
38
39# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS
40#CFLAGS += "${LDFLAGS}"
41
42PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd"
43
44PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
45
46EXTRA_OEMAKE = "DONTSTRIP=1"
47EXTRA_OECONF += "--disable-mount-locking \
48 --enable-ignore-busy --with-openldap=no \
49 --with-sasl=no --with-libtirpc \
50 --with-path=${STAGING_BINDIR_NATIVE} \
51 --with-fifodir=${localstatedir}/run \
52 --with-flagdir=${localstatedir}/run \
53"
54CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \
55 ac_cv_path_RPCGEN=rpcgen \
56"
57
58do_configure_prepend () {
59 if [ ! -e ${S}/acinclude.m4 ]; then
60 cp ${S}/aclocal.m4 ${S}/acinclude.m4
61 fi
62 cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 .
63}
64
65do_install_append () {
66 # samples have been removed from SUBDIRS from 5.1.5, need to install separately
67 oe_runmake 'DESTDIR=${D}' install_samples
68
69 if [ -d ${D}/run ]; then
70 rmdir ${D}/run
71 fi
72 if [ -d ${D}${localstatedir}/run ]; then
73 rmdir ${D}${localstatedir}/run
74 fi
75}
76SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
77
78INSANE_SKIP_${PN} = "dev-so"
79
80RPROVIDES_${PN} += "${PN}-systemd"
81RREPLACES_${PN} += "${PN}-systemd"
82RCONFLICTS_${PN} += "${PN}-systemd"
83SYSTEMD_SERVICE_${PN} = "autofs.service"
84