forked from otsaloma/poor-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.37 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
# -*- coding: us-ascii-unix -*-
name = harbour-poor-maps
version = 0.1
DESTDIR =
PREFIX = /usr/local
datadir = $(DESTDIR)$(PREFIX)/share/$(name)
desktopdir = $(DESTDIR)$(PREFIX)/share/applications
icondir = $(DESTDIR)$(PREFIX)/share/icons/hicolor/86x86/apps
.PHONY: clean dist install rpm
clean:
rm -rf dist poor/__pycache__
rm -f rpm/*.rpm
dist:
$(MAKE) clean
mkdir -p dist/$(name)-$(version)
cp -r `cat MANIFEST` dist/$(name)-$(version)
tar -C dist -cJf dist/$(name)-$(version).tar.xz $(name)-$(version)
install:
@echo "Installing Python files..."
mkdir -p $(datadir)/poor
cp poor/*.py $(datadir)/poor
@echo "Installing QML files..."
mkdir -p $(datadir)/qml/icons
cp qml/poor-maps.qml $(datadir)/qml/$(name).qml
cp qml/[ABCDEFGHIJKLMNOPQRSTUVXYZ]*.qml $(datadir)/qml
cp qml/icons/*.png $(datadir)/qml/icons
@echo "Installing tilesources..."
mkdir -p $(datadir)/tilesources
cp tilesources/*.json $(datadir)/tilesources
@echo "Installing desktop file..."
mkdir -p $(desktopdir)
cp data/$(name).desktop $(desktopdir)
@echo "Installing icon..."
mkdir -p $(icondir)
cp data/poor-maps.png $(icondir)/$(name).png
rpm:
mkdir -p $$HOME/rpmbuild/SOURCES
cp dist/$(name)-$(version).tar.xz $$HOME/rpmbuild/SOURCES
rpmbuild -ba rpm/$(name).spec
cp $$HOME/rpmbuild/RPMS/noarch/$(name)-$(version)-*.rpm rpm
cp $$HOME/rpmbuild/SRPMS/$(name)-$(version)-*.rpm rpm