~ubuntu-core-doc/gnome-user-docs/ubuntu-karmic

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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/cdbs/1/rules/utils.mk

DEB_DH_BUILDDEB_ARGS := -- -Zbzip2
DEB_CONFIGURE_EXTRA_FLAGS += --disable-scrollkeeper
DEB_DH_INSTALL_SOURCEDIR = debian/tmp

makebuilddir/gnome-user-guide::
	@gnome-autogen.sh --prefix=/usr --disable-scrollkeeper
	@echo "---"
	@make -C gnome2-accessibility-guide -f Makefile pot
	@echo "---"
	@make -C gnome2-user-guide -f Makefile pot
	@echo "---"

clean::
	@echo "---"
	@echo "Version should start with: `grep AC_INIT configure.in | cut -d'[' -f3 | cut -d']' -f1`+svn`head -n1 ChangeLog | cut -d' ' -f1 | sed s'/\-//g'` (add 'ubuntu<n>' as necessary)"
	@echo "---"
	rm -f debian/gnome-user-guide.links
	rm -f debian/gnome-user-guide-*.install

binary-post-install/gnome-user-guide::
	rm -rf debian/gnome-user-guide/var/lib/scrollkeeper

# This rule will fail if one language code is a prefix of another!
# But we can't just add a match for ${lang}_*, because dh_install will
# fail if there are no matches.
common-install-indep::
	for lang in $$(for ll in $$(sed -n -e's/^DOC_LINGUAS[[:space:]]*=[[:space:]]*//p' gnome2-*-guide/Makefile.am); \
	               do echo $$ll; done | sed -e's/_.*//' | sort -u); \
	do \
		echo /usr/share/gnome/help/'*'/$${lang}* > debian/gnome-user-guide-$${lang}.install; \
		echo /usr/share/omf/'*'/'*'-$${lang}'*'.omf >> debian/gnome-user-guide-$${lang}.install; \
	done

debian/control::
	(cat debian/control.in; \
	for lang in $$(for ll in $$(sed -n -e's/^DOC_LINGUAS[[:space:]]*=[[:space:]]*//p' gnome2-*-guide/Makefile.am); \
	               do echo $$ll; done | sed -e's/_.*//' | sort -u); \
	do \
		name=$$(isoquery -i 639 $$lang | sed -e's/;.*//' | cut -f4-); \
		sed -e"s/\$${ll}/$$lang/; s/\$${lang}/$$name/;" debian/control.lang; \
	done) > debian/control.new
	mv debian/control.new debian/control