]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/vdr_dvbapi
pkg-config: update to 0.29
[ipfire-2.x.git] / lfs / vdr_dvbapi
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
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
25 include Config
26
27 VER = 1.0.6
28 THISAPP = vdr-plugin-dvbapi-$(VER)
29 DL_FILE = $(THISAPP).tar.gz
30
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
34 PROG = vdr_dvbapi
35 PAK_VER = 1
36
37 DEPS = ""
38
39 VDRPLUGVER = 2.0.0
40
41 EXTRA_FLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
42 CFLAGS += $(EXTRA_FLAGS)
43 CXXFLAGS += $(EXTRA_FLAGS)
44
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
49
50 define BUILD
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
56
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)
60 endef
61
62
63 ###############################################################################
64 # Top-level Rules
65 ###############################################################################
66
67 objects = $(DL_FILE)
68
69 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
70
71 $(DL_FILE)_MD5 = 6a8024b2970beba8eadc1acaa86805e7
72
73 install : $(TARGET)
74
75 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
76
77 download : $(patsubst %,$(DIR_DL)/%,$(objects))
78
79 md5 : $(subst %,%_MD5,$(objects))
80
81 dist:
82 @$(PAK)
83
84 ###############################################################################
85 # Downloading, checking, md5sum
86 ###############################################################################
87
88 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
89 @$(CHECK)
90
91 $(patsubst %,$(DIR_DL)/%,$(objects)) :
92 @$(LOAD)
93
94 $(subst %,%_MD5,$(objects)) :
95 @$(MD5)
96
97 ###############################################################################
98 # Installation Details
99 ###############################################################################
100
101 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
102 @$(PREBUILD)
103 @rm -rf $(DIR_APP)* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
104
105 ifeq "$(MACHINE)" "i586"
106 # Build an SSE enabled version.
107 $(call BUILD,-sse)
108 endif
109
110 # Build normal version.
111 $(call BUILD)
112
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
119
120 @rm -rf $(DIR_APP)*
121 @$(POSTBUILD)