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

2 by Jonathan Riddell
New upstream release, initial upload
1
#!/usr/bin/make -f
31 by Harald Sitter
* New upstream release
2
# ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !#
3
# DO NOT EVEN THINK ABOUT CHANGING THIS FILE DIRECTLY! ! ! !
4
# PLEASE USE THE BZR BRANCH AS SEEN IN debian/control
5
# MAKE YOUR CHANGES THERE AND THEN RUN debian/build-l10n.sh
6
# kthxbai :)
7
################################################################################
8
################################################################################
9
################################################################################
10
################################################################################
7 by Jonathan Riddell
New upstream beta release
11
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
12
# ++ Setup && Error Handling ++ #
13
ifeq ($(shell basename `pwd`),debian)
14
$(error E: This must not be run from debian/)
15
else
16
	include ./debian/config
17
	ifndef SVNREV
18
		ERROR_CONFIG_MISSING_NAME = "SVNREV"
19
	else ifndef TYPE
20
		ERROR_CONFIG_MISSING_NAME = "TYPE"
21
	endif
22
	ifdef ERROR_CONFIG_MISSING_NAME
23
$(error E: Config value for field $(ERROR_CONFIG_MISSING_NAME) missing)
24
	endif
25
endif
26
27
ifeq ($(TYPE),stable)
28
	export SVNURL=svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kde4
29
else
30
	ifeq ($(TYPE),unstable)
31
		export SVNURL=svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
32
	else
33
$(error E: Value of SVNURL unknown (must be stable or unstable))
34
	endif
35
endif
36
37
# ++ L10n Fetching ++ #
38
# ++++ App L10n ++++ #
39
51 by Harald Sitter
* New upstream release (svn: 1242643, type: stable)
40
get-messages:
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
41
42
# ++++ Desktop Files ++++ #
43
get-desktop-sc:
32 by Harald Sitter
* Comment debian/rules a bit more.
44
	# Fetch all and any desktop file pos for KDE core modules from stable
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
45
	rev="-r${SVNREV}"; \
7 by Jonathan Riddell
New upstream beta release
46
	cd messages; \
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
47
		for module in *; do \
48
			args="$${rev} $(SVNURL)/gl/messages/$${module}"; \
49
			if cd $${module} 2> /dev/null ; then \
50
				for file in `svn ls $${args}/ | grep "desktop_.*\.po"` ; do \
51
					svn export $${args}/$${file}; \
52
				done; \
53
				cd ..; \
54
			fi; \
19 by Jonathan Riddell
Update rules to download desktop file translations
55
		done; \
56
	cd ../..;
57
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
58
get-desktop-extragear:
32 by Harald Sitter
* Comment debian/rules a bit more.
59
	# Fetch playground and extragear desktop file pos as per list from pkg-kde-tools
19 by Jonathan Riddell
Update rules to download desktop file translations
60
	cd messages/kdelibs; \
61
		for file in `cat /usr/lib/kubuntu-desktop-i18n/desktop-template-list`; do \
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
62
			svn export -r${SVNREV} svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/gl/messages/$${file}.po; \
19 by Jonathan Riddell
Update rules to download desktop file translations
63
		done; \
64
	cd ../..;
31 by Harald Sitter
* New upstream release
65
51 by Harald Sitter
* New upstream release (svn: 1242643, type: stable)
66
get-desktop: get-desktop-sc get-desktop-extragear
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
67
68
# ++++ Meta ++++ #
69
get-l10n: $(ERROR) get-messages get-desktop
70
71
# L10n
72
.PHONY: get-l10n
73
# Messages
51 by Harald Sitter
* New upstream release (svn: 1242643, type: stable)
74
.PHONY: get-messages
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
75
# Desktop files
51 by Harald Sitter
* New upstream release (svn: 1242643, type: stable)
76
.PHONY: get-desktop get-desktop-sc get-desktop-extragear
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
77
78
# ++ Build Rules ++ #
31 by Harald Sitter
* New upstream release
79
%:
49 by Jonathan Riddell, Jonathan Riddell, Felix Geyer
[ Jonathan Riddell ]
80
	dh $@ --with kde
33 by Harald Sitter
* Strip entry.desktop file to prevent duplication in KDE's various
81
82
override_dh_install:
83
	dh_install -i
50 by Harald Sitter
* Enable easy switching between stable and unstable translations
84
	rm -f debian/kde-l10n-gl/usr/share/locale/gl/entry.desktop