# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/vdr/vdr-plugin-conf.in # Copyright (C) 2007 - 2021 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- T2-COPYRIGHT-NOTE-END --- . $base/package/vdr/*/vdr-conf.in makeinstopt="" var_append makeopt ' ' 'all' plugin_setup() { var_append makeopt ' ' "VDRDIR=$VDRDIR" var_append makeopt ' ' "DVBDIR=$DVBINCDIR" var_append makeopt ' ' "LIBDIR=$VDRPLUGINDIR" var_append CXXFLAGS ' ' "-fPIC" # Fix plugins: VDRVERSION -> APIVERSION sed -i Makefile \ -e 's/VDRVERSION/APIVERSION/g' sed -i Makefile \ -e "s:^VDRDIR.*$:VDRDIR = ${VDRDIR}:" \ -e "s:^DVBDIR.*$:DVBDIR = ${DVBINCDIR}:" \ -e "s:^LIBDIR.*$:LIBDIR = ${VDRPLUGINDIR}:" \ -e 's:-I$(VDRDIR)/include -I$(DVBDIR)/include:-I$(DVBDIR)/include -I$(VDRDIR)/include:' \ -e 's:-I$(VDRDIR)/include:-I'"${VDRINCDIR%vdr}"':' \ -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' #sed -i Makefile \ # -e 's:^APIVERSION = :APIVERSION ?= :' \ # -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ # -e '2i\APIVERSION = '"${APIVERSION}" #sed -i Makefile \ # -e 's:^CXXFLAGS:#CXXFLAGS:' \ # -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' sed -i Makefile \ -e '/@.*strip/d' \ -e '/strip \$(LIBDIR)\/\$@/d' \ -e '/^STRIP =/d' \ -e '/@.*\$(STRIP)/d' } hook_add premake 3 'plugin_setup' # Create a file with the parameters for this plugin plugin_register() { local pparam=$1 local pname=$2 [ -z $2 ] && pname=$pkg echo $pparam > $VDRPLUGINDB/$pkg } # Create a database of plugins to load at startup plugin_activate() { ln -sf $pkg $VDRPLUGINDB/$pkg.active } hook_add postmake 1 'plugin_activate'