File: rules

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

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

%:
	dh $@ --buildsystem cargo

# TODO: teach dh-cargo to avoid non-main crates in main crate
# and mangle Cargo.toml for non-main crates
execute_after_dh_auto_install:
	rm -rf debian/librust-lazy-regex-dev/usr/share/cargo/registry/lazy-regex-2.*/src/proc_macros
	perl -0777 -p -i \
		-e 's/path = "src\/proc_macros"\n//;' \
		-e 's/\[workspace\][^\n]*(\n[^\[\n][^\n]*)*//g;' \
		debian/librust-lazy-regex-dev/usr/share/cargo/registry/lazy-regex-2.*/Cargo.toml