Project

General

Profile

Download (2.53 KB) Statistics
| Branch: | Tag: | Revision:
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# DEB_VERBOSE_ALL=1
# DH_VERBOSE=1

DEB_BUILD_OPTIONS=noautodbgsym

build:
/bin/cp config/settings.yaml.example config/settings.yaml
/bin/cp config/database.yml.example config/database.yml
/bin/cp config/dynflow/orchestrator.yml.example config/dynflow/orchestrator.yml
/bin/cp config/dynflow/worker.yml.example config/dynflow/worker.yml
/usr/bin/gem install -f rake -v '12.3.1'
/usr/bin/gem install -f minitest -v '5.10.3'
/usr/bin/gem install -f thor -v '1.1.0'
/bin/rm -f bundler.d/test.rb bundler.d/development.rb
/bin/sed -i '2i gem "puma-status"' bundler.d/service.rb
BUNDLE_BUILD__SASSC=--disable-march-tune-native BUNDLE_RETRY=5 BUNDLE_JOBS=4 /usr/bin/bundle package
/usr/bin/python script/filter-package-json.py
/usr/bin/npm install --no-audit --no-optional --unsafe-perm
/bin/cp db/schema.rb.nulldb db/schema.rb
/usr/bin/bundle exec rake locale:pack RAILS_ENV=production
/usr/bin/bundle exec rake assets:precompile RAILS_ENV=production DATABASE_URL=nulldb://nohost
/usr/bin/bundle exec rake webpack:compile DATABASE_URL=nulldb://nohost
/usr/bin/bundle exec rake apipie:cache cache_part=resources --trace FOREMAN_APIPIE_LANGS=en_US RAILS_ENV=production DATABASE_URL=nulldb://nohost
/bin/rm -f db/schema.rb
/bin/sed -ri '1sXenv rubyXenv foreman-rubyX' bin/*
/bin/sed -ri 's~^BUNDLER_CMD=""~BUNDLER_CMD="/usr/bin/foreman-ruby /usr/bin/bundle exec"~' script/foreman-rake
/bin/sed -i 's#puma-status#cd /usr/share/foreman \&\& /usr/bin/bundle exec &#' script/foreman-puma-status
/bin/sed -ri '/^ExecStart/ s#=#=/usr/bin/bundle exec --keep-file-descriptors #' extras/systemd/foreman.service
/bin/sed -ri '/^ExecStart/ s#/usr/bin/sidekiq#/usr/bin/bundle exec sidekiq#' extras/systemd/dynflow-sidekiq@.service
/bin/mkdir -p .ssh
/usr/bin/touch build

%:
dh $@ --with=systemd

override_dh_systemd_start:
dh_systemd_start --no-start --name=foreman.service --package=foreman-service
dh_systemd_start --no-start --name=foreman.socket --package=foreman-service
dh_systemd_start --no-start --name=dynflow-sidekiq@orchestrator --package=foreman-dynflow-sidekiq
dh_systemd_start --no-start --name=dynflow-sidekiq@worker --package=foreman-dynflow-sidekiq

override_dh_systemd_enable:
dh_systemd_enable --name=foreman.service --package=foreman-service
dh_systemd_enable --name=foreman.socket --package=foreman-service
dh_systemd_enable --name=dynflow-sidekiq@orchestrator --package=foreman-dynflow-sidekiq
dh_systemd_enable --name=dynflow-sidekiq@worker --package=foreman-dynflow-sidekiq
(50-50/50)