]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/vdr_dvbapi
lfs: Drop quotes in DEPS variable
[ipfire-2.x.git] / lfs / vdr_dvbapi
CommitLineData
d1dee6c1
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eb706638 4# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
d1dee6c1
MT
5# #
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. #
10# #
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. #
15# #
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/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
eb706638 27VER = 2.2.5
6e903b7f 28
d1dee6c1
MT
29THISAPP = vdr-plugin-dvbapi-$(VER)
30DL_FILE = $(THISAPP).tar.gz
31
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35PROG = vdr_dvbapi
eb706638 36PAK_VER = 2
d1dee6c1 37
2dc2a278 38DEPS =
d1dee6c1 39
eb706638 40VDRPLUGVER = 2.4.1
d1dee6c1
MT
41
42EXTRA_FLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
43CFLAGS += $(EXTRA_FLAGS)
44CXXFLAGS += $(EXTRA_FLAGS)
45
46CSAFLAGS = -O3 -fexpensive-optimizations -funroll-loops
47CSAFLAGS-sse = $(CSAFLAGS) -mmmx -msse -msse2 -msse3
48PARALLEL = PARALLEL_64_LONG
49PARALLEL-sse = PARALLEL_128_SSE2
50
51define BUILD
52 cp -a $(DIR_APP) $(DIR_APP)-build$(1)
53 cd $(DIR_APP)-build$(1) && make $(MAKE_TUNING) LIBDIR=. VDRDIR=/usr/lib/vdr \
54 CFLAGS="$(CFLAGS$(1))" CXXFLAGS="$(CXXFLAGS$(1))" \
55 CSAFLAGS="$(CSAFLAGS$(1))" PARALLEL="$(PARALLEL$(1))" \
56 LOCALEDIR=$$(pwd)/locale all
57
58 -mkdir -pv /etc/vdr/plugins/dvbapi
59 cd $(DIR_APP)-build$(1) && install -m 755 libvdr-dvbapi.so \
60 /usr/lib/vdr/libvdr-dvbapi.so.$(VDRPLUGVER)$(1)
61endef
62
63
64###############################################################################
65# Top-level Rules
66###############################################################################
67
68objects = $(DL_FILE)
69
70$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
71
eb706638 72$(DL_FILE)_MD5 = cf35ed8a787c09676338ec16d231b61a
d1dee6c1
MT
73
74install : $(TARGET)
75
76check : $(patsubst %,$(DIR_CHK)/%,$(objects))
77
78download : $(patsubst %,$(DIR_DL)/%,$(objects))
79
80md5 : $(subst %,%_MD5,$(objects))
81
82dist:
83 @$(PAK)
84
85###############################################################################
86# Downloading, checking, md5sum
87###############################################################################
88
89$(patsubst %,$(DIR_CHK)/%,$(objects)) :
90 @$(CHECK)
91
92$(patsubst %,$(DIR_DL)/%,$(objects)) :
93 @$(LOAD)
94
95$(subst %,%_MD5,$(objects)) :
96 @$(MD5)
97
98###############################################################################
99# Installation Details
100###############################################################################
101
102$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
103 @$(PREBUILD)
104 @rm -rf $(DIR_APP)* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
105
dc7d6b20 106ifeq "$(BUILD_ARCH)" "i586"
d1dee6c1
MT
107 # Build an SSE enabled version.
108 $(call BUILD,-sse)
109endif
110
111 # Build normal version.
112 $(call BUILD)
113
114 echo "#" > /etc/sysconfig/vdr-plugins.d/dvbapi.conf
115 echo "# Command line parameters for vdr-plugin-dvbapi" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
116 echo "#" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
117 echo "# For more details see:" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
118 echo "# - \`vdr --help -Pdvbapi\`" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
119 echo "PLUGIN_OPTIONS=\"\"" >> /etc/sysconfig/vdr-plugins.d/dvbapi.conf
120
121 @rm -rf $(DIR_APP)*
122 @$(POSTBUILD)