47fd2f6fd6
gitlab Debian release 15.5.4+ds3-1
102 lines
5.4 KiB
Makefile
Executable file
102 lines
5.4 KiB
Makefile
Executable file
#!/usr/bin/make -f
|
|
|
|
include /usr/share/dpkg/pkg-info.mk
|
|
BUILDDIR := _build/src/gitlab.com/gitlab-org/gitlab
|
|
|
|
%:
|
|
dh $@ --buildsystem=ruby --with=ruby --package=gitlab
|
|
dh $@ --buildsystem=golang --with=golang --builddirectory=_build \
|
|
--package=gitlab-workhorse --sourcedirectory=workhorse
|
|
|
|
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
|
|
mkdir -p _build/src/gitlab.com/gitlab-org/gitlab
|
|
cp -r workhorse _build/src/gitlab.com/gitlab-org/gitlab
|
|
if [ -d ${BUILDDIR}/vendor ]; then ${RM} -rf ${BUILDDIR}/vendor; fi
|
|
if [ -d ${BUILDDIR}/workhorse-vendor ]; then mv ${BUILDDIR}/workhorse-vendor \
|
|
${BUILDDIR}/vendor; fi
|
|
# temporary step till protobuf 1.5 vs 1.3 is resolved
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/github.com/prometheus ${BUILDDIR}/vendor/github.com
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/github.com/matttproud ${BUILDDIR}/vendor/github.com
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/github.com/googleapis ${BUILDDIR}/vendor/github.com
|
|
mkdir -p ${BUILDDIR}/vendor/google.golang.org
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/google.golang.org/api ${BUILDDIR}/vendor/google.golang.org
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/google.golang.org/genproto ${BUILDDIR}/vendor/google.golang.org
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/gocloud.dev ${BUILDDIR}/vendor
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/go.opencensus.io ${BUILDDIR}/vendor
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/gitlab.com/gitlab-org/labkit ${BUILDDIR}/vendor/gitlab.com/gitlab-org
|
|
ln -s /usr/share/gocode/src/gitlab.com/gitlab-org/gitaly/v15/vendor/github.com/golang/groupcache ${BUILDDIR}/vendor/github.com/golang
|
|
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
|
|
|
|
override_dh_auto_build-indep:
|
|
dh_auto_build -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
# Need this since nodejs on bullseye is not supporting some newer syntax
|
|
# Failed to load '/usr/share/gitlab/config/webpack.config.js' config
|
|
# [webpack-cli] /etc/gitlab/plugins/graphql_known_operations_plugin.js:38
|
|
# .map((x) => x.name?.value)
|
|
# ^
|
|
mkdir -p node_modules
|
|
ln -s /usr/share/nodejs/core-js node_modules/
|
|
ln -s /usr/share/nodejs/@babel node_modules/
|
|
babeljs config/plugins/graphql_known_operations_plugin.js -o config/plugins/graphql_known_operations_plugin.js
|
|
rm -rf node_modules
|
|
|
|
override_dh_auto_build-arch:
|
|
dh_auto_build -O--package=gitlab-workhorse -O--buildsystem=golang \
|
|
-O--with=golang -O--builddirectory=_build -O--sourcedirectory=workhorse
|
|
# 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-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
|
|
|
|
override_dh_auto_install-indep:
|
|
# skip gem2deb copying files to /usr/lib/ruby
|
|
|
|
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:
|
|
sh debian/upstream-file-count-check.sh
|
|
sh debian/upstream-config-file-check.sh
|
|
dh_install -XLICENSE -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
dh_installexamples -O--package=gitlab -O--buildsystem=ruby -O--with=ruby
|
|
# 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
|
|
|
|
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:
|
|
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
|
|
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
|