/
makefile
62 lines (45 loc) · 1.42 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
# @author Jean-Lou Dupont
#
# Makefile for:
# - releasing the project to the PPA :
# "ppa" : prepares the required targets for release to the PPA
# "pb" : executes the pBuilder environment for checking package
# "up" : uploads to the PPA
#
# - installing locally :
# "clean"
#
PRJ_NAME=rb-mpdbus
VERSION=`cat VERSION`
export PRJ_NAME
PYTHON=`which python`
RBP=/usr/lib/rhythmbox/plugins
PLUGIN_NAME=mpdbus
DEFAULT_DISTRO=karmic
ifeq ($(DIST),)
DIST=${DEFAULT_DISTRO}
endif
export DIST
###################################################
## LOCAL INSTALLATION RELATED
###################################################
clean:
@rm -r -f $(DESTDIR)$(RBP)/${PLUGIN_NAME}/*.pyc
uninstall:
@rm -r -f $(DESTDIR)$(RBP)/${PLUGIN_NAME}
install:
@install -d $(DESTDIR)$(RBP)/${PLUGIN_NAME}
@install -D $(CURDIR)/src/${PLUGIN_NAME}/*.py $(DESTDIR)$(RBP)/${PLUGIN_NAME}/
@install -D $(CURDIR)/src/${PLUGIN_NAME}/${PLUGIN_NAME}.rb-plugin $(DESTDIR)$(RBP)/${PLUGIN_NAME}/${PLUGIN_NAME}.rb-plugin
@python -m compileall ${DESTDIR}$(RBP)/${PLUGIN_NAME}
buildsrc:
debuild -S
all:
@echo "For packaging: 'ppa', 'pb', 'up'"
@echo "Others: 'clean', 'install', 'uninstall', 'buildsrc'"
###################################################
## PACKAGING RELATED
###################################################
ppa up pb:
@make PRJ_VERSION=$(VERSION) -C packages $@
.PHONY: ppa pb up all