Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 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://CVE-2016-3947.patch \ |
| 23 | " |
| 24 | |
| 25 | LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ |
| 26 | file://errors/COPYRIGHT;md5=0fed8f1462f6fdbc62bb431bcb618f46 \ |
| 27 | " |
| 28 | SRC_URI[md5sum] = "06e43abc67aedcc3903a2780de20a3ed" |
| 29 | SRC_URI[sha256sum] = "b7dcec8c5cb7f5687aff4256a7522f670c310a350cc9e9c0f29f3fd9cf88d017" |
| 30 | |
| 31 | DEPENDS = "libtool krb5 openldap db cyrus-sasl" |
| 32 | |
| 33 | inherit autotools useradd ptest |
| 34 | |
| 35 | USERADD_PACKAGES = "${PN}" |
| 36 | USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" |
| 37 | |
| 38 | PACKAGECONFIG ??= "${@base_contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \ |
| 39 | ${@base_contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \ |
| 40 | " |
| 41 | PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" |
| 42 | PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," |
| 43 | |
| 44 | BASIC_AUTH = "DB SASL LDAP NIS" |
| 45 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
| 46 | BASIC_AUTH += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" |
| 47 | |
| 48 | EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}'" |
| 49 | export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" |
| 50 | |
| 51 | TESTDIR = "test-suite" |
| 52 | do_compile_ptest() { |
| 53 | oe_runmake -C ${TESTDIR} buildtest-TESTS |
| 54 | } |
| 55 | |
| 56 | do_install_ptest() { |
| 57 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} |
| 58 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} |
| 59 | |
| 60 | # do NOT need to rebuild Makefile itself |
| 61 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile |
| 62 | } |
| 63 | |
| 64 | do_install_append() { |
| 65 | install -d ${D}${sysconfdir}/default/volatiles |
| 66 | install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/volatiles.03_squid |
| 67 | rmdir "${D}${localstatedir}/run/${BPN}" |
| 68 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" |
| 69 | } |
| 70 | |
| 71 | FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" |
| 72 | FILES_${PN}-dbg += "/usr/src/debug" |
| 73 | FILES_${PN}-doc += "${datadir}/*.txt" |
| 74 | |
| 75 | RDEPENDS_${PN} += "perl" |
| 76 | RDEPENDS_${PN}-ptest += "make" |
| 77 | |
| 78 | # http://errors.yoctoproject.org/Errors/Details/35128/ |
| 79 | PNBLACKLIST[squid] ?= "BROKEN: sysroots/qemuarm/usr/include/linux/in.h:28:16: error: redeclaration of 'IPPROTO_IP'" |