d/rules: convert ponyprog.html to utf-8 if needed
Carsten Schoenert
3 years ago
16 | 16 | |
17 | 17 | ICON_SIZES=128x128 64x64 48x48 32x32 24x24 16x16 |
18 | 18 | |
19 | # detect the encoding of the file ponyprog.html | |
20 | HTML_FILE_ENCODING = $(shell file -b --mime-encoding distribution/innosetup/ponyprog.html) | |
19 | 21 | # out of tree build folder for application |
20 | 22 | DEB_BUILD_DIR=debian/build |
21 | 23 | # default install folder |
42 | 44 | # configuring PonyProg application # |
43 | 45 | #################################### |
44 | 46 | dh_auto_configure --sourcedirectory=$(CURDIR) --builddirectory=$(DEB_BUILD_DIR) -- $(DEB_PONYPROG_CMAKE_OPTS) |
47 | # convert ponyprog.html to utf-8 if needed | |
48 | if [ "$(HTML_FILE_ENCODING)" != "utf-8" ]; then \ | |
49 | mv ./distribution/innosetup/ponyprog.html ./distribution/innosetup/ponyprog.html.in ;\ | |
50 | iconv -f $(HTML_FILE_ENCODING) -t utf8 ./distribution/innosetup/ponyprog.html.in > ./distribution/innosetup/ponyprog.html ;\ | |
51 | fi | |
45 | 52 | |
46 | 53 | override_dh_auto_build: |
47 | 54 | dh_auto_build --sourcedirectory=$(CURDIR) --builddirectory=$(DEB_BUILD_DIR) |