| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
PACKAGE = cloc |
| 6 |
BIN = $(PACKAGE) |
| 7 |
BINDIR = debian/$(PACKAGE)/usr/bin |
| 8 |
DOCDIR = debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/doc |
| 9 |
PODDATE = $(shell date --date=@$(SOURCE_DATE_EPOCH) -u "+%Y-%m-%d") |
| 10 |
export PODDATE |
| 11 |
|
| 12 |
override_dh_auto_build: |
| 13 |
rm -f $(PACKAGE)/Unix/$(PACKAGE).1 |
| 14 |
cd Unix && $(MAKE) man |
| 15 |
|
| 16 |
override_dh_auto_install: |
| 17 |
install -D -m 755 Unix/$(BIN) $(BINDIR)/$(PACKAGE) |
| 18 |
|
| 19 |
override_dh_installchangelogs: |
| 20 |
dh_installchangelogs Unix/NEWS |
| 21 |
|
| 22 |
override_dh_auto_test: |
| 23 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 24 |
cd Unix && make test |
| 25 |
endif |
| 26 |
|
| 27 |
TEST_ARTIFACTS := \ |
| 28 |
tests/inputs/issues/540/hello.f \ |
| 29 |
tests/inputs/issues/132/ignore_git/hi.py \ |
| 30 |
tests/inputs/issues/597/results.yaml.csv \ |
| 31 |
tests/inputs/issues/670/results.yaml.csv \ |
| 32 |
'tests/inputs/issues/898/irregular"file2.md' |
| 33 |
|
| 34 |
override_dh_auto_clean: |
| 35 |
# clean up after tests; unfortunately, this will be brittle |
| 36 |
$(RM) $(TEST_ARTIFACTS) |
| 37 |
dh_auto_clean |
| 38 |
|
| 39 |
%: |
| 40 |
dh $@ |