File: rules

package info (click to toggle)
ami 1.0.1-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,532 kB
  • ctags: 2,181
  • sloc: ansic: 19,793; sh: 357; makefile: 216
file content (132 lines) | stat: -rwxr-xr-x 3,185 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/make -f
#-*- makefile -*-

#export DH_VERBOSE=1
export DH_COMPAT=2


DOCS= README

COMMON_CONFIGURE_FLAG=--prefix=/usr --sysconfdir=/etc --with-hangul-keyboard=2
STANDALONE_CONFIGURE_FLAG=$(COMMON_CONFIGURE_FLAG) --enable-gnome-applet=no
GNOME_CONFIGURE_FLAG=$(COMMON_CONFIGURE_FLAG) --enable-gnome-applet=yes

STANDALONE_INSTALL_PREFIX=debian/ami/usr
GNOME_INSTALL_PREFIX=debian/ami-gnome/usr

STANDALONE_INSTALL_FLAG= prefix=`pwd`/debian/ami/usr \
	sysconfdir=`pwd`/debian/ami/etc
GNOME_INSTALL_FLAG= prefix=`pwd`/debian/ami-gnome/usr \
	sysconfdir=`pwd`/debian/ami-gnome/etc

build: build-stamp
build-stamp: build-standalone-stamp build-gnome-stamp
	touch $@

build-standalone: build-standalone-stamp
build-standalone-stamp: 
	install -d build/standalone
	cd build/standalone && \
	   ../../configure $(STANDALONE_CONFIGURE_FLAG)
	$(MAKE) -C build/standalone

#	# Make hanja dictionary converter tarball
	tar zcf build/hanjadic.tar.gz hanjadic

	touch $@

build-gnome: build-gnome-stamp
build-gnome-stamp: 
	install -d build/gnome
	cd build/gnome && \
	  ../../configure $(GNOME_CONFIGURE_FLAG)
	$(MAKE) -C build/gnome
	cp debian/ami.dic hanja.dic
	touch $@

debian/docs: debian/rules
	@-rm -f $@
	for D in $(DOCS); do \
	  echo $$D >> $@; \
	done

debian/examples: debian/rules
	@-rm -f $@
	echo build/hanjadic.tar.gz >> $@
	echo patch/* >> $@

clean:
	dh_testdir
	dh_testroot

	rm -rf build
	rm -rf $(TARDIR)
	rm -f hanja.dic

	rm -f debian/docs
	rm -f debian/examples

	rm -f build-stamp install-stamp
	rm -f build-standalone-stamp build-gnome-stamp
	rm -f install-standalone-stamp install-gnome-stamp

	dh_clean

install: install-stamp
install-stamp: install-standalone-stamp install-gnome-stamp
	touch $@

install-standalone: install-standalone-stamp
install-standalone-stamp: build-standalone-stamp
	dh_testversion 2
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install -C build/standalone $(STANDALONE_INSTALL_FLAG)

#	# install Hanja dictionary
	install -d $(STANDALONE_INSTALL_PREFIX)/share/ami/
	install -m644 hanja.dic $(STANDALONE_INSTALL_PREFIX)/share/ami/hanja.dic

	touch $@

install-gnome: install-gnome-stamp
install-gnome-stamp: build-gnome-stamp install-standalone-stamp
	$(MAKE) install -C build/gnome $(GNOME_INSTALL_FLAG)

	rm -f $(GNOME_INSTALL_PREFIX)/bin/ami_applet
	rm -f $(GNOME_INSTALL_PREFIX)/bin/wmami
	rm -f $(GNOME_INSTALL_PREFIX)/share/ami/gtkrc
	rmdir $(GNOME_INSTALL_PREFIX)/share/ami/
	mv $(GNOME_INSTALL_PREFIX)/bin/ami $(GNOME_INSTALL_PREFIX)/bin/ami_applet

	touch $@

# Build architecture-independent files here.
binary-indep: build install

# Build architecture-dependent files here.
binary-arch: build install debian/docs debian/examples
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
#	dh_installmanpages -a 
	dh_undocumented -pami -a ami.1 wmami.1
	dh_undocumented -pami-gnome -a ami_applet.1
	dh_installchangelogs -a ChangeLog
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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