summaryrefslogtreecommitdiffstats
path: root/debian/squeeze/applications/koffice-i18n/debian/rules
blob: 478c97b9dd029a2ac0f06e9baba32726610732e2 (plain)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
                               && echo xz || echo bzip2)

languages = `ls -1d *i18n*`

build-stamp:
	dh_testdir

	# Regenerate build system
	! [ -f /usr/share/libtool/ltmain.sh ] || \
	cp -f /usr/share/libtool/ltmain.sh admin/ltmain.sh
	! [ -f /usr/share/libtool/config/ltmain.sh ] || \
	cp -f /usr/share/libtool/config/ltmain.sh admin/ltmain.sh
	cp -f /usr/share/aclocal/libtool.m4 admin/libtool.m4.in
	
	#Configure languages.
	-for i in $(languages); do \
	  cd  $$i && \
	  autoreconf && automake -f && $(MAKE) -f ../admin/Makefile.common && \
	  ./configure $(configkde); \
	  $(MAKE); \
	  cd ..; \
	done

	touch build-stamp

build: build-stamp
-include debian/debiandirs

clean: 
	dh_clean
	dh_testdir
	
	# Remove all language directories.
	rm -rf build-stamp 
	rm -rf debian/*18n*

binary-indep: build
	dh_testdir
	dh_testroot
	dh_clean -k
	
	-for i in $(languages); do \
	  ( \
	   cd $$i && \
	   echo $$(install_dir) && \
	   $(MAKE) install DESTDIR=`pwd`/../debian/$$i-trinity; \
	   cd .. \
	  ) \
	done
	

	mkdir debian/koffice-i18n-engb-trinity
	cp -aR debian/koffice-i18n-en_GB-trinity/* debian/koffice-i18n-engb-trinity/
	
	mkdir debian/koffice-i18n-ptbr-trinity
	cp -aR debian/koffice-i18n-pt_BR-trinity/* debian/koffice-i18n-ptbr-trinity/
	
	mkdir debian/koffice-i18n-srlatin-trinity
	cp -aR debian/koffice-i18n-sr@Latn-trinity/* debian/koffice-i18n-srlatin-trinity/
	
	mkdir debian/koffice-i18n-zhcn-trinity
	cp -aR debian/koffice-i18n-zh_CN-trinity/* debian/koffice-i18n-zhcn-trinity/

	mkdir debian/koffice-i18n-zhtw-trinity
	cp -aR debian/koffice-i18n-zh_TW-trinity/* debian/koffice-i18n-zhtw-trinity/
	

	#Removing duplicate kdgantt.mo files.
	-rm -f `find . -name "kdgantt.mo"`

	dh_installdocs
	dh_installmenu
	dh_installchangelogs
	dh_strip
	dh_link
	dh_compress -X.docbook -X.css -X-license -X.dcl -X.bz2
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb $(DEB_DH_BUILDDEB_ARGS)

binary:	binary-indep 

.PHONY: binary binary-indep clean