1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
28 THISAPP = vdr-plugin-dvbapi-$(VER)
29 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
41 EXTRA_FLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
42 CFLAGS += $(EXTRA_FLAGS)
43 CXXFLAGS += $(EXTRA_FLAGS)
45 CSAFLAGS = -O3 -fexpensive-optimizations -funroll-loops
46 CSAFLAGS-sse = $(CSAFLAGS) -mmmx -msse -msse2 -msse3
47 PARALLEL = PARALLEL_64_LONG
48 PARALLEL-sse = PARALLEL_128_SSE2
51 cp -a $(DIR_APP) $(DIR_APP)-build$(1)
52 cd $(DIR_APP)-build$(1) && make $(MAKE_TUNING) LIBDIR=. VDRDIR=/usr/lib/vdr \
53 CFLAGS="$(CFLAGS$(1))" CXXFLAGS="$(CXXFLAGS$(1))" \
54 CSAFLAGS="$(CSAFLAGS$(1))" PARALLEL="$(PARALLEL$(1))" \
55 LOCALEDIR=$$(pwd)/locale all
57 -mkdir -pv /etc/vdr/plugins/dvbapi
58 cd $(DIR_APP)-build$(1) && install -m 755 libvdr-dvbapi.so \
59 /usr/lib/vdr/libvdr-dvbapi.so.$(VDRPLUGVER)$(1)
63 ###############################################################################
65 ###############################################################################
69 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
71 $(DL_FILE)_MD5 = 6a8024b2970beba8eadc1acaa86805e7
75 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
77 download : $(patsubst %,$(DIR_DL)/%,$(objects))
79 md5 : $(subst %,%_MD5,$(objects))
84 ###############################################################################
85 # Downloading, checking, md5sum
86 ###############################################################################
88 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
91 $(patsubst %,$(DIR_DL)/%,$(objects)) :
94 $(subst %,%_MD5,$(objects)) :
97 ###############################################################################
98 # Installation Details
99 ###############################################################################
101 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
103 @rm -rf $(DIR_APP)* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
105 ifeq "$(MACHINE)" "i586"
106 # Build an SSE enabled version.
110 # Build normal version.
113 echo "#" > /etc/sysconfig/vdr-plugins.d/dvbapi.conf
114 echo "# Command line parameters for vdr-plugin-dvbapi" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
115 echo "#" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
116 echo "# For more details see:" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
117 echo "# - \`vdr --help -Pdvbapi\`" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
118 echo "PLUGIN_OPTIONS=\"\"" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf