|
Jiří Konečný |
edf6216 |
From 7458c82f2a6d183f86f217f57afa2615b396c19c Mon Sep 17 00:00:00 2001
|
|
Jiří Konečný |
edf6216 |
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kone=C4=8Dn=C3=BD?=
|
|
Jiří Konečný |
edf6216 |
<DragonLichcz@gmail.com>
|
|
Jiří Konečný |
edf6216 |
Date: Mon, 2 Nov 2015 22:20:09 +0100
|
|
Jiří Konečný |
edf6216 |
Subject: [PATCH 1/3] Add Makefile to build and install playonlinux
|
|
Jiří Konečný |
edf6216 |
|
|
Jiří Konečný |
edf6216 |
Build check_direct_rendering.c to bin folder.
|
|
Jiří Konečný |
edf6216 |
Build pyc files for python source codes.
|
|
Jiří Konečný |
edf6216 |
Create executable files for /usr/bin.
|
|
Jiří Konečný |
edf6216 |
Install playonlinux to DESTDIR if nothing set use install to / and user
|
|
Jiří Konečný |
edf6216 |
can also specify the PREFIX of the installation.
|
|
Jiří Konečný |
edf6216 |
As bonus could create changelog from git.
|
|
Jiří Konečný |
edf6216 |
---
|
|
Jiří Konečný |
edf6216 |
Makefile | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Jiří Konečný |
edf6216 |
1 file changed, 74 insertions(+)
|
|
Jiří Konečný |
edf6216 |
create mode 100644 Makefile
|
|
Jiří Konečný |
edf6216 |
|
|
Jiří Konečný |
edf6216 |
diff --git a/Makefile b/Makefile
|
|
Jiří Konečný |
edf6216 |
new file mode 100644
|
|
Jiří Konečný |
edf6216 |
index 0000000..2e7c538
|
|
Jiří Konečný |
edf6216 |
--- /dev/null
|
|
Jiří Konečný |
edf6216 |
+++ b/Makefile
|
|
Jiří Konečný |
edf6216 |
@@ -0,0 +1,74 @@
|
|
Jiří Konečný |
edf6216 |
+# This program is free software: you can redistribute it and/or modify
|
|
Jiří Konečný |
edf6216 |
+# it under the terms of the GNU General Public License as published by
|
|
Jiří Konečný |
edf6216 |
+# the Free Software Foundation, either version 3 of the License, or
|
|
Jiří Konečný |
edf6216 |
+# (at your option) any later version.
|
|
Jiří Konečný |
edf6216 |
+#
|
|
Jiří Konečný |
edf6216 |
+# This program is distributed in the hope that it will be useful,
|
|
Jiří Konečný |
edf6216 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Jiří Konečný |
edf6216 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Jiří Konečný |
edf6216 |
+# GNU General Public License for more details.
|
|
Jiří Konečný |
edf6216 |
+#
|
|
Jiří Konečný |
edf6216 |
+# You should have received a copy of the GNU General Public License
|
|
Jiří Konečný |
edf6216 |
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Jiří Konečný |
edf6216 |
+#
|
|
Jiří Konečný |
edf6216 |
+# Authors: Jiri Konecny <dragonlichcz@gmail.com>
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+# Arguments:
|
|
Jiří Konečný |
edf6216 |
+#
|
|
Jiří Konečný |
edf6216 |
+# PREFIX -- Set prefix for the installation (/usr is default)
|
|
Jiří Konečný |
edf6216 |
+# DESTDIR -- Where you want to install
|
|
Jiří Konečný |
edf6216 |
+#
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+CFLAGS ?= -O2
|
|
Jiří Konečný |
edf6216 |
+CC = gcc $(CFLAGS)
|
|
Jiří Konečný |
edf6216 |
+PYTHON = python2 -m py_compile
|
|
Jiří Konečný |
edf6216 |
+GZIP = gzip
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+PREFIX ?= /usr
|
|
Jiří Konečný |
edf6216 |
+DESTDIR ?= # root dir
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+CFLAGS += -lGL -lX11
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+sharedir := $(DESTDIR)$(PREFIX)/share
|
|
Jiří Konečný |
edf6216 |
+bindir := $(DESTDIR)$(PREFIX)/bin
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+all: build
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+clean:
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./python/*.pyc
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./python/lib/*.pyc
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./bin/check_dd
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./bin/playonlinux
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./bin/playonlinux-pkg
|
|
Jiří Konečný |
edf6216 |
+ $(RM) ./ChangeLog
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+build:
|
|
Jiří Konečný |
edf6216 |
+ $(CC) ./src/check_direct_rendering.c -o ./bin/check_dd
|
|
Jiří Konečný |
edf6216 |
+ $(PYTHON) ./python/*.py
|
|
Jiří Konečný |
edf6216 |
+ $(PYTHON) ./python/lib/*.py
|
|
Jiří Konečný |
edf6216 |
+ echo -e '#!/bin/bash\n${sharedir}/playonlinux/playonlinux "$$@"\nexit 0' > ./bin/playonlinux
|
|
Jiří Konečný |
edf6216 |
+ echo -e '#!/bin/bash\n${sharedir}/playonlinux/playonlinux-pkg "$$@"\nexit 0' > ./bin/playonlinux-pkg
|
|
Jiří Konečný |
edf6216 |
+ chmod +x ./bin/playonlinux
|
|
Jiří Konečný |
edf6216 |
+ chmod +x ./bin/playonlinux-pkg
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+install:
|
|
Jiří Konečný |
edf6216 |
+ install -d $(bindir)
|
|
Jiří Konečný |
edf6216 |
+ install -d $(sharedir)/pixmaps
|
|
Jiří Konečný |
edf6216 |
+ install -d $(sharedir)/applications
|
|
Jiří Konečný |
edf6216 |
+ install -d $(sharedir)/playonlinux/bin
|
|
Jiří Konečný |
edf6216 |
+ install -d $(sharedir)/man/man1
|
|
Jiří Konečný |
edf6216 |
+ $(GZIP) -c ./doc/playonlinux-pkg.1 > $(sharedir)/man/man1/playonlinux-pkg.1.gz
|
|
Jiří Konečný |
edf6216 |
+ $(GZIP) -c ./doc/playonlinux.1 > $(sharedir)/man/man1/playonlinux.1.gz
|
|
Jiří Konečný |
edf6216 |
+ cp ./etc/PlayOnLinux.desktop $(sharedir)/applications/PlayOnLinux.desktop
|
|
Jiří Konečný |
edf6216 |
+ cp ./etc/playonlinux.png $(sharedir)/pixmaps/playonlinux.png
|
|
Jiří Konečný |
edf6216 |
+ cp ./etc/playonlinux16.png $(sharedir)/pixmaps/playonlinux16.png
|
|
Jiří Konečný |
edf6216 |
+ cp ./etc/playonlinux32.png $(sharedir)/pixmaps/playonlinux32.png
|
|
Jiří Konečný |
edf6216 |
+ cp ./bin/{playonlinux,playonlinux-pkg} $(bindir)/
|
|
Jiří Konečný |
edf6216 |
+ cp ./{playonlinux*,README.md,TRANSLATORS,CHANGELOG.md,LICENCE} $(sharedir)/playonlinux/
|
|
Jiří Konečný |
edf6216 |
+ cp -R ./{bash,etc,lang,lib,plugins,python,resources,tests} $(sharedir)/playonlinux/
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+changelog:
|
|
Jiří Konečný |
edf6216 |
+ (GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
|
Jiří Konečný |
edf6216 |
+
|
|
Jiří Konečný |
edf6216 |
+.PHONY: all clean build install changelog
|
|
Jiří Konečný |
edf6216 |
--
|
|
Jiří Konečný |
edf6216 |
2.5.0
|
|
Jiří Konečný |
edf6216 |
|