File: rules

package info (click to toggle)
libjson-xs-perl 2.320-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 456 kB
  • sloc: perl: 521; makefile: 20
file content (27 lines) | stat: -rwxr-xr-x 555 bytes parent folder | download | duplicates (2)
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

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O0
else
  ifeq (sparc,$(DEB_HOST_ARCH))
    CFLAGS+="-O1"
  else
    CFLAGS+="-O2"
  endif
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- OPTIMIZE="$(CFLAGS)"

override_dh_installexamples:
	dh_installexamples
	sed -i '1s|^#!/opt/bin/perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/*