File: rules

package info (click to toggle)
xjig 2.4-14.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 892 kB
  • sloc: cpp: 10,177; makefile: 1,142; perl: 23
file content (34 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
28
29
30
31
32
33
34
#!/usr/bin/make -f

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
# These flags break the build
#CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
#CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS += -Wall

CXX=c++ -g -Wall

%:
	dh $@

override_dh_auto_build:
	$(checkdir)
	xmkmf # djh
	make depend # djh
	cp xjig.man xjig.6
	if [ -x configure ]; then ./configure --prefix=/usr/games; fi
	make CXX="$(CXX) $(CPPFLAGS) $(LDFLAGS)"
	dh_auto_build

override_dh_install:
	make install CXX="$(CXX)" --remove-section=.comment prefix=`pwd`/debian/xjig/usr/games ;\
	mkdir -p debian/xjig/usr/games
	chmod a+rx xjig-random
#	cp xjig-random debian/xjig/usr/games
	cp debian/xjig/usr/bin/xjig debian/xjig/usr/games/
	dh_install
	rm -rf debian/xjig/usr/bin