diff options
Diffstat (limited to 'meta-networking/recipes-daemons/squid/squid_3.5.26.bb')
| -rw-r--r-- | meta-networking/recipes-daemons/squid/squid_3.5.26.bb | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb new file mode 100644 index 0000000000..e1b4c06dcf --- /dev/null +++ b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" | ||
| 2 | DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ | ||
| 3 | Squid offers a rich access control, authorization and logging environment to \ | ||
| 4 | develop web proxy and content serving applications. \ | ||
| 5 | Squid offers a rich set of traffic optimization options, most of which are \ | ||
| 6 | enabled by default for simpler installation and high performance. \ | ||
| 7 | " | ||
| 8 | HOMEPAGE = "http://www.squid-cache.org" | ||
| 9 | SECTION = "web" | ||
| 10 | LICENSE = "GPLv2+" | ||
| 11 | |||
| 12 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" | ||
| 13 | MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
| 14 | |||
| 15 | SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \ | ||
| 16 | file://Set-up-for-cross-compilation.patch \ | ||
| 17 | file://Skip-AC_RUN_IFELSE-tests.patch \ | ||
| 18 | file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ | ||
| 19 | file://squid-use-serial-tests-config-needed-by-ptest.patch \ | ||
| 20 | file://run-ptest \ | ||
| 21 | file://volatiles.03_squid \ | ||
| 22 | file://set_sysroot_patch.patch \ | ||
| 23 | file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ | ||
| 24 | file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \ | ||
| 25 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ | ||
| 26 | file://gcc7-fixes.patch \ | ||
| 27 | " | ||
| 28 | SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b" | ||
| 29 | SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2" | ||
| 30 | |||
| 31 | LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ | ||
| 32 | file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \ | ||
| 33 | " | ||
| 34 | DEPENDS = "libtool krb5 openldap db cyrus-sasl" | ||
| 35 | |||
| 36 | inherit autotools useradd ptest | ||
| 37 | |||
| 38 | USERADD_PACKAGES = "${PN}" | ||
| 39 | USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" | ||
| 40 | |||
| 41 | PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \ | ||
| 42 | ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \ | ||
| 43 | ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \ | ||
| 44 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
| 45 | " | ||
| 46 | PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" | ||
| 47 | PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," | ||
| 48 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
| 49 | |||
| 50 | BASIC_AUTH = "DB SASL LDAP" | ||
| 51 | BASIC_AUTH_append_libc-glibc = " NIS" | ||
| 52 | |||
| 53 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
| 54 | BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" | ||
| 55 | |||
| 56 | EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' --sysconfdir=${sysconfdir}/${BPN} --with-logdir=${localstatedir}/log/${BPN}" | ||
| 57 | |||
| 58 | export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" | ||
| 59 | |||
| 60 | TESTDIR = "test-suite" | ||
| 61 | |||
| 62 | do_configure_prepend() { | ||
| 63 | export SYSROOT=$PKG_CONFIG_SYSROOT_DIR | ||
| 64 | } | ||
| 65 | |||
| 66 | do_compile_ptest() { | ||
| 67 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
| 68 | } | ||
| 69 | |||
| 70 | do_install_ptest() { | ||
| 71 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} | ||
| 72 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} | ||
| 73 | |||
| 74 | # do NOT need to rebuild Makefile itself | ||
| 75 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 76 | |||
| 77 | # Add squid-conf-tests for runtime tests | ||
| 78 | sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \ | ||
| 79 | -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \ | ||
| 80 | -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 81 | |||
| 82 | # Ensure the path for command true is correct | ||
| 83 | sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 84 | } | ||
| 85 | |||
| 86 | do_install_append() { | ||
| 87 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 88 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 89 | echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | ||
| 90 | echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | ||
| 91 | fi | ||
| 92 | |||
| 93 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 94 | install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid | ||
| 95 | |||
| 96 | rmdir "${D}${localstatedir}/run/${BPN}" | ||
| 97 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" | ||
| 98 | |||
| 99 | rmdir "${D}${localstatedir}/log/${BPN}" | ||
| 100 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" | ||
| 101 | } | ||
| 102 | |||
| 103 | FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" | ||
| 104 | FILES_${PN}-dbg += "/usr/src/debug" | ||
| 105 | FILES_${PN}-doc += "${datadir}/*.txt" | ||
| 106 | |||
| 107 | RDEPENDS_${PN} += "perl" | ||
| 108 | RDEPENDS_${PN}-ptest += "make" | ||
