debian-mirror-gitlab/debian/rules

43 lines
1.9 KiB
Makefile
Executable file

#!/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
cp -r workhorse _build/src/gitlab.com/gitlab-org/gitlab-workhorse
if [ -d workhorse-vendor ]; then mv workhorse-vendor _build/src/gitlab.com/gitlab-org/gitlab-workhorse/vendor; 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:
dh_install -XLICENSE -O--package=gitlab
dh_installexamples -O--package=gitlab
# Make sure we are installing all required files in debian/install
sh debian/upstream-file-count-check.sh
sh debian/upstream-config-file-check.sh
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