kych

OAuth 2.0 API for Swiyu to enable Taler integration of Swiyu for KYC (experimental)
Log | Files | Refs | README | LICENSE

rules (2784B)


      1 #!/usr/bin/make -f
      2 
      3 # The Cargo crate lives in a subdirectory, not at the top of the source tree.
      4 # It has one path dependency, taler-config/, which cargo builds along with it.
      5 CRATE = kych_oauth2_gateway
      6 VENDORED = taler-config
      7 
      8 # Man pages are generated from the reStructuredText that also feeds the website
      9 # build in the taler-docs repository, so that there is a single source for
     10 # them.  documentation/sphinx-man/conf.py is a minimal Sphinx configuration
     11 # holding just the man_pages entries; the sources themselves use only core
     12 # directives, so python3-sphinx alone is enough.
     13 MANSRC = documentation/taler-docs/manpages
     14 MANCONF = documentation/sphinx-man
     15 MANOUT = debian/man
     16 
     17 # Keep cargo's registry and cache inside the build tree.  cargo fetches crates
     18 # from the network at build time (this is not an archive-policy-clean offline
     19 # build), and without this it would write to $HOME, which is not ours to touch
     20 # under Rules-Requires-Root: no.
     21 export CARGO_HOME = $(CURDIR)/debian/cargo
     22 
     23 # --with installsysusers: dh_installsysusers (which turns debian/kych.sysusers
     24 # into the /usr/lib/sysusers.d entry that creates the "kych" system user) only
     25 # joins the sequence automatically from debhelper compat 14 onwards.  Without
     26 # this the package would install but the service could not start.
     27 %:
     28 	dh $@ --no-parallel --with installsysusers
     29 
     30 # Nothing to configure: debian/kych.install names explicit paths and the build
     31 # only needs a cargo from $PATH (see Build-Depends).  The step is still
     32 # overridden so that dh does not try to auto-detect a build system in the
     33 # top-level directory, which holds no build files of its own.
     34 override_dh_auto_configure:
     35 
     36 override_dh_auto_build:
     37 	cargo build --release --manifest-path $(CRATE)/Cargo.toml
     38 	sphinx-build -b man -q -c $(MANCONF) $(MANSRC) $(MANOUT)
     39 
     40 # The unit tests would run without a database, but the two integration suites
     41 # in $(CRATE)/tests/ need a live PostgreSQL reachable through $DATABASE_URL and
     42 # silently skip themselves when it is absent -- running them here would report
     43 # a pass without having tested anything.  Test against a database instead:
     44 #   DATABASE_URL=postgres:///kych_test cargo test --manifest-path $(CRATE)/Cargo.toml
     45 override_dh_auto_test:
     46 
     47 override_dh_auto_install:
     48 
     49 override_dh_auto_clean:
     50 	rm -rf $(CARGO_HOME) $(CRATE)/target $(VENDORED)/target $(MANOUT)
     51 
     52 # Both units ship disabled.  The service cannot run before the administrator
     53 # has created the database and edited kych.conf (see README.Debian), and
     54 # kych.socket is only correct once SERVE is switched to "systemd" -- with the
     55 # shipped SERVE = unix the daemon binds UNIXPATH itself and an enabled socket
     56 # unit would fight it for the same path.
     57 override_dh_installsystemd:
     58 	dh_installsystemd --no-enable --no-start --no-stop-on-upgrade