Commit 31ca95a3 authored by Axel Auweter's avatar Axel Auweter
Browse files

Since net-snmp's tar.gz archive is broken, use the zip

(-> implement support for zipped distfiles and clean up Makefile further)
parent 6c2b2007
......@@ -16,7 +16,7 @@ DISTFILES = thrift-$(THRIFT_VERSION).tar.gz;https://dist.apache.org/repos/dist/r
rudeconfig-5.0.5.tar.gz;http://rudeserver.com/config/download/rudeconfig-5.0.5.tar.gz \
OpenIPMI-2.0.19.tar.gz;http://optimate.dl.sourceforge.net/project/openipmi/OpenIPMI%202.0%20Library/OpenIPMI-2.0.19.tar.gz \
boost_$(BOOST_VERSION_U).tar.gz;http://netcologne.dl.sourceforge.net/project/boost/boost/$(BOOST_VERSION)/boost_$(BOOST_VERSION_U).tar.gz \
net-snmp-$(SNMP_VERSION).tar.gz;http://optimate.dl.sourceforge.net/project/net-snmp/net-snmp/$(SNMP_VERSION)/net-snmp-$(SNMP_VERSION).tar.gz
net-snmp-$(SNMP_VERSION).zip;http://netcologne.dl.sourceforge.net/project/net-snmp/net-snmp/$(SNMP_VERSION)/net-snmp-$(SNMP_VERSION).zip
FETCH = wget -c --no-check-certificate -O -
......@@ -32,7 +32,7 @@ CASSANDRA_COMMITLOG_TOTAL_SPACE_IN_MB = 256
CASSANDRA_COMMITLOG_SEGMENT_SIZE_IN_MB = 16
DISTFILESNAMES = $(foreach f,$(DISTFILES),$(shell echo "$(f)" | sed 's/;.*//'))
DISTFILESPATHS = $(foreach f,$(DISTFILES),$(shell echo "$(f)" | sed 's/.tar.gz;.*//'))
DISTFILESPATHS = $(foreach f,$(DISTFILES),$(shell echo "$(f)" | sed 's/.tar.gz;.*//' | sed 's/.zip;.*//' ))
CFLAGS += -I$(DCDBDEPLOYPATH)/include -O0 -g
CXX11FLAGS = --std=c++11
......@@ -97,9 +97,15 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(M)/.installed ]; then \
echo ""; \
echo "Building Mosquitto library..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(M).patch ]; then echo "Patching Mosquitto..."; cd $(DCDBDEPSPATH)/$(M) && (patch -N -p0 < $(DCDBDEPSPATH)/patches/$(M).patch || true); fi; \
if [ -e $(DCDBDEPSPATH)/patches/$(M).patch ]; then \
echo "Patching Mosquitto..."; \
cd $(DCDBDEPSPATH)/$(M) && (patch -N -p0 < $(DCDBDEPSPATH)/patches/$(M).patch || true); \
fi; \
mkdir -p $(DCDBDEPSPATH)/mosquitto_build; \
cd $(DCDBDEPSPATH)/mosquitto_build && cmake -DWITH_SRV=no -DWITH_TLS=OFF -DCMAKE_INSTALL_PREFIX:PATH=$(DCDBDEPLOYPATH)/ $(DCDBDEPSPATH)/$(M) && make -j $(MAKETHREADS) && make install && touch $(DCDBDEPSPATH)/$(M)/.installed; \
cd $(DCDBDEPSPATH)/mosquitto_build && \
cmake -DWITH_SRV=no -DWITH_TLS=OFF -DCMAKE_INSTALL_PREFIX:PATH=$(DCDBDEPLOYPATH)/ $(DCDBDEPSPATH)/$(M) && \
make -j $(MAKETHREADS) && make install && \
touch $(DCDBDEPSPATH)/$(M)/.installed; \
else \
echo "Skipping Mosquitto library (already built)..."; \
fi
......@@ -108,7 +114,11 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(R)/.installed ]; then \
echo ""; \
echo "Building Rudeconfig library..."; \
cd $(DCDBDEPSPATH)/$(R) && ./configure --prefix=$(DCDBDEPLOYPATH) && make -j $(MAKETHREADS) && chmod +x install-sh && make install && touch $(DCDBDEPSPATH)/$(R)/.installed; \
cd $(DCDBDEPSPATH)/$(R) && ./configure --prefix=$(DCDBDEPLOYPATH) && \
make -j $(MAKETHREADS) && \
chmod +x install-sh && \
make install && \
touch $(DCDBDEPSPATH)/$(R)/.installed; \
else \
echo "Skipping Rudeconfig library (already built)..."; \
fi
......@@ -118,8 +128,14 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(O)/.installed ]; then \
echo ""; \
echo "Building OpenIPMI library..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(O).patch ]; then echo "Patching OpenIPMI..."; cd $(DCDBDEPSPATH)/$(O) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(O).patch || true); fi; \
if [ "$(X)" = "Darwin" ]; then echo "Fixing OpenIPMI for Mac OS..."; cd $(DCDBDEPSPATH)/$(O) && find . -name 'Makefile*' | xargs sed -i '' -e 's/Map/map/g'; fi; \
if [ -e $(DCDBDEPSPATH)/patches/$(O).patch ]; then \
echo "Patching OpenIPMI..."; \
cd $(DCDBDEPSPATH)/$(O) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(O).patch || true); \
fi; \
if [ "$(X)" = "Darwin" ]; then \
echo "Fixing OpenIPMI for Mac OS..."; \
cd $(DCDBDEPSPATH)/$(O) && find . -name 'Makefile*' | xargs sed -i '' -e 's/Map/map/g'; \
fi; \
cd $(DCDBDEPSPATH)/$(O) && ./configure --prefix=$(DCDBDEPLOYPATH) --with-swig=no --with-perl=no --with-python=no CFLAGS="$(CFLAGS)"; \
cd $(DCDBDEPSPATH)/$(O) && make -j $(MAKETHREADS) && make install && touch $(DCDBDEPSPATH)/$(O)/.installed; \
else \
......@@ -130,9 +146,13 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(B)/.installed ]; then \
echo ""; \
echo "Building Boost..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(B).patch ]; then echo "Patching Boost..."; cd $(DCDBDEPSPATH)/$(B) && (patch -N -p2 < $(DCDBDEPSPATH)/patches/$(B).patch || true); fi; \
if [ -e $(DCDBDEPSPATH)/patches/$(B).patch ]; then \
echo "Patching Boost..."; \
cd $(DCDBDEPSPATH)/$(B) && (patch -N -p2 < $(DCDBDEPSPATH)/patches/$(B).patch || true); \
fi; \
cd $(DCDBDEPSPATH)/$(B) && ./bootstrap.sh --prefix=$(DCDBDEPLOYPATH) \
--with-libraries=atomic,chrono,date_time,exception,filesystem,program_options,thread,timer && ./b2 -j $(MAKETHREADS) install && touch $(DCDBDEPSPATH)/$(B)/.installed; \
--with-libraries=atomic,chrono,date_time,exception,filesystem,program_options,thread,timer && \
./b2 -j $(MAKETHREADS) install && touch $(DCDBDEPSPATH)/$(B)/.installed; \
else \
echo "Skipping Boost (already built)..."; \
fi
......@@ -141,11 +161,16 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(T)/.installed ]; then \
echo ""; \
echo "Building Thrift..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(T).patch ]; then echo "Patching Thrift..."; cd $(DCDBDEPSPATH)/$(T) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(T).patch || true); fi; \
if [ -e $(DCDBDEPSPATH)/patches/$(T).patch ]; then \
echo "Patching Thrift..."; \
cd $(DCDBDEPSPATH)/$(T) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(T).patch || true); \
fi; \
cd $(DCDBDEPSPATH)/$(T) && env CXXFLAGS="$(CXX11FLAGS)" ./configure --prefix=$(DCDBDEPLOYPATH) --without-qt4 --without-csharp \
--without-java --without-erlang --without-python --without-perl --without-php --without-php_extension \
--without-ruby --without-haskell --without-go --without-d --without-c_glib --with-cpp --with-boost=$(DCDBDEPLOYPATH) \
--enable-libtool-lock --without-tests && env CXXFLAGS="$(CXX11FLAGS)" make -j $(MAKETHREADS) && env CXXFLAGS="$(CXX11FLAGS)" make install && touch $(DCDBDEPSPATH)/$(T)/.installed; \
--enable-libtool-lock --without-tests && \
env CXXFLAGS="$(CXX11FLAGS)" make -j $(MAKETHREADS) && \
env CXXFLAGS="$(CXX11FLAGS)" make install && touch $(DCDBDEPSPATH)/$(T)/.installed; \
else \
echo "Skipping Thrift (already built)..."; \
fi
......@@ -154,9 +179,13 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@if [ ! -e $(DCDBDEPSPATH)/$(S)/.installed ]; then \
echo ""; \
echo "Building net-snmp..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(S).patch ]; then echo "Patching net-snmp..."; cd $(DCDBDEPSPATH)/$(S) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(S).patch || true); fi; \
cd $(DCDBDEPSPATH)/$(S) && env CFLAGS="$(CFLAGS)" ./configure --prefix=$(DCDBDEPLOYPATH) --with-default-snmp-version="3" --with-sys-contact="@@no.where" --with-sys-location="Unknown" \
--with-logfile="$(DCDBDEPLOYPATH)/var/log/snmpd.log" --with-persistent-directory="$(DCDBDEPLOYPATH)/var/net-snmp" --disable-embedded-perl --without-perl-modules; \
if [ -e $(DCDBDEPSPATH)/patches/$(S).patch ]; then \
echo "Patching net-snmp..."; \
cd $(DCDBDEPSPATH)/$(S) && (patch -N -p1 < $(DCDBDEPSPATH)/patches/$(S).patch || true); \
fi; \
cd $(DCDBDEPSPATH)/$(S) && env CFLAGS="$(CFLAGS)" ./configure --prefix=$(DCDBDEPLOYPATH) --with-default-snmp-version="3" \
--with-sys-contact="@@no.where" --with-sys-location="Unknown" --with-logfile="$(DCDBDEPLOYPATH)/var/log/snmpd.log" \
--with-persistent-directory="$(DCDBDEPLOYPATH)/var/net-snmp" --disable-embedded-perl --without-perl-modules; \
cd $(DCDBDEPSPATH)/$(S) && env CFLAGS="$(CFLAGS)" make -j $(MAKETHREADS) && make install && touch $(DCDBDEPSPATH)/$(S)/.installed; \
else \
echo "Skipping net-snmp (already built)..."; \
......@@ -195,7 +224,11 @@ $(DCDBDEPSPATH)/distfiles/%:
$(DCDBDEPSPATH)/%/.dirstamp: $(DCDBDEPSPATH)/.download-distfiles
$(eval F := $(shell echo "$@" | sed 's/\/.dirstamp//' | sed 's/.*\///'))
@echo "Extracting $(F)..."
@cd $(DCDBDEPSPATH) && tar xzf distfiles/$(F).tar.gz
@if [ "$(suffix $(shell ls $(DCDBDEPSPATH)/distfiles/$(F)*))" == ".gz" ]; then \
cd $(DCDBDEPSPATH) && tar xzf distfiles/$(F).tar.gz; \
else \
cd $(DCDBDEPSPATH) && unzip distfiles/$(F).zip > /dev/null; \
fi
@touch $@
$(LIBRARIES): $(DCDBDEPSPATH)/.prerequesites
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment