2014-09-02 17:59:05 +05:30
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2019-01-05 16:20:14 +05:30
|
|
|
include /usr/share/dpkg/pkg-info.mk
|
2022-08-23 00:04:43 +05:30
|
|
|
BUILDDIR := _build/src/gitlab.com/gitlab-org/gitlab
|
2019-01-05 16:20:14 +05:30
|
|
|
|
2014-09-02 17:59:05 +05:30
|
|
|
%:
|
2022-08-23 00:04:43 +05:30
|
|
|
dh $@ --buildsystem=ruby --with=ruby --package=gitlab
|
|
|
|
dh $@ --buildsystem=golang --with=golang --builddirectory=_build \
|
|
|
|
--package=gitlab-workhorse --sourcedirectory=workhorse
|
2021-04-17 16:43:17 +05:30
|
|
|
|
2022-08-23 00:04:43 +05:30
|
|
|
override_dh_auto_configure-indep:
|
|
|
|
dh_auto_configure -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
|
|
|
|
|
|
override_dh_auto_configure-arch:
|
|
|
|
dh_auto_configure -O--package=gitlab-workhorse -O--buildsystem=golang \
|
|
|
|
-O--with=golang -O--builddirectory=_build -O--sourcedirectory=workhorse
|
2021-10-28 01:36:56 +05:30
|
|
|
mkdir -p _build/src/gitlab.com/gitlab-org/gitlab
|
|
|
|
cp -r workhorse _build/src/gitlab.com/gitlab-org/gitlab
|
2022-08-23 00:04:43 +05:30
|
|
|
if [ -d ${BUILDDIR}/vendor ]; then ${RM} -rf ${BUILDDIR}/vendor; fi
|
|
|
|
if [ -d ${BUILDDIR}/workhorse-vendor ]; then mv ${BUILDDIR}/workhorse-vendor \
|
|
|
|
${BUILDDIR}/vendor; fi
|
2022-12-16 03:05:02 +05:30
|
|
|
# Remove non-existent symlink
|
|
|
|
find ${BUILDDIR} -name test.git -delete
|
2022-12-03 12:28:14 +05:30
|
|
|
# temporary step till protobuf 1.5 vs 1.3 is resolved
|
2023-07-09 10:04:07 +05:30
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/prometheus ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/matttproud ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/googleapis/gax-go ${BUILDDIR}/vendor/github.com/googleapis
|
2022-12-04 17:24:12 +05:30
|
|
|
mkdir -p ${BUILDDIR}/vendor/google.golang.org
|
2023-07-09 10:04:07 +05:30
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/google.golang.org/api ${BUILDDIR}/vendor/google.golang.org
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/google.golang.org/genproto ${BUILDDIR}/vendor/google.golang.org
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/go.opencensus.io ${BUILDDIR}/vendor
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/gitlab.com/gitlab-org/labkit ${BUILDDIR}/vendor/gitlab.com/gitlab-org
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/golang/groupcache ${BUILDDIR}/vendor/github.com/golang
|
2022-12-03 12:28:14 +05:30
|
|
|
mkdir -p ${BUILDDIR}/vendor/github.com/cespare/xxhash
|
|
|
|
ln -s /usr/share/gocode/src/github.com/cespare/xxhash ${BUILDDIR}/vendor/github.com/cespare/xxhash/v2
|
|
|
|
mkdir -p ${BUILDDIR}/vendor/github.com/oklog/ulid
|
|
|
|
ln -s /usr/share/gocode/src/github.com/oklog/ulid ${BUILDDIR}/vendor/github.com/oklog/ulid/v2
|
2023-01-13 00:19:20 +05:30
|
|
|
mkdir -p ${BUILDDIR}/vendor/cloud.google.com
|
2023-07-09 10:04:07 +05:30
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/cloud.google.com/go ${BUILDDIR}/vendor/cloud.google.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/gocloud.dev ${BUILDDIR}/vendor
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/aws ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/Azure ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/AzureAD ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/uber ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/lightstep ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/shirou ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/tklauser ${BUILDDIR}/vendor/github.com
|
|
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v16/vendor/github.com/golang-jwt ${BUILDDIR}/vendor/github.com
|
2022-08-23 00:04:43 +05:30
|
|
|
|
|
|
|
override_dh_auto_build-indep:
|
|
|
|
dh_auto_build -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
2021-04-17 16:43:17 +05:30
|
|
|
|
2022-08-23 00:04:43 +05:30
|
|
|
override_dh_auto_build-arch:
|
|
|
|
dh_auto_build -O--package=gitlab-workhorse -O--buildsystem=golang \
|
|
|
|
-O--with=golang -O--builddirectory=_build -O--sourcedirectory=workhorse
|
2021-10-29 20:06:32 +05:30
|
|
|
# Rename binary to gitlab-workhorse (upstream is passing -o in Makefile)
|
2022-08-23 00:04:43 +05:30
|
|
|
if [ -f _build/bin/workhorse ]; then \
|
|
|
|
mv _build/bin/workhorse _build/bin/gitlab-workhorse; fi
|
|
|
|
|
|
|
|
override_dh_auto_test-indep:
|
|
|
|
dh_auto_test -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
|
|
|
|
|
|
override_dh_auto_test-arch:
|
|
|
|
PATH="$(CURDIR)/_build/bin:$$PATH" dh_auto_test -O--package=gitlab-workhorse \
|
|
|
|
-O--buildsystem=golang -O--with=golang -O--builddirectory=_build \
|
|
|
|
-O--sourcedirectory=workhorse
|
2021-10-29 20:06:32 +05:30
|
|
|
|
2022-08-23 00:04:43 +05:30
|
|
|
override_dh_auto_install-indep:
|
|
|
|
# skip gem2deb copying files to /usr/lib/ruby
|
2016-02-04 16:22:17 +05:30
|
|
|
|
2022-08-23 00:04:43 +05:30
|
|
|
override_dh_auto_install-arch:
|
|
|
|
dh_auto_install -O--package=gitlab-workhorse -O--buildsystem=golang \
|
|
|
|
-O--with=golang -O--builddirectory=_build -O--sourcedirectory=workhorse
|
|
|
|
|
|
|
|
override_dh_install-indep:
|
2021-10-02 01:11:04 +05:30
|
|
|
sh debian/upstream-file-count-check.sh
|
|
|
|
sh debian/upstream-config-file-check.sh
|
2022-08-23 00:04:43 +05:30
|
|
|
dh_install -XLICENSE -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
|
|
dh_installexamples -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
2016-02-13 19:11:17 +05:30
|
|
|
# Make sure we are installing all required files in debian/install
|
2016-02-18 17:04:24 +05:30
|
|
|
rm -rf debian/gitlab/usr/share/gitlab/tmp/*
|
2020-01-07 23:14:48 +05:30
|
|
|
find debian/gitlab/usr/share/gitlab/ -name .eslintrc.yml -delete
|
2018-02-23 00:00:41 +05:30
|
|
|
mv debian/gitlab/usr/share/gitlab/app/assets/javascripts/locale \
|
|
|
|
debian/gitlab/usr/share/gitlab/app/assets/javascripts/locale.static
|
2021-04-17 16:43:17 +05:30
|
|
|
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
|
2019-01-05 16:20:14 +05:30
|
|
|
sed -i 's/__NEW_VERSION__/${DEB_VERSION}/g' debian/gitlab/usr/lib/gitlab/templates/gitlab-debian.conf.example
|
2016-02-04 16:22:17 +05:30
|
|
|
|
2022-08-23 00:04:43 +05:30
|
|
|
override_dh_install-arch:
|
|
|
|
dh_install -XLICENSE -O--package=gitlab-workhorse -O--buildsystem=golang \
|
|
|
|
-O--with=golang -O--builddirectory=_build -O--sourcedirectory=workhorse
|
|
|
|
|
|
|
|
override_dh_installsystemd-indep:
|
2021-12-16 22:37:33 +05:30
|
|
|
dh_installsystemd --no-start -p gitlab --name=gitlab-sidekiq -O--package=gitlab
|
|
|
|
dh_installsystemd --no-start -p gitlab --name=gitlab-puma -O--package=gitlab
|
|
|
|
dh_installsystemd --no-start -p gitlab --name=gitlab-mailroom -O--package=gitlab
|
|
|
|
dh_installsystemd --no-start -p gitlab --name=gitlab-workhorse -O--package=gitlab
|
2022-08-23 00:04:43 +05:30
|
|
|
dh_installsystemd -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
|
|
|
|
|
|
override_dh_golang-indep:
|
|
|
|
# don't fail in arch:all build, is there a better way ?
|
|
|
|
|
|
|
|
override_dh_dwz:
|
|
|
|
# Do nothing
|