File: rules

package info (click to toggle)
conkeror 1.0.3%2Bgit170123-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,988 kB
  • sloc: ansic: 280; sh: 255; xml: 173; makefile: 69
file content (27 lines) | stat: -rwxr-xr-x 914 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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Generating a xulrunner build id and other strings
DEBIAN_VERSION   := $(shell echo -n `head -1 debian/changelog | sed -e 's/^.*(\(.*\)).*$$/\\1/'`)
DATE := $(shell dpkg-parsechangelog | awk -F ': ' '$$1=="Date" {print $$2}')
BUILDID := debian@$(DEBIAN_VERSION)_$(shell date -d "$(DATE)" +%s)
US  = $(CURDIR)/debian/tmp/usr/share
USC = $(US)/conkeror

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export CFLAGS+=$(LDFLAGS)

%:
	dh $@

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr
	rm -f $(US)/doc/conkeror/COPYING $(USC)/Info.plist

	# Add generated Build ID and Debian version to version output
	sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' \
	    -i $(USC)/application.ini