g3/g3tiles/debian/rules
2023-03-09 17:55:45 +08:00

30 lines
932 B
Makefile
Executable file

#!/usr/bin/make -f
PACKAGE_NAME := g3tiles
BUILD_PROFILE := release-lto
DEB_VERSION ?= $(shell dpkg-parsechangelog -SVersion)
SSL_FEATURE ?= $(shell scripts/package/detect_openssl_feature.sh)
%:
dh $@
override_dh_auto_clean:
cargo clean --frozen --offline
override_dh_auto_build:
G3_PACKAGE_VERSION=$(DEB_VERSION) \
cargo build --frozen --offline --profile $(BUILD_PROFILE) \
--no-default-features --features $(SSL_FEATURE), \
--package g3tiles --package g3tiles-ctl
sh $(PACKAGE_NAME)/service/generate_systemd.sh
override_dh_auto_install:
dh_auto_install
install -m 755 -D target/$(BUILD_PROFILE)/g3tiles debian/tmp/usr/bin/g3tiles
install -m 755 -D target/$(BUILD_PROFILE)/g3tiles-ctl debian/tmp/usr/bin/g3tiles-ctl
install -m 644 -D $(PACKAGE_NAME)/service/g3tiles@.service debian/tmp/lib/systemd/system/g3tiles@.service
override_dh_installchangelogs:
dh_installchangelogs $(PACKAGE_NAME)/CHANGELOG