#!/usr/bin/make -f #export DH_VERBOSE=1 include /usr/share/dpkg/pkg-info.mk export DH_RUBY = --gem-install export DH_RUBY_GEM_INSTALL_EXCLUDE = .github/* ext/redhat/* export GEM2DEB_TEST_RUNNER = --check-dependencies export PUPPETSERVER_GEMS = bcrypt highline moneta sshkey trocla %: dh $@ --buildsystem=ruby --with ruby override_dh_installman: rst2man --exit-status=2 --report=1 debian/trocla.1.rst debian/trocla.1 dh_installman debian/trocla.1 execute_before_dh_link: set -e; \ for gem in $(PUPPETSERVER_GEMS); do \ ./debian/puppetserver_gem_helper.sh $${gem}; \ done override_dh_gencontrol: set -e; \ for gem in $(PUPPETSERVER_GEMS); do \ if [ "$${gem}" = "$(DEB_SOURCE)" ] || [ "ruby-$${gem}" = "$(DEB_SOURCE)" ]; then continue; fi; \ package=$$(ruby -e "require 'gem2deb/package_name_mapping'; @mapping = Gem2Deb::PackageNameMapping.new(false); puts @mapping['$${gem}']"); \ ver=$$(dpkg-query -f '$${source:Upstream-Version}' -W $${package}); \ ruby_depends="$${package} (<< $${ver}.), $${package} (>= $${ver}~~)$${ruby_depends:+, $${ruby_depends}}"; \ done; \ trocla_depends="trocla (<< $(DEB_VERSION_UPSTREAM).), trocla (>= $(DEB_VERSION_UPSTREAM)~~)"; \ dh_gencontrol -- -VpuppetserverRubyDepends="$${trocla_depends}, $${ruby_depends}" execute_after_dh_clean: rm -f debian/trocla.1