summaryrefslogtreecommitdiff
path: root/irfanview/debian/rules
blob: c05c160062e54300767a22e6577f763486411646 (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
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export _prefix=/usr
export _datadir="${_prefix}/share"
export appname=irfanview
export appname_32=irfanview-bin32
export appname_64=irfanview-bin64
export appname_common=irfanview-common
export appdir_32=irfanview32
export appdir_64=irfanview64
export debuilddir="debian"
export buildroot="${debuilddir}/${appname}"
export buildroot_common="${debuilddir}/${appname_common}"
export buildroot_32="${debuilddir}/${appname_32}"
export buildroot_64="${debuilddir}/${appname_64}"

%:
	dh $@

override_dh_fixperms:
	dh_fixperms
	chmod 0666 ${buildroot_32}${_datadir}/${appdir_32}/i_view32.ini || :
	chmod 0666 ${buildroot_64}${_datadir}/${appdir_64}/i_view64.ini || :

override_dh_auto_install:
	dh_auto_install
	# common
	tar -zxf debian/irfanview-icons.tgz irfanview-circle.svg
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/16x16/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/22x22/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/24x24/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/32x32/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/48x48/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/64x64/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/96x96/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/128x128/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/256x256/apps
	mkdir -p ${buildroot_common}${_datadir}/icons/hicolor/scalable/apps
	convert -background none -filter Lanczos -resize 16x16 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/16x16/apps/${appname}.png
	convert -background none -filter Lanczos -resize 22x22 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/22x22/apps/${appname}.png
	convert -background none -filter Lanczos -resize 24x24 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/24x24/apps/${appname}.png
	convert -background none -filter Lanczos -resize 32x32 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/32x32/apps/${appname}.png
	convert -background none -filter Lanczos -resize 48x48 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/48x48/apps/${appname}.png
	convert -background none -filter Lanczos -resize 64x64 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/64x64/apps/${appname}.png
	convert -background none -filter Lanczos -resize 96x96 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/96x96/apps/${appname}.png
	convert -background none -filter Lanczos -resize 128x128 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/128x128/apps/${appname}.png
	convert -background none -filter Lanczos -resize 256x256 irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/256x256/apps/${appname}.png
	cp -p irfanview-circle.svg ${buildroot_common}${_datadir}/icons/hicolor/scalable/apps/${appname}.svg
	rm -f ./irfanview-circle.svg || :

override_dh_auto_clean:
	dh_auto_clean
	rm -rf ./irfanview-circle.svg || :
bgstack15