#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk %: dh $@ --package=gitlab dh $@ --buildsystem=golang --with=golang --builddirectory=_build --package=gitlab-workhorse --sourcedirectory=workhorse override_dh_auto_configure: dh_auto_configure -O--package=gitlab dh_auto_configure -O--package=gitlab-workhorse mkdir -p _build/src/gitlab.com/gitlab-org/gitlab cp -r workhorse _build/src/gitlab.com/gitlab-org/gitlab if [ -d workhorse-vendor ]; then mv workhorse-vendor _build/src/gitlab.com/gitlab-org/gitlab/workhorse/vendor; fi execute_after_dh_auto_build: # Rename binary to gitlab-workhorse (upstream is passing -o in Makefile) if [ -f _build/bin/workhorse ]; then mv _build/bin/workhorse _build/bin/gitlab-workhorse; fi override_dh_auto_test: dh_auto_test -O--package=gitlab PATH="$(CURDIR)/_build/bin:$$PATH" dh_auto_test -O--package=gitlab-workhorse override_dh_install: sh debian/upstream-file-count-check.sh sh debian/upstream-config-file-check.sh dh_install -XLICENSE -O--package=gitlab dh_installexamples -O--package=gitlab # Make sure we are installing all required files in debian/install rm -rf debian/gitlab/usr/share/gitlab/tmp/* find debian/gitlab/usr/share/gitlab/ -name .eslintrc.yml -delete mv debian/gitlab/usr/share/gitlab/app/assets/javascripts/locale \ debian/gitlab/usr/share/gitlab/app/assets/javascripts/locale.static if [ -f debian/gitlab/var/lib/gitlab/db/structure.sql ]; then \ mv debian/gitlab/var/lib/gitlab/db/structure.sql debian/gitlab/var/lib/gitlab/db/structure.sql.template; fi sed -i 's/__NEW_VERSION__/${DEB_VERSION}/g' debian/gitlab/usr/lib/gitlab/templates/gitlab-debian.conf.example dh_install -XLICENSE -O--package=gitlab-workhorse override_dh_installinit: dh_installinit --no-start -p gitlab --name=gitlab-sidekiq -O--package=gitlab dh_installinit --no-start -p gitlab --name=gitlab-puma -O--package=gitlab dh_installinit --no-start -p gitlab --name=gitlab-mailroom -O--package=gitlab dh_installinit --no-start -p gitlab --name=gitlab-workhorse -O--package=gitlab dh_installinit -O--package=gitlab override_dh_systemd_start: dh_systemd_start --no-start -O--package=gitlab