File: rules

package info (click to toggle)
etoile 0+20080616+dfsg-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 4,976 kB
  • ctags: 160
  • sloc: objc: 9,087; sh: 270; makefile: 57
file content (76 lines) | stat: -rwxr-xr-x 2,017 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
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/GNUstep/debian/config.mk

export GNUSTEP_MAKEFILES := $(GS_MAKE_DIR)
d_app := $(CURDIR)/debian/dictionaryreader.app

# Make sure there are no undefined symbols and avoid unnecessary
# dependencies.
LDFLAGS := -Wl,-z,defs -Wl,--as-needed

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optim := debug=yes
endif

build: build-stamp

build-stamp:
	dh_testdir
	$(MAKE) -C Etoile/Services/User/DictionaryReader $(optim) \
	  LDFLAGS="$(LDFLAGS)" messages=yes
	convert Etoile/Services/User/DictionaryReader/Resources/dict.png \
	  -resize 32x32 DictionaryReader.xpm
	touch $@

clean:
	dh_testdir
	dh_testroot
	$(MAKE) -C Etoile/Services/User/DictionaryReader distclean
	dh_clean build-stamp DictionaryReader.xpm

install: build
	dh_testdir
	dh_testroot
	dh_prep
	cd Etoile/Services/User/DictionaryReader ; \
	  $(MAKE) install DESTDIR=$(d_app) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM

# Remove invalid .desktop file and install ours.
	rm $(d_app)$(GNUSTEP_SYSTEM_APPS)/*.app/Resources/*.desktop
	install -D -m 644 debian/DictionaryReader.desktop \
	  $(d_app)/usr/share/applications/DictionaryReader.desktop
# Install the XPM icon.
	install -D -m 644 DictionaryReader.xpm \
	  $(d_app)/usr/share/pixmaps/DictionaryReader.xpm

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs Etoile/ChangeLog
	dh_installdocs
	dh_installmenu
	dh_installman debian/DictionaryReader.1
	gsdh_gnustep
ifeq ($(GS_USE_FHS),yes)
	dh_installdirs usr/share/GNUstep
	mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/DictionaryReader.app/Resources \
	  $(d_app)/usr/share/GNUstep/DictionaryReader.app
	dh_link usr/share/GNUstep/DictionaryReader.app \
	  $(GNUSTEP_SYSTEM_APPS)/DictionaryReader.app/Resources
endif
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install