~ubuntu-branches/ubuntu/intrepid/belocs-locales-bin/intrepid

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

DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))

topdir=$(shell pwd)
debdir=${topdir}/debian
tmpdir=${debdir}/${DEB_SOURCE_PACKAGE}

configure-stamp:
	chmod a+x ${topdir}/configure
	${topdir}/configure --prefix=/usr \
	  --datadir=/usr/share --sysconfdir=/etc/belocs
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	make CFLAGS="-O2 -g -Wall"
	#  Build translated manual pages
	make -C manpages
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-make distclean
	-make -C manpages clean
	dh_clean
	-rm -f debian/config
	-debconf-updatepo

install: build-stamp
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs -p$(DEB_SOURCE_PACKAGE)
	make DESTDIR=${tmpdir} install
	install -m 755 sbin/locale-gen $(tmpdir)/usr/sbin/
	install -m 755 sbin/update-locale $(tmpdir)/usr/sbin/
	install -m 755 sbin/validlocale $(tmpdir)/usr/sbin/
	install -m 644 debian/locale-gen.conf $(tmpdir)/etc/belocs/
	install -m 755 debian/*-language-pack $(tmpdir)/usr/share/locales
	# Substitute __SUPPORTED_LOCALES__.
	# We cannot Build-Depends: belocs-locales-data because for now
	# belocs-locales-data depends on belocs-locales-bin, so a copy
	# is shipped into debian/SUPPORTED until this is solved.

	# Ubuntu change: Don't do this.  We don't want this to select locales.
	# perl -pe 'BEGIN {undef $$/; open(IN, "debian/SUPPORTED"); $$j=<IN>;} s/__SUPPORTED_LOCALES__/$$j/g;' debian/config.in > debian/config


binary-indep:
	dh_testdir

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs debian/README.magic debian/NEWS.Debian
	dh_installman
	dh_installchangelogs
	#dh_installdebconf
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

deb:
	dpkg-buildpackage -rfakeroot -i'/CVS|/\.cvsignore|/\.pc|\.git'

cvsup:
	cd crypt && cvs update -A md5.[ch]
	cd intl && cvs update -A explodename.c l10nflist.c loadinfo.h
	-rm -f locale/Makefile
	cd locale && cvs update -P -d -A && rm Makefile

.PHONY: binary binary-arch binary-indep clean checkroot build install \
  deb cvsup