~ubuntu-branches/ubuntu/oneiric/kde-l10n-gl/oneiric-proposed

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
#!/usr/bin/make -f
# ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !#
# DO NOT EVEN THINK ABOUT CHANGING THIS FILE DIRECTLY! ! ! !
# PLEASE USE THE BZR BRANCH AS SEEN IN debian/control
# MAKE YOUR CHANGES THERE AND THEN RUN debian/build-l10n.sh
# kthxbai :)
################################################################################
################################################################################
################################################################################
################################################################################

# ++ Setup && Error Handling ++ #
ifeq ($(shell basename `pwd`),debian)
$(error E: This must not be run from debian/)
else
	include ./debian/config
	ifndef SVNREV
		ERROR_CONFIG_MISSING_NAME = "SVNREV"
	else ifndef TYPE
		ERROR_CONFIG_MISSING_NAME = "TYPE"
	endif
	ifdef ERROR_CONFIG_MISSING_NAME
$(error E: Config value for field $(ERROR_CONFIG_MISSING_NAME) missing)
	endif
endif

ifeq ($(TYPE),stable)
	export SVNURL=svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kde4
else
	ifeq ($(TYPE),unstable)
		export SVNURL=svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
	else
$(error E: Value of SVNURL unknown (must be stable or unstable))
	endif
endif

# ++ L10n Fetching ++ #
# ++++ App L10n ++++ #

get-messages:

# ++++ Desktop Files ++++ #
get-desktop-sc:
	# Fetch all and any desktop file pos for KDE core modules from stable
	rev="-r${SVNREV}"; \
	cd messages; \
		for module in *; do \
			args="$${rev} $(SVNURL)/gl/messages/$${module}"; \
			if cd $${module} 2> /dev/null ; then \
				for file in `svn ls $${args}/ | grep "desktop_.*\.po"` ; do \
					svn export $${args}/$${file}; \
				done; \
				cd ..; \
			fi; \
		done; \
	cd ../..;

get-desktop-extragear:
	# Fetch playground and extragear desktop file pos as per list from pkg-kde-tools
	cd messages/kdelibs; \
		for file in `cat /usr/lib/kubuntu-desktop-i18n/desktop-template-list`; do \
			svn export -r${SVNREV} svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/gl/messages/$${file}.po; \
		done; \
	cd ../..;

get-desktop: get-desktop-sc get-desktop-extragear

# ++++ Meta ++++ #
get-l10n: $(ERROR) get-messages get-desktop

# L10n
.PHONY: get-l10n
# Messages
.PHONY: get-messages
# Desktop files
.PHONY: get-desktop get-desktop-sc get-desktop-extragear

# ++ Build Rules ++ #
%:
	dh $@ --with kde

override_dh_install:
	dh_install -i
	rm -f debian/kde-l10n-gl/usr/share/locale/gl/entry.desktop