forked from OpenTabletDriver/OpenTabletDriver.Packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules
More file actions
executable file
·30 lines (22 loc) · 1020 Bytes
/
rules
File metadata and controls
executable file
·30 lines (22 loc) · 1020 Bytes
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
#!/usr/bin/make -f
SHELL=/usr/bin/env bash
PREFIX = debian/tmp/usr
PKG_VERSION = $(shell [[ $$(cat Directory.Build.props) =~ \<VersionBase\>(.+?)\<\/VersionBase\> ]] && echo $${BASH_REMATCH[1]})
VERSION_REGEX = ^Version=.\+$$
VERSION_REPLACE_REGEX = Version=$(PKG_VERSION)
%:
dh $@
override_dh_auto_build:
./build.sh
find ./bin -name "*.pdb" -type f -exec rm {} ';'
override_dh_auto_install:
mkdir -p $(PREFIX)/share/OpenTabletDriver
cp -r bin/* $(PREFIX)/share/OpenTabletDriver
cp -r Common/Linux/* $(PREFIX)
mkdir -p $(PREFIX)/share/man/man8
gzip -c docs/manpages/opentabletdriver.8 > $(PREFIX)/share/man/man8/opentabletdriver.8.gz
mkdir -p $(PREFIX)/share/pixmaps
cp -v OpenTabletDriver.UX/Assets/* $(PREFIX)/share/pixmaps
mkdir -p $(PREFIX)/lib/udev/rules.d
./generate-rules.sh -v OpenTabletDriver.Configurations/Configurations $(PREFIX)/lib/udev/rules.d/99-opentabletdriver.rules
sed -i "s/$(VERSION_REGEX)/$(VERSION_REPLACE_REGEX)/g" "$(PREFIX)/share/applications/OpenTabletDriver.desktop"