File: rules

package info (click to toggle)
rust-ahash 0.7.6-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,304 kB
  • sloc: perl: 258; python: 148; makefile: 12; sh: 3
file content (21 lines) | stat: -rwxr-xr-x 652 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/make -f

# resolve DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk

# use local fork of debcargo and dh-cargo
PATH := $(CURDIR)/debian/dh-cargo/bin:$(PATH)
PERL5LIB = $(CURDIR)/debian/dh-cargo/lib
export PATH PERL5LIB

DEB_VERSION_UPSTREAM_ORIG = $(firstword $(subst ~,$() ,$(DEB_VERSION_UPSTREAM)))

CRATE = $(patsubst rust-%,%,$(DEB_SOURCE))
TARGET = debian/librust-$(CRATE)-dev/usr/share/cargo/registry/$(CRATE)-$(DEB_VERSION_UPSTREAM_ORIG)

%:
	dh $@ --buildsystem cargo

execute_after_dh_auto_install:
	rm -rf $(addprefix $(TARGET)/,.github benchmark_tools compare smhasher)
	rm -f $(addprefix $(TARGET)/,.gitignore LICENSE-*)