File: rules

package info (click to toggle)
tsocks 1.8beta5%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 972 kB
  • sloc: ansic: 7,664; sh: 3,085; makefile: 164
file content (37 lines) | stat: -rwxr-xr-x 1,124 bytes parent folder | download
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
34
35
36
37
#!/usr/bin/make -f

export DH_VERBOSE=1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
package=tsocks

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-hostnames --with-conf=/etc/tsocks.conf

override_dh_auto_clean:
	dh_auto_clean
	$(RM) config.status

override_dh_auto_install:
	install -m 600 tsocks.conf.complex.example $(CURDIR)/debian/$(package)/etc/tsocks.conf
	install validateconf $(CURDIR)/debian/$(package)/usr/bin
	install inspectsocks $(CURDIR)/debian/$(package)/usr/bin
	install saveme $(CURDIR)/debian/$(package)/usr/bin
	install tsocks $(CURDIR)/debian/$(package)/usr/bin
	dh_auto_install

execute_before_dh_gencontrol:
	for pkg in libc6-dev libc6.1-dev libc0.3-dev musl-dev; do \
		pkg="$$pkg:$(DEB_HOST_ARCH)"; \
		pkgname=`dpkg-query -W -f='$${source:Package}' $$pkg`; \
		version=`dpkg-query -W -f='$${source:Version}' $$pkg`; \
		if [ -n "$$version" ]; then \
			echo "$(DEB_SOURCE):Built-Using=$$pkgname (= $$version)" >> debian/$(DEB_SOURCE).substvars; \
			break; \
		fi; \
	done