Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Kernel based automounter for linux" |
| 2 | SECTION = "utils" |
| 3 | LICENSE = "GPL-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" |
| 5 | |
| 6 | DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2" |
| 7 | |
| 8 | CFLAGS += "-I${STAGING_INCDIR}/tirpc" |
| 9 | |
| 10 | inherit autotools-brokensep systemd update-rc.d pkgconfig |
| 11 | |
| 12 | SRC_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 \ |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 28 | file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | " |
| 30 | |
| 31 | |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 32 | SRC_URI[md5sum] = "e6800e0afd6009ecdff148088c564050" |
| 33 | SRC_URI[sha256sum] = "82094cad44f4e5c4f93eff2789cd66b57d7ab3fa646b7722d97608571001e694" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | |
| 35 | UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" |
| 36 | |
| 37 | INITSCRIPT_NAME = "autofs" |
| 38 | INITSCRIPT_PARAMS = "defaults" |
| 39 | |
| 40 | # FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS |
| 41 | #CFLAGS += "${LDFLAGS}" |
| 42 | |
| 43 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" |
| 44 | |
| 45 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
| 46 | |
| 47 | EXTRA_OEMAKE = "DONTSTRIP=1" |
| 48 | EXTRA_OECONF += "--disable-mount-locking \ |
| 49 | --enable-ignore-busy --with-openldap=no \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 50 | --with-confdir=${sysconfdir}/default \ |
| 51 | --with-fifodir=/run \ |
| 52 | --with-flagdir=/run \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | --with-sasl=no --with-libtirpc \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 54 | --with-mapdir=${sysconfdir} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 55 | --with-path=${STAGING_BINDIR_NATIVE} \ |
| 56 | --with-fifodir=${localstatedir}/run \ |
| 57 | --with-flagdir=${localstatedir}/run \ |
| 58 | " |
| 59 | CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ |
| 60 | ac_cv_path_RPCGEN=rpcgen \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 61 | initdir=${INIT_D_DIR} \ |
| 62 | piddir=/run \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | " |
| 64 | |
| 65 | do_configure_prepend () { |
| 66 | if [ ! -e ${S}/acinclude.m4 ]; then |
| 67 | cp ${S}/aclocal.m4 ${S}/acinclude.m4 |
| 68 | fi |
| 69 | cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . |
| 70 | } |
| 71 | |
| 72 | do_install_append () { |
| 73 | # samples have been removed from SUBDIRS from 5.1.5, need to install separately |
| 74 | oe_runmake 'DESTDIR=${D}' install_samples |
| 75 | |
| 76 | if [ -d ${D}/run ]; then |
| 77 | rmdir ${D}/run |
| 78 | fi |
| 79 | if [ -d ${D}${localstatedir}/run ]; then |
| 80 | rmdir ${D}${localstatedir}/run |
| 81 | fi |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 82 | # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. |
| 83 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 84 | install -d -m 755 ${D}${INIT_D_DIR} |
| 85 | install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs |
| 86 | fi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 87 | } |
| 88 | SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" |
| 89 | |
| 90 | INSANE_SKIP_${PN} = "dev-so" |
| 91 | |
| 92 | RPROVIDES_${PN} += "${PN}-systemd" |
| 93 | RREPLACES_${PN} += "${PN}-systemd" |
| 94 | RCONFLICTS_${PN} += "${PN}-systemd" |
| 95 | SYSTEMD_SERVICE_${PN} = "autofs.service" |
| 96 | |