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" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | file://no-bash.patch \ |
| 14 | file://cross.patch \ |
| 15 | file://fix_disable_ldap.patch \ |
| 16 | file://autofs-5.0.7-fix-lib-deps.patch \ |
| 17 | file://add-the-needed-stdarg.h.patch \ |
| 18 | file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ |
| 19 | file://force-STRIP-to-emtpy.patch \ |
| 20 | file://remove-bashism.patch \ |
| 21 | file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ |
| 22 | file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ |
| 23 | file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ |
| 24 | file://pkgconfig-libnsl.patch \ |
| 25 | file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ |
| 26 | file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 27 | file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 28 | file://0001-Define-__SWORD_TYPE-if-undefined.patch \ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | file://autofs-5.1.7-use-default-stack-size-for-threads.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | " |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 31 | SRC_URI[sha256sum] = "a18619e5ad18960fe382354eef33f070e57e4e5711d484b010acde080a003312" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | |
| 33 | UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" |
| 34 | |
| 35 | INITSCRIPT_NAME = "autofs" |
| 36 | INITSCRIPT_PARAMS = "defaults" |
| 37 | |
| 38 | # FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS |
| 39 | #CFLAGS += "${LDFLAGS}" |
| 40 | |
| 41 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" |
| 42 | |
| 43 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
| 44 | |
| 45 | EXTRA_OEMAKE = "DONTSTRIP=1" |
| 46 | EXTRA_OECONF += "--disable-mount-locking \ |
| 47 | --enable-ignore-busy --with-openldap=no \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 48 | --with-confdir=${sysconfdir}/default \ |
| 49 | --with-fifodir=/run \ |
| 50 | --with-flagdir=/run \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | --with-sasl=no --with-libtirpc \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 52 | --with-mapdir=${sysconfdir} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | --with-path=${STAGING_BINDIR_NATIVE} \ |
| 54 | --with-fifodir=${localstatedir}/run \ |
| 55 | --with-flagdir=${localstatedir}/run \ |
| 56 | " |
| 57 | CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ |
| 58 | ac_cv_path_RPCGEN=rpcgen \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 59 | initdir=${INIT_D_DIR} \ |
| 60 | piddir=/run \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 61 | " |
| 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | do_configure:prepend () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 64 | if [ ! -e ${S}/acinclude.m4 ]; then |
| 65 | cp ${S}/aclocal.m4 ${S}/acinclude.m4 |
| 66 | fi |
| 67 | cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . |
| 68 | } |
| 69 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 70 | do_install:append () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | # samples have been removed from SUBDIRS from 5.1.5, need to install separately |
| 72 | oe_runmake 'DESTDIR=${D}' install_samples |
| 73 | |
| 74 | if [ -d ${D}/run ]; then |
| 75 | rmdir ${D}/run |
| 76 | fi |
| 77 | if [ -d ${D}${localstatedir}/run ]; then |
| 78 | rmdir ${D}${localstatedir}/run |
| 79 | fi |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 80 | # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. |
| 81 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 82 | install -d -m 755 ${D}${INIT_D_DIR} |
| 83 | install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs |
| 84 | fi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 85 | } |
| 86 | SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" |
| 87 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 88 | # all the libraries are unversioned, so don't pack it on PN-dev |
| 89 | SOLIBS = ".so" |
| 90 | FILES_SOLIBSDEV = "" |
| 91 | # Some symlinks are created in plugins dir e.g. |
| 92 | # mount_nfs4.so -> mount_nfs.so |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | INSANE_SKIP:${PN} = "dev-so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 94 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 95 | RPROVIDES:${PN} += "${PN}-systemd" |
| 96 | RREPLACES:${PN} += "${PN}-systemd" |
| 97 | RCONFLICTS:${PN} += "${PN}-systemd" |
| 98 | SYSTEMD_SERVICE:${PN} = "autofs.service" |