From fe10143fd8e13cc27579dc9afc3f1fee93cd3c64 Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 6 Apr 2015 15:34:08 +0200 Subject: [PATCH] changed build and install process --- HISTORY | 2 ++ Makefile | 34 +++++++++++++++++++++++++--------- README | 23 ++++++++++++++--------- displaymenu.h | 2 +- displayplugin.h | 2 +- libskindesignerapi/Makefile | 2 +- skindesigner.c | 4 ++-- 7 files changed, 46 insertions(+), 23 deletions(-) diff --git a/HISTORY b/HISTORY index fd7e173..d6b0923 100644 --- a/HISTORY +++ b/HISTORY @@ -282,4 +282,6 @@ Version 0.4.1 - added locks around cTextWrappers to avoid crashed when concurrently accessing fonts +- changed build and install process + diff --git a/Makefile b/Makefile index f7cec16..d7db2cb 100644 --- a/Makefile +++ b/Makefile @@ -54,10 +54,6 @@ LIBS += $(shell pkg-config --libs librsvg-2.0 cairo-png) -ljpeg LIBS += $(shell xml2-config --libs) -INCLUDES += $(shell pkg-config --cflags libskindesignerapi) -LIBS += $(shell pkg-config --libs libskindesignerapi) -DEFINES += -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi)"' - ### The object files: OBJS = $(PLUGIN).o \ config.o \ @@ -113,12 +109,32 @@ OBJS = $(PLUGIN).o \ ### The main target: -all: $(SOFILE) i18n +all: subprojects $(SOFILE) i18n + +### subprojects: + +.PHONY: libskindesignerapi subprojects + +libskindesignerapi: + $(MAKE) -C libskindesignerapi + +subprojects: libskindesignerapi + +install-subprojects: + $(MAKE) -C libskindesignerapi install + +clean-subprojects: + $(MAKE) -C libskindesignerapi clean + +### get version of subprojects in specific targets when subprojects have been built + +%.o: SUB_DEFINES = -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc)"' +$(SOFILE): SUB_LIBS = libskindesignerapi/libskindesignerapi.so.$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc) ### Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $< ### Dependencies: @@ -158,7 +174,7 @@ install-i18n: $(I18Nmsgs) ### Targets: $(SOFILE): $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) $(SUB_LIBS) -o $@ install-lib: $(SOFILE) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) @@ -177,7 +193,7 @@ install-scripts: mkdir -p $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR) cp -r scripts/* $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR) -install: install-lib install-i18n install-themes install-skins install-scripts +install: install-subprojects install-lib install-i18n install-themes install-skins install-scripts dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @@ -187,6 +203,6 @@ dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @echo Distribution package created as $(PACKAGE).tgz -clean: +clean: clean-subprojects @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/README b/README index 4a2cc8b..3d886c8 100644 --- a/README +++ b/README @@ -41,20 +41,25 @@ Requirements Installation ------------ -First you have to install libSkindesignerAPI: +Skindesigner consists of the Skindesigner Plugin itself and a shared library +called "libSkindesignerAPI" which allows other Plugins to use the facilities of +Skindesigner. Since these other Plugins need to have access to the library, +the library has to be proper installed on your system. -cd /libskindesignerapi -make clean -make install +With a "make install" both the plugin and the library are installed on your +system. The destination where the library will be installed can be set with +the PREFIX parameter: "PREFIX=/usr make install". Default of PREFIX is +/usr/local. After installation check if libskindesignerapi.pc is correctly found in your -PKG_CONFIG_PATH. +PKG_CONFIG_PATH. Other Plugins using the library issue the following +commands in their makefiles which should also work on your commandline: +pkg-config --cflags libskindesignerapi +pkg-config --libs libskindesignerapi +pkg-config --modversion libskindesignerapi Note that skindesigner itself and all plugins which use libSkindesignerAPI have to -be build against the same major verison of this lib to be compatible. - -After installing the lib the Skindesigner Plugin has to be installed as any other -VDR Plugin has to be installed for your Distribution. +be build against the same major verison of the library to be compatible. After installation you have to care about the paths for the XML skins and epg images. The following paths can be set at startup: diff --git a/displaymenu.h b/displaymenu.h index 5a3fdb6..5b697b4 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -1,6 +1,6 @@ #ifndef __DISPLAYMENU_H #define __DISPLAYMENU_H -#include +#include "libskindesignerapi/skindesignerapi.h" #include "libtemplate/template.h" #include "views/displaymenurootview.h" diff --git a/displayplugin.h b/displayplugin.h index c713a73..092c0a9 100644 --- a/displayplugin.h +++ b/displayplugin.h @@ -1,7 +1,7 @@ #ifndef __DISPLAYPLUGIN_H #define __DISPLAYPLUGIN_H -#include +#include "libskindesignerapi/skindesignerapi.h" #include "libtemplate/template.h" #include "views/displaypluginview.h" diff --git a/libskindesignerapi/Makefile b/libskindesignerapi/Makefile index 7c24db8..fa1ce56 100644 --- a/libskindesignerapi/Makefile +++ b/libskindesignerapi/Makefile @@ -12,7 +12,7 @@ TARGET_LIB = $(SONAME).$(MINOR) PREFIX ?= /usr/local INCDIR ?= $(PREFIX)/include LIBDIR ?= $(PREFIX)/lib -PCDIR ?= $(shell pkg-config --variable pc_path pkg-config |cut -d ':' -f1) +PCDIR ?= $(PREFIX)/lib/pkgconfig TMPDIR ?= /tmp ### The name of the distribution archive: diff --git a/skindesigner.c b/skindesigner.c index 0398c7b..a15f5a7 100644 --- a/skindesigner.c +++ b/skindesigner.c @@ -7,7 +7,7 @@ */ #include #include -#include +#include "libskindesignerapi/skindesignerapi.h" #define DEFINE_CONFIG 1 #include "config.h" @@ -19,7 +19,7 @@ #endif -static const char *VERSION = "0.4.1"; +static const char *VERSION = "0.4.2"; static const char *DESCRIPTION = trNOOP("Skin Designer"); class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {