File: rules

package info (click to toggle)
childsplay 2.6.5%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 30,856 kB
  • sloc: python: 18,926; xml: 360; makefile: 21
file content (37 lines) | stat: -rwxr-xr-x 1,299 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2014 Sergio Talens-Oliag <sto@debian.org>

%:
	dh $@ --with python2

# Remove the dh_auto_clean, dh_auto_build and dh_auto_install step
override_dh_auto_clean:
override_dh_auto_build:
override_dh_auto_install:

override_dh_installdirs:
	dh_installdirs
	# Generate .mo files instead of using the pre-generated ones, useful if
	# we add patches later.
	# Note that the following code handles pt_BR as an special case, if more
	# country locales are needed we will need to review the way we handle
	# that.
	for po in `ls po/childsplay_*_*.po`; do \
		lang=`echo $$po | sed -e 's%^po/childsplay_%%;s%_...po$$%%'`; \
		[ "$$po" = "po/childsplay_pt_BR.po" ] && lang="pt_BR"; \
		mkdir -p debian/childsplay/usr/share/locale/$$lang/LC_MESSAGES/; \
		msgfmt $$po -o debian/childsplay/usr/share/locale/$$lang/LC_MESSAGES/childsplay.mo; \
	done

override_dh_install:
	dh_install
	# Remove wrong executable files
	find debian/childsplay/usr/share/childsplay/CPData/Quiz_historyData/ \
	     -type f -exec chmod -x {} \;

override_dh_link:
	# Remove DejaVu files (the font is replaced by a link)
	rm -f debian/childsplay/usr/share/childsplay/SPData/DejaVu*
	rm -f debian/childsplay/usr/share/childsplay/SPData/base/DejaVu*
	dh_link