forked from dnut/clipboard-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 886 Bytes
/
Makefile
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
prefix := "/usr/local"
bin := "bin"
systemd := "lib/systemd"
profile := "release"
deb_version := $(shell grep Version control | sed 's/Version: *//g')
build:
cargo build --profile $(profile)
install:
install -Dm755 target/$(profile)/clipboard-sync "$(prefix)/$(bin)/clipboard-sync"
install -Dm644 clipboard-sync.service "$(prefix)/$(systemd)/user/clipboard-sync.service"
uninstall:
rm -f "$(prefix)/$(bin)/clipboard-sync"
rm -f "$(prefix)/$(systemd)/user/clipboard-sync.service"
user-%:
$(MAKE) $* prefix="${HOME}" bin=.bin systemd=.config/systemd
deb:
rm -rf dist/deb
mkdir -p dist/deb/clipboard-sync_$(deb_version)/DEBIAN
$(MAKE) install prefix=dist/deb/clipboard-sync_$(deb_version)
cp control dist/deb/clipboard-sync_$(deb_version)/DEBIAN/control
dpkg-deb --build dist/deb/clipboard-sync_$(deb_version)
deblint:
lintian dist/deb/clipboard-sync_$(deb_version).deb