-
Notifications
You must be signed in to change notification settings - Fork 115
/
Makefile
65 lines (54 loc) · 1.84 KB
/
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
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
# a simple makefile to pull a tar ball.
PREFIX?=/usr
DISTNAME=inkscape-silhouette
EXCL=--exclude \*.orig --exclude \*.pyc
ALL=README.md *.png *.sh *.rules *.py *.inx examples misc silhouette
VERS=$$(python3 ./sendto_silhouette.py --version)
## echo python3 ./sendto_silhouette.py
# 'module' object has no attribute 'core'
# 'module' object has no attribute 'core'
# done. 0 min 0 sec
#
# debian 8
# --------
# echo > /etc/apt/sources.list.d/backports.list 'deb http://ftp.debian.org debian jessie-backports main'
# apt-get update
# apt-get -t jessie-backports install python3-usb
# vi /etc/group
# lp:x:debian
DEST=$(DESTDIR)$(PREFIX)/share/inkscape/extensions
UDEV=$(DESTDIR)/lib/udev
# User-specifc inkscape extensions folder for local install
DESTLOCAL=$(HOME)/.config/inkscape/extensions
dist:
cd distribute; sh ./distribute.sh
#install is used by dist.
install:
mkdir -p $(DEST)
# CAUTION: cp -a does not work under fakeroot. Use cp -r instead.
cp -r silhouette $(DEST)
install -m 755 -t $(DEST) *silhouette*.py
install -m 644 -t $(DEST) *.inx
mkdir -p $(UDEV)/rules.d
install -m 644 -T silhouette-udev.rules $(UDEV)/rules.d/40-silhouette-udev.rules
install -m 644 -t $(UDEV) silhouette-icon.png
install -m 644 -t $(UDEV) silhouette-udev-notify.sh
install-local:
mkdir -p $(DESTLOCAL)
# CAUTION: cp -a does not work under fakeroot. Use cp -r instead.
cp -r silhouette $(DESTLOCAL)
install -m 755 -t $(DESTLOCAL) *silhouette*.py
install -m 644 -t $(DESTLOCAL) *.inx
tar_dist_classic: clean
name=$(DISTNAME)-$(VERS); echo "$$name"; echo; \
tar jcvf $$name.tar.bz2 $(EXCL) --transform="s,^,$$name/," $(ALL)
grep about_version ./sendto_silhouette.inx
@echo version should be $(VERS)
tar_dist:
python3 setup.py sdist --format=bztar
mv dist/*.tar* .
rm -rf dist
clean:
rm -f *.orig */*.orig
rm -rf distribute/$(DISTNAME)
rm -rf distribute/deb/files