forked from masmu/pulseaudio-dlna
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
61 lines (45 loc) · 1.86 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
# This file is part of pulseaudio-dlna.
# pulseaudio-dlna is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# pulseaudio-dlna is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>.
python ?= python3
user ?= $(shell whoami)
all: pulseaudio_dlna.egg-info
venv:
@echo "venv is deprecated. It is just 'make' now."
pulseaudio_dlna.egg-info: setup.py bin/pip3
bin/pip3 install --editable . && touch $@
bin/pip3:
virtualenv --system-site-packages -p $(python) .
ifdef DEB_HOST_ARCH
DESTDIR ?= /
PREFIX ?= usr/
install:
$(python) setup.py install --no-compile --prefix="$(PREFIX)" --root="$(DESTDIR)" --install-layout=deb
else
DESTDIR ?= /
PREFIX ?= /usr/local
install:
$(python) setup.py install --no-compile --prefix="$(PREFIX)"
endif
release: manpage
pdebuild --buildresult dist
lintian --pedantic dist/*.deb dist/*.dsc dist/*.changes
sudo chown -R $(user) dist/
manpage: man/pulseaudio-dlna.1
man/pulseaudio-dlna.1: pulseaudio_dlna.egg-info
export USE_PKG_VERSION=1; help2man -n "Stream audio to DLNA devices and Chromecasts" "bin/pulseaudio-dlna" > /tmp/pulseaudio-dlna.1
mv /tmp/pulseaudio-dlna.1 man/pulseaudio-dlna.1
gzip -fk man/pulseaudio-dlna.1
clean:
rm -rf build dist $(shell find pulseaudio_dlna -name "__pycache__")
rm -rf *.egg-info *.egg bin local lib lib64 include share pyvenv.cfg
rm -rf docs htmlcov .coverage .tox pip-selfcheck.json
rm man/pulseaudio-dlna.1.gz