-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (42 loc) · 1.13 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
release=${RELEASE}
package=${PACKAGE}
rootdir=debian/$(package)_$(release)
pkgdir=$(rootdir)/DEBIAN
libdir=$(rootdir)/usr/local/lib
sbindir=$(rootdir)/usr/local/sbin
all:
echo "No \"all\" target actions set ATM"
buildenv:
python3 -m venv ~/venv
. ~/venv/bin/activate && \
python3 -m pip install --upgrade pyinstaller
build: buildenv
. ~/venv/bin/activate && \
pyinstaller src/scicomp-leftover/leftover.py --name leftover
$(rootdir):
mkdir -p $(rootdir)
$(libdir): $(rootdir)
mkdir -p $(libdir)
$(sbindir): $(rootdir)
mkdir -p $(sbindir)
$(pkgdir): $(rootdir)
mkdir -p $(pkgdir)
control $(pkgdir)/control: $(pkgdir)
cat debian/control | envsubst > $(pkgdir)/control
postinst $(pkgdir)/postinst: $(pkgdir)
cp debian/postinst $(pkgdir)/postinst
chmod 0755 $(pkgdir)/postinst
prerm $(pkgdir)/prerm: $(pkgdir)
cp debian/prerm $(pkgdir)/prerm
chmod 0755 $(pkgdir)/prerm
pkgcontrol: control postinst prerm
install: build pkgcontrol $(libdir) $(sbindir)
cp -r dist/leftover $(libdir)
deb: install
dpkg-deb --build $(rootdir)
clean:
rm -r build \
debian/scicomp-leftover_* \
dist \
leftover.spec \
scicomp-leftover.spec