summaryrefslogtreecommitdiff
path: root/freefilesync/debian/rules
blob: cc1a4931efaa630f57d25ed8748a23bfa526b86e (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
#!/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 appname=freefilesync
export pkgname=FreeFileSync
export prog2name=RealTimeSync
export debuilddir="debian"
export debuildappdir="${debuilddir}/${appname}"

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --sourcedirectory=FreeFileSync/Source
	dh_auto_clean --sourcedirectory=FreeFileSync/Source/RealTimeSync
	rm -f ${pkgname}.png ${prog2name}.png file_batch.png

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --sourcedirectory=FreeFileSync/Source
	dh_auto_build --sourcedirectory=FreeFileSync/Source/RealTimeSync

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --sourcedirectory=FreeFileSync/Source
	dh_auto_install --sourcedirectory=FreeFileSync/Source/RealTimeSync

	# make extra sure the files are not marked with executable
	find ${debuildappdir}/share/${pkgname} -type f -exec chmod -x '{}' \; || :
	#find %{buildroot}%{_datadir}/%{pkgname} -type f -exec chmod -x '{}' \; || :

	# desktop files
	mkdir -p ${debuildappdir}/usr/share/applications
	desktop-file-install --dir ${debuildappdir}/usr/share/applications ${debuilddir}/freefilesync.desktop
	desktop-file-install --dir ${debuildappdir}/usr/share/applications ${debuilddir}/realtimesync.desktop

	# application start script
	# none

	# man pages
	# none

	# mimetypes
	# none

	# icons
	unzip ${pkgname}/Build/Resources.zip ${pkgname}.png ${prog2name}.png file_batch.png
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/16x16/apps
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/32x32/apps
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/48x48/apps
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/64x64/apps
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/128x128/apps
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/16x16/mimetypes
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/32x32/mimetypes
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/48x48/mimetypes
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/64x64/mimetypes
	mkdir -p ${debuildappdir}/usr/share/icons/hicolor/128x128/mimetypes
	convert ${pkgname}.png -filter Lanczos -resize 16x16 ${debuildappdir}/usr/share/icons/hicolor/16x16/apps/${pkgname}.png
	convert ${pkgname}.png -filter Lanczos -resize 32x32 ${debuildappdir}/usr/share/icons/hicolor/32x32/apps/${pkgname}.png
	convert ${pkgname}.png -filter Lanczos -resize 48x48 ${debuildappdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png
	convert ${pkgname}.png -filter Lanczos -resize 64x64 ${debuildappdir}/usr/share/icons/hicolor/64x64/apps/${pkgname}.png
	convert ${pkgname}.png -filter Lanczos -resize 128x128 ${debuildappdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png
	convert ${pkgname}.png -filter Lanczos -resize 16x16 ${debuildappdir}/usr/share/icons/hicolor/16x16/mimetypes/application-x-freefilesync-ffs.png
	convert ${pkgname}.png -filter Lanczos -resize 32x32 ${debuildappdir}/usr/share/icons/hicolor/32x32/mimetypes/application-x-freefilesync-ffs.png
	convert ${pkgname}.png -filter Lanczos -resize 48x48 ${debuildappdir}/usr/share/icons/hicolor/48x48/mimetypes/application-x-freefilesync-ffs.png
	convert ${pkgname}.png -filter Lanczos -resize 64x64 ${debuildappdir}/usr/share/icons/hicolor/64x64/mimetypes/application-x-freefilesync-ffs.png
	convert ${pkgname}.png -filter Lanczos -resize 128x128 ${debuildappdir}/usr/share/icons/hicolor/128x128/mimetypes/application-x-freefilesync-ffs.png
	convert ${prog2name}.png -filter Lanczos -resize 16x16 ${debuildappdir}/usr/share/icons/hicolor/16x16/apps/${prog2name}.png
	convert ${prog2name}.png -filter Lanczos -resize 32x32 ${debuildappdir}/usr/share/icons/hicolor/32x32/apps/${prog2name}.png
	convert ${prog2name}.png -filter Lanczos -resize 48x48 ${debuildappdir}/usr/share/icons/hicolor/48x48/apps/${prog2name}.png
	convert ${prog2name}.png -filter Lanczos -resize 64x64 ${debuildappdir}/usr/share/icons/hicolor/64x64/apps/${prog2name}.png
	convert ${prog2name}.png -filter Lanczos -resize 128x128 ${debuildappdir}/usr/share/icons/hicolor/128x128/apps/${prog2name}.png
	convert ${prog2name}.png -filter Lanczos -resize 16x16 ${debuildappdir}/usr/share/icons/hicolor/16x16/mimetypes/application-x-freefilesync-real.png
	convert ${prog2name}.png -filter Lanczos -resize 32x32 ${debuildappdir}/usr/share/icons/hicolor/32x32/mimetypes/application-x-freefilesync-real.png
	convert ${prog2name}.png -filter Lanczos -resize 48x48 ${debuildappdir}/usr/share/icons/hicolor/48x48/mimetypes/application-x-freefilesync-real.png
	convert ${prog2name}.png -filter Lanczos -resize 64x64 ${debuildappdir}/usr/share/icons/hicolor/64x64/mimetypes/application-x-freefilesync-real.png
	convert ${prog2name}.png -filter Lanczos -resize 128x128 ${debuildappdir}/usr/share/icons/hicolor/128x128/mimetypes/application-x-freefilesync-real.png
	convert file_batch.png -filter Lanczos -resize 16x16 ${debuildappdir}/usr/share/icons/hicolor/16x16/mimetypes/application-x-freefilesync-batch.png
	convert file_batch.png -filter Lanczos -resize 32x32 ${debuildappdir}/usr/share/icons/hicolor/32x32/mimetypes/application-x-freefilesync-batch.png
	convert file_batch.png -filter Lanczos -resize 48x48 ${debuildappdir}/usr/share/icons/hicolor/48x48/mimetypes/application-x-freefilesync-batch.png
	convert file_batch.png -filter Lanczos -resize 64x64 ${debuildappdir}/usr/share/icons/hicolor/64x64/mimetypes/application-x-freefilesync-batch.png
	convert file_batch.png -filter Lanczos -resize 128x128 ${debuildappdir}/usr/share/icons/hicolor/128x128/mimetypes/application-x-freefilesync-batch.png
	rm -f ${pkgname}.png ${prog2name}.png file_batch.png
bgstack15