1*4882a593SmuzhiyunSUMMARY = "Kernel based automounter for linux" 2*4882a593SmuzhiyunSECTION = "utils" 3*4882a593SmuzhiyunLICENSE = "GPL-2.0-only" 4*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798" 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunDEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunCFLAGS += "-I${STAGING_INCDIR}/tirpc" 9*4882a593Smuzhiyun 10*4882a593Smuzhiyuninherit autotools-brokensep systemd update-rc.d pkgconfig 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunSRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ 13*4882a593Smuzhiyun file://no-bash.patch \ 14*4882a593Smuzhiyun file://cross.patch \ 15*4882a593Smuzhiyun file://fix_disable_ldap.patch \ 16*4882a593Smuzhiyun file://autofs-5.0.7-fix-lib-deps.patch \ 17*4882a593Smuzhiyun file://add-the-needed-stdarg.h.patch \ 18*4882a593Smuzhiyun file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ 19*4882a593Smuzhiyun file://force-STRIP-to-emtpy.patch \ 20*4882a593Smuzhiyun file://remove-bashism.patch \ 21*4882a593Smuzhiyun file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ 22*4882a593Smuzhiyun file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ 23*4882a593Smuzhiyun file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ 24*4882a593Smuzhiyun file://pkgconfig-libnsl.patch \ 25*4882a593Smuzhiyun file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ 26*4882a593Smuzhiyun file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ 27*4882a593Smuzhiyun file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ 28*4882a593Smuzhiyun file://0001-Define-__SWORD_TYPE-if-undefined.patch \ 29*4882a593Smuzhiyun " 30*4882a593SmuzhiyunSRC_URI[sha256sum] = "0bd401c56f0eb1ca6251344c3a3d70bface3eccf9c67117cd184422c4cace30c" 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunINITSCRIPT_NAME = "autofs" 35*4882a593SmuzhiyunINITSCRIPT_PARAMS = "defaults" 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS 38*4882a593Smuzhiyun#CFLAGS += "${LDFLAGS}" 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunPACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunPACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunEXTRA_OEMAKE = "DONTSTRIP=1" 45*4882a593SmuzhiyunEXTRA_OECONF += "--disable-mount-locking \ 46*4882a593Smuzhiyun --enable-ignore-busy --with-openldap=no \ 47*4882a593Smuzhiyun --with-confdir=${sysconfdir}/default \ 48*4882a593Smuzhiyun --with-fifodir=/run \ 49*4882a593Smuzhiyun --with-flagdir=/run \ 50*4882a593Smuzhiyun --with-sasl=no --with-libtirpc \ 51*4882a593Smuzhiyun --with-mapdir=${sysconfdir} \ 52*4882a593Smuzhiyun --with-path=${STAGING_BINDIR_NATIVE} \ 53*4882a593Smuzhiyun --with-fifodir=${localstatedir}/run \ 54*4882a593Smuzhiyun --with-flagdir=${localstatedir}/run \ 55*4882a593Smuzhiyun" 56*4882a593SmuzhiyunCACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ 57*4882a593Smuzhiyun ac_cv_path_RPCGEN=rpcgen \ 58*4882a593Smuzhiyun initdir=${INIT_D_DIR} \ 59*4882a593Smuzhiyun piddir=/run \ 60*4882a593Smuzhiyun" 61*4882a593Smuzhiyun 62*4882a593Smuzhiyundo_configure:prepend () { 63*4882a593Smuzhiyun if [ ! -e ${S}/acinclude.m4 ]; then 64*4882a593Smuzhiyun cp ${S}/aclocal.m4 ${S}/acinclude.m4 65*4882a593Smuzhiyun fi 66*4882a593Smuzhiyun cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . 67*4882a593Smuzhiyun} 68*4882a593Smuzhiyun 69*4882a593Smuzhiyundo_install:append () { 70*4882a593Smuzhiyun # samples have been removed from SUBDIRS from 5.1.5, need to install separately 71*4882a593Smuzhiyun oe_runmake 'DESTDIR=${D}' install_samples 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun if [ -d ${D}/run ]; then 74*4882a593Smuzhiyun rmdir ${D}/run 75*4882a593Smuzhiyun fi 76*4882a593Smuzhiyun if [ -d ${D}${localstatedir}/run ]; then 77*4882a593Smuzhiyun rmdir ${D}${localstatedir}/run 78*4882a593Smuzhiyun fi 79*4882a593Smuzhiyun # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. 80*4882a593Smuzhiyun if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 81*4882a593Smuzhiyun install -d -m 755 ${D}${INIT_D_DIR} 82*4882a593Smuzhiyun install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs 83*4882a593Smuzhiyun fi 84*4882a593Smuzhiyun} 85*4882a593SmuzhiyunSECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun# all the libraries are unversioned, so don't pack it on PN-dev 88*4882a593SmuzhiyunSOLIBS = ".so" 89*4882a593SmuzhiyunFILES_SOLIBSDEV = "" 90*4882a593Smuzhiyun# Some symlinks are created in plugins dir e.g. 91*4882a593Smuzhiyun# mount_nfs4.so -> mount_nfs.so 92*4882a593SmuzhiyunINSANE_SKIP:${PN} = "dev-so" 93*4882a593Smuzhiyun 94*4882a593SmuzhiyunRPROVIDES:${PN} += "${PN}-systemd" 95*4882a593SmuzhiyunRREPLACES:${PN} += "${PN}-systemd" 96*4882a593SmuzhiyunRCONFLICTS:${PN} += "${PN}-systemd" 97*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "autofs.service" 98