diff options
Diffstat (limited to 'meta-networking/recipes-daemons/squid/squid_3.5.28.bb')
| -rw-r--r-- | meta-networking/recipes-daemons/squid/squid_3.5.28.bb | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.28.bb b/meta-networking/recipes-daemons/squid/squid_3.5.28.bb new file mode 100644 index 0000000000..e33c1b7cc2 --- /dev/null +++ b/meta-networking/recipes-daemons/squid/squid_3.5.28.bb | |||
| @@ -0,0 +1,115 @@ | |||
| 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-configure-Check-for-Wno-error-format-truncation-comp.patch \ | ||
| 25 | file://0001-tools.cc-fixed-unused-result-warning.patch \ | ||
| 26 | file://0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch \ | ||
| 27 | file://0002-smblib-fix-buffer-over-read.patch \ | ||
| 28 | " | ||
| 29 | |||
| 30 | SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" | ||
| 31 | |||
| 32 | SRC_URI[md5sum] = "4ae3f6277b3aa6386cb5ad2d954179c2" | ||
| 33 | SRC_URI[sha256sum] = "11971bfe3c13f438e42569ea551206caf68ecaa968305c30f7b422b556ebc7ac" | ||
| 34 | |||
| 35 | LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ | ||
| 36 | file://errors/COPYRIGHT;md5=1c0781e2ecd3051c765d525572defbc7 \ | ||
| 37 | " | ||
| 38 | DEPENDS = "libtool krb5 openldap db cyrus-sasl openssl expat libxml2" | ||
| 39 | |||
| 40 | inherit autotools pkgconfig useradd ptest perlnative | ||
| 41 | |||
| 42 | USERADD_PACKAGES = "${PN}" | ||
| 43 | USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" | ||
| 44 | |||
| 45 | PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \ | ||
| 46 | ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \ | ||
| 47 | ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \ | ||
| 48 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
| 49 | " | ||
| 50 | PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" | ||
| 51 | PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," | ||
| 52 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
| 53 | PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," | ||
| 54 | |||
| 55 | BASIC_AUTH = "DB SASL LDAP" | ||
| 56 | |||
| 57 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
| 58 | BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" | ||
| 59 | |||
| 60 | EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \ | ||
| 61 | --sysconfdir=${sysconfdir}/${BPN} \ | ||
| 62 | --with-logdir=${localstatedir}/log/${BPN} \ | ||
| 63 | 'PERL=${USRBINPATH}/env perl'" | ||
| 64 | |||
| 65 | export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" | ||
| 66 | |||
| 67 | TESTDIR = "test-suite" | ||
| 68 | |||
| 69 | do_configure_prepend() { | ||
| 70 | export SYSROOT=$PKG_CONFIG_SYSROOT_DIR | ||
| 71 | } | ||
| 72 | |||
| 73 | do_compile_ptest() { | ||
| 74 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
| 75 | } | ||
| 76 | |||
| 77 | do_install_ptest() { | ||
| 78 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} | ||
| 79 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} | ||
| 80 | |||
| 81 | # do NOT need to rebuild Makefile itself | ||
| 82 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 83 | |||
| 84 | # Add squid-conf-tests for runtime tests | ||
| 85 | sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \ | ||
| 86 | -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \ | ||
| 87 | -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 88 | |||
| 89 | # Ensure the path for command true is correct | ||
| 90 | sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 91 | } | ||
| 92 | |||
| 93 | do_install_append() { | ||
| 94 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 95 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 96 | echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | ||
| 97 | echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | ||
| 98 | fi | ||
| 99 | |||
| 100 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 101 | install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid | ||
| 102 | |||
| 103 | rmdir "${D}${localstatedir}/run/${BPN}" | ||
| 104 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" | ||
| 105 | |||
| 106 | rmdir "${D}${localstatedir}/log/${BPN}" | ||
| 107 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" | ||
| 108 | } | ||
| 109 | |||
| 110 | FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" | ||
| 111 | FILES_${PN}-dbg += "/usr/src/debug" | ||
| 112 | FILES_${PN}-doc += "${datadir}/*.txt" | ||
| 113 | |||
| 114 | RDEPENDS_${PN} += "perl" | ||
| 115 | RDEPENDS_${PN}-ptest += "make" | ||
