nagios-plugins: build check_radius needs libradius
[omd.git] / packages / gearmand / Makefile
blobdbab6898afca89ae51d2e5e823bc5a15bc884673
1 include ../../Makefile.omd
3 NAME = gearmand
4 VERSION = 0.33
5 DIR = gearmand-$(VERSION)
6 SHELL = /bin/bash
7 BOOST = $(shell grep '^\#define\s*BOOST_VERSION\s*[0-9][0-9]*' /usr/include/boost/version.hpp | awk '{ print $$3 }' )
9 CONFIGUREOPTS = \
10 --disable-libmemcached \
11 --disable-libdrizzle \
12 --disable-libpq \
13 --disable-libtokyocabinet \
14 --with-sqlite3=no \
15 --prefix=$(OMD_ROOT)
17 .PHONY: skel
19 build: clean
20 test -f gearmand-${VERSION}.tar.gz || wget "http://launchpad.net/gearmand/trunk/${VERSION}/+download/gearmand-${VERSION}.tar.gz"
21 tar xzf gearmand-$(VERSION).tar.gz
22 for p in patches/*.patch ; do \
23 echo "applying $$p..." ; \
24 ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
25 done
26 sed -i -e 's/boost_version_req=1.39/boost_version_req=1.34/g' gearmand-$(VERSION)/configure
27 DISTRO_VERSION=$(DISTRO_VERSION); \
28 if [ "$(DISTRO_NAME)" = "CENTOS" -a "$${DISTRO_VERSION:0:1}" = "5" ]; then \
29 export CC='gcc44'; \
30 export CXX='g++44'; \
31 fi && \
32 if [ $(BOOST) -ge 105300 ]; then \
33 export LDFLAGS="-lboost_system"; \
34 export LIBS="-lboost_system"; \
35 fi && \
36 cd $(DIR) && \
37 export LIBRARY_PATH=/usr/lib64/boost141:/usr/lib/boost141 && \
38 export LD_LIBRARY_PATH=/usr/lib64/boost141:/usr/lib/boost141 && \
39 export CFLAGS=-std=c99 && \
40 export CPATH=/usr/include/boost141 && \
41 ./configure $(CONFIGUREOPTS) && \
42 $(MAKE)
44 install:
45 $(MAKE) DESTDIR=$(DESTDIR) -C $(DIR) install
47 skel:
48 mkdir -p $(SKEL)/var/log/gearman
49 touch $(SKEL)/var/log/gearman/gearman.log
51 clean:
52 rm -rf $(DIR)