#!/usr/bin/make -f
# -*- makefile -*-

VERSION=1.23.1

-include /usr/share/dpkg/buildflags.mk

CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)

export CFLAGS CXXFLAGS LDFLAGS

%:
	dh $@ 

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX=""

override_dh_install:
	rm -rf debian/tmp/usr/share/doc
	dh_install --fail-missing

get-orig-source:
	git clone https://gitlab.cern.ch/dmc/srm-ifce.git srm-ifce-$(VERSION)
	( cd srm-ifce-$(VERSION) ; \
	  git checkout v$(VERSION) ; \
	  git submodule init ; \
	  git submodule update \
	)
	tar -c -z --exclude-vcs -f ../srm-ifce_$(VERSION).orig.tar.gz srm-ifce-$(VERSION)
	rm -rf srm-ifce-$(VERSION)
