summaryrefslogtreecommitdiff
path: root/freefilesync/debian/rules
blob: 2654668c366529aa04df123a540dce6b817086a6 (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
#!/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

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

include /usr/share/dpkg/architecture.mk

include /usr/share/dpkg/buildtools.mk

# Produce .debug_info (used by dh_dwz)
CXXFLAGS += -g

# Enable PIE
#CXXFLAGS += -fpie
#LDFLAGS += -pie

#stackrpms,2: I put APP_NAME_SUFFIX in Makefile
# libatomic stuff is for ubuntu only

%:
	dh $@ --sourcedirectory=FreeFileSync/Source

execute_after_dh_auto_clean:
	# Now, auto_clean RealTimeSync
	dh_auto_clean --sourcedirectory=FreeFileSync/Source/RealTimeSync

execute_after_dh_auto_build:
	# Now, auto_build RealTimeSync
	dh_auto_build --sourcedirectory=FreeFileSync/Source/RealTimeSync

override_dh_auto_install:
	# desktop files
	# handled by dh_install through debian/install

	# mimetypes
	# handled by dh_installmime through debian/sharedmimeinfo

	# icons
	unzip -u FreeFileSync/Build/Resources/Icons.zip cfg_batch.png database.png start_sync.png FreeFileSync.png RealTimeSync.png
	for size in 16 24 32 48 64 128 256; do \
	  mkdir -p debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps ; \
	  convert FreeFileSync.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps/FreeFileSync.png ; \
	  convert RealTimeSync.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps/RealTimeSync.png ; \
	  mkdir -p debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/mimetypes ; \
	  convert cfg_batch.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-x-freefilesync-batch.png ; \
	  convert database.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-x-freefilesync-db.png ; \
	  convert start_sync.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-x-freefilesync-gui.png ; \
	  convert RealTimeSync.png -filter Lanczos -resize $${size}x$${size} debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-x-freefilesync-real.png ; \
	done
bgstack15