summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 04d66fa3dbe810d20cccbeff9f2473ab1a202f33 (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
#!/usr/bin/make -f

%:
	dh ${@}

upstream:
	# main
	wget --trust-server-names https://flexbox.reconfigure.me/download/electron/linux/x64/current

	# changelog
	lynx "https://www.flexoptix.net/en/flexoptix-app/?os=linux#flexapp__modal__changelog" -dump | \
		sed '/^Changelog/,$$!d' | sed '/^Get the latest Version/,$$d' > debian/local/doc/changelog.txt

	# udev
	wget https://www.flexoptix.net/static/frontend/Flexoptix/default/en_US/files/99-tprogrammer.rules -O debian/local/udev/99-tprogrammer.rules

execute_after_dh_auto_clean:
	rm -rf squashfs-root
	chmod 0644 FLEXOPTIX*.AppImage

override_dh_auto_build:
	chmod 0755 FLEXOPTIX*.AppImage
	./FLEXOPTIX*.AppImage --appimage-extract

override_dh_auto_install:
	mkdir -p debian/flexoptix-app/usr/lib
	mv squashfs-root debian/flexoptix-app/usr/lib/flexoptix-app

	rm -f debian/flexoptix-app/usr/lib/flexoptix-app/AppRun
	rm -f debian/flexoptix-app/usr/lib/flexoptix-app/usr/lib/*.so.*
	rmdir --ignore-fail-on-non-empty --parents debian/flexoptix-app/usr/lib/flexoptix-app/usr/lib

	# bin
	mkdir -p debian/flexoptix-app/usr
	cp -a debian/local/bin debian/flexoptix-app/usr/bin

	# udev
	mkdir -p debian/flexoptix-app/lib/udev
	cp -a debian/local/udev debian/flexoptix-app/lib/udev/rules.d

	# desktop
	mkdir -p debian/flexoptix-app/usr/share
	cp -a debian/local/desktop debian/flexoptix-app/usr/share/applications

	rm -f debian/flexoptix-app/usr/lib/flexoptix-app/flexoptix-app.desktop

	# icon
	mkdir -p debian/flexoptix-app/usr/share/icons/hicolor/256x256/apps
	mv debian/flexoptix-app/usr/lib/flexoptix-app/usr/share/icons/hicolor/0x0/apps/flexoptix-app.png debian/flexoptix-app/usr/share/icons/hicolor/256x256/apps

	rmdir --ignore-fail-on-non-empty --parents debian/flexoptix-app/usr/lib/flexoptix-app/usr/share/icons/hicolor/0x0/apps
	rm -f debian/flexoptix-app/usr/lib/flexoptix-app/flexoptix-app.png

override_dh_installchangelogs:
	dh_installchangelogs debian/local/doc/changelog.txt

override_dh_dwz:
	# disabled

override_dh_shlibdeps:
	# disabled

override_dh_strip:
	# disabled

override_dh_strip_nondeterminism:
	# disabled