File: rules

package info (click to toggle)
neartree 5.1.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,380 kB
  • sloc: cpp: 12,313; ansic: 5,956; makefile: 495
file content (33 lines) | stat: -rwxr-xr-x 1,012 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export INSTALL_LIB := lib/$(DEB_HOST_MULTIARCH)

%:
	dh  $@

DEBNAME=neartree
DEBVERSION=5.1.1+dfsg1
UPSTREAMTAR=NearTree-5.1.1.tar.gz
UPSTREAMURL=https://github.com/yayahjb/neartree/archive/$(UPSTREAMTAR)
TDIR=$(DEBNAME)-$(DEBVERSION)
get-orig-source:
	[ ! -e $(TDIR) ] || (echo "Unpack dir $(TDIR) exists, exiting." ; false)
	mkdir -p $(TDIR)
	[ -f $(UPSTREAMTAR) ] || wget $(UPSTREAMURL)
	tar -C $(TDIR) --strip-components=1 -zxf $(UPSTREAMTAR)
	# Remove unnecessary Datagen
	rm -r $(TDIR)/DataGen
	# PDF paper has unknown copyright status
	rm $(TDIR)/NearTree/Andrews_2001_TNEAR.pdf
	# Move to lower dir
	mv $(TDIR)/NearTree/* $(TDIR)/
	rmdir $(TDIR)/NearTree
	tar -zcf $(DEBNAME)_$(DEBVERSION).orig.tar.gz $(TDIR)