Home
About
Projects
Articles
Resources
Music

MinGW SquidGuard

  1. Don't use cygwin special
  2. Get minimal install of MinGW and MSYS, using automated installers, available at http://sourceforge.net/projects/mingw/files/

    • Automated MinGW Installer/MinGW 5.1.6/MinGW-5.1.6.exe
    • MSYS Base System/msys-1.0.11/MSYS-1.0.11.exe
  3. Download the following additional packages

    • mingw-libgnurx-2.5.1-dev.tar.gz from MinGW User Contributed file area
    • MSYS bison, flex, and regex dll packages
  4. Fire up an msys shell and extract the packages

    tar xf mingw-libgnurx-2.5.1-dev.tar.gz -C /
    lzma -d -c < bison-2.4.1-1-msys-1.0.11-bin.tar.lzma.tar | tar x -C /
    lzma -d -c < flex-2.5.35-1-msys-1.0.11-bin.tar.lzma.tar | tar x -C /
    lzma -d -c < libregex-1.20090805-1-msys-1.0.11-dll-1.tar.lzma.tar | tar x -C /
  5. Download BerkeleyDB from Oracle, extract, and build:

    tar xf db-4.5.20.tar.gz
    cd db-4.5.20/build_unix
    ../dist/configure --enable-mingw LIBCSO_LIBS=-lwsock32
    make
    make install
  6. Download SquidGuard source from here. Don't use source from squidguard.org; that's a different fork of the project which doesn't support win32 platform. Extract and build:

    tar xf squidGuard-1.3.0.tar.gz
    cd squidGuard-1.3.0
    export CFLAGS="-I/usr/local/include -I/usr/include"
    export CXXFLAGS="$CFLAGS"
    export LDFLAGS="-Wl,--enable-runtime-pseudo-reloc -L/usr/local/lib -L/usr/lib"
    export LIBS="-lregex -lwsock32"
    ./configure --with-db=/usr/local/BerkeleyDB.4.5
    make
  7. Enjoy!