-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
88 lines (73 loc) · 3.68 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2017 Stephan Raue ([email protected])
# Copyright (C) 2013 Lutz Fiebach ([email protected])
#
# This program is dual-licensed; 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 2 of the License, or
# (at your option) any later version.
#
# This Program 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 OpenELEC; see the file COPYING. If not, see
# <http://www.gnu.org/licenses/>.
#
# Alternatively, you can license this library under a commercial license,
# please contact OpenELEC Licensing for more information.
#
# For more information contact:
# OpenELEC Licensing <[email protected]> http://www.openelec.tv
################################################################################
ADDON_NAME=service.openelec.settings
ADDON_VERSION=0.8.1
DISTRONAME:=OpenELEC
BUILDDIR=build
DATADIR=/usr/share/kodi
ADDONDIR=$(DATADIR)/addons
################################################################################
all: $(BUILDDIR)/$(ADDON_NAME)
addon: $(BUILDDIR)/$(ADDON_NAME)-$(ADDON_VERSION).zip
install: $(BUILDDIR)/$(ADDON_NAME)
mkdir -p $(DESTDIR)/$(ADDONDIR)
cp -R $(BUILDDIR)/$(ADDON_NAME) $(DESTDIR)/$(ADDONDIR)
clean:
rm -rf $(BUILDDIR)
uninstall:
rm -rf $(DESTDIR)/$(ADDONDIR)/$(ADDON_NAME)
$(BUILDDIR)/$(ADDON_NAME): $(BUILDDIR)/$(ADDON_NAME)/resources
mkdir -p $(BUILDDIR)/$(ADDON_NAME)
cp -R src/*.png src/*.py $(BUILDDIR)/$(ADDON_NAME)
cp COPYING $(BUILDDIR)/$(ADDON_NAME)
cp addon.xml $(BUILDDIR)/$(ADDON_NAME)
sed -e "s,@ADDONNAME@,$(ADDON_NAME),g" \
-e "s,@ADDONVERSION@,$(ADDON_VERSION),g" \
-e "s,@DISTRONAME@,$(DISTRONAME),g" \
-i $(BUILDDIR)/$(ADDON_NAME)/addon.xml
cp changelog.txt $(BUILDDIR)/$(ADDON_NAME)
$(BUILDDIR)/$(ADDON_NAME)/resources: $(BUILDDIR)/$(ADDON_NAME)/resources/skins \
$(BUILDDIR)/$(ADDON_NAME)/resources/language
mkdir -p $(BUILDDIR)/$(ADDON_NAME)/resources
cp -R src/resources/* $(BUILDDIR)/$(ADDON_NAME)/resources
$(BUILDDIR)/$(ADDON_NAME)/resources/skins: $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/default \
$(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/icons
mkdir -p $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default
cp -R skins/Default/* $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default
$(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/default:
mkdir -p $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/default
cp textures/$(DISTRONAME)/*.png $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/default
$(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/icons:
mkdir -p $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/icons
cp icons/*.png $(BUILDDIR)/$(ADDON_NAME)/resources/skins/Default/media/icons
$(BUILDDIR)/$(ADDON_NAME)/resources/language:
mkdir -p $(BUILDDIR)/$(ADDON_NAME)/resources/language
cp -R language/* $(BUILDDIR)/$(ADDON_NAME)/resources/language
sed -e "s,@DISTRONAME@,$(DISTRONAME),g" \
-e "s,@ROOT_PASSWORD@,$(ROOT_PASSWORD),g" \
-i $(BUILDDIR)/$(ADDON_NAME)/resources/language/*/*.po
$(BUILDDIR)/$(ADDON_NAME)-$(ADDON_VERSION).zip: $(BUILDDIR)/$(ADDON_NAME)
cd $(BUILDDIR); zip -r $(ADDON_NAME)-$(ADDON_VERSION).zip $(ADDON_NAME)