File: rules

package info (click to toggle)
fuse-emulator 1.5.7%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,024 kB
  • sloc: ansic: 87,196; sh: 11,456; perl: 3,916; makefile: 991; yacc: 245; lex: 139
file content (64 lines) | stat: -rwxr-xr-x 2,001 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f

BUILD_DIR_GTK=$(CURDIR)/build-gtk
BUILD_DIR_SDL=$(CURDIR)/build-sdl

CONFIGURE_OPTIONS := --with-roms-dir=/usr/share/spectrum-roms \
	--with-bash-completion-dir=/usr/share/bash-completion/completions \
	--enable-desktop-integration --with-audio-driver=sdl

CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) \
	-DGLIB_DISABLE_DEPRECATION_WARNINGS \
	-DGDK_DISABLE_DEPRECATION_WARNINGS

ifeq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
	CPPFLAGS += -DNDEBUG -DG_DISABLE_CAST_CHECKS
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -B$(BUILD_DIR_GTK) -- $(CONFIGURE_OPTIONS) --with-x
	dh_auto_configure -B$(BUILD_DIR_SDL) -- $(CONFIGURE_OPTIONS) --with-sdl

override_dh_auto_build:
	dh_auto_build -B$(BUILD_DIR_GTK) -- EXEEXT=-gtk
	cat $(BUILD_DIR_GTK)/data/fuse.desktop | \
		sed -e 's,Exec=.*,Exec=/usr/bin/fuse-gtk %f,' \
		    -e 's,^Name=\(.*\),Name=\1 (GTK+),' > \
		$(BUILD_DIR_GTK)/fuse-gtk.desktop

	dh_auto_build -B$(BUILD_DIR_SDL) -- EXEEXT=-sdl
	cat $(BUILD_DIR_SDL)/data/fuse.desktop | \
		sed -e 's,Exec=.*,Exec=/usr/bin/fuse-sdl %f,' \
		    -e 's,^Name=\(.*\),Name=\1 (SDL),' \
		    -e 's,;GTK,,' > \
		$(BUILD_DIR_SDL)/fuse-sdl.desktop

override_dh_auto_install:
	dh_auto_install -B$(BUILD_DIR_GTK) -- EXEEXT=-gtk
	dh_auto_install -B$(BUILD_DIR_SDL) -- EXEEXT=-sdl

override_dh_auto_test:
	dh_auto_test -B$(BUILD_DIR_GTK)
	dh_auto_test -B$(BUILD_DIR_SDL)

override_dh_auto_clean:
	dh_auto_clean -B$(BUILD_DIR_GTK)
	dh_auto_clean -B$(BUILD_DIR_SDL)

include /usr/share/dpkg/pkg-info.mk
VERSION := $(DEB_VERSION_UPSTREAM)
UPSTREAM_VERSION := $(shell echo $(VERSION) | sed 's/+dfsg1//')

get-orig-source:
	dh_testdir
	uscan --rename --download-current-version
	mkdir "fuse-emulator-$(VERSION)"
	tar -C "fuse-emulator-$(VERSION)" \
		--strip-components=1 --exclude=roms \
		-xaf "../fuse-emulator_$(UPSTREAM_VERSION).orig.tar.gz"
	fakeroot tar -caf "../fuse-emulator_$(VERSION).orig.tar.xz" \
		"fuse-emulator-$(VERSION)"
	rm -rf "fuse-emulator-$(VERSION)"