]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/vdr
ad68636bf94edeaed48474de8d7eed7fbe2dba21
[people/pmueller/ipfire-2.x.git] / lfs / vdr
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2021 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 = 2.4.7
28
29 # VDRPLUGVER must match with APIVERSION! in config.h
30 # after change this update also all vdr plugins
31 VDRPLUGVER = 2.4.7
32
33 THISAPP = vdr-$(VER)
34 DL_FILE = $(THISAPP).tar.bz2
35
36 DL_FROM = $(URL_IPFIRE)
37 DIR_APP = $(DIR_SRC)/$(THISAPP)
38 TARGET = $(DIR_INFO)/$(THISAPP)
39 PROG = vdr
40 PAK_VER = 12
41
42 DEPS = vdr_streamdev
43
44 CXXFLAGS += -std=c++11
45
46 MAKE_OPTIONS = \
47 PREFIX=/usr \
48 BINDIR=/usr/bin \
49 CACHEDIR=/var/cache/vdr \
50 CONFDIR=/etc/vdr \
51 INCDIR=/usr/include \
52 LIBDIR=/usr/lib/vdr \
53 LOCDIR=/usr/share/locale \
54 MANDIR=/usr/share/man \
55 RESDIR=/usr/share/vdr \
56 RUNDIR=/var/run \
57 VARDIR=/var \
58 VIDEODIR=/var/video \
59 CFLAGS="$(CFLAGS)" \
60 CXXFLAGS="$(CXXFLAGS)"
61
62 ###############################################################################
63 # Top-level Rules
64 ###############################################################################
65
66 objects = $(DL_FILE)
67
68 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
69
70 $(DL_FILE)_MD5 = 24ff672a7c73118a912bd8c6cdd0aae4
71
72 install : $(TARGET)
73
74 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
75
76 download : $(patsubst %,$(DIR_DL)/%,$(objects))
77
78 md5 : $(subst %,%_MD5,$(objects))
79
80 dist:
81 @$(PAK)
82
83 ###############################################################################
84 # Downloading, checking, md5sum
85 ###############################################################################
86
87 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
88 @$(CHECK)
89
90 $(patsubst %,$(DIR_DL)/%,$(objects)) :
91 @$(LOAD)
92
93 $(subst %,%_MD5,$(objects)) :
94 @$(MD5)
95
96 ###############################################################################
97 # Installation Details
98 ###############################################################################
99
100 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
101 @$(PREBUILD)
102 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
103
104 # cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/vdr-2.4-gcc-11.patch
105
106 # Compile main package.
107 cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir
108
109 # Compile bundled plugins.
110 #cd $(DIR_APP) && for plugin in ...; do \
111 # make $(MAKETUNING) -C PLUGINS/src/$$plugin VDRDIR=$(DIR_APP) \
112 # CFLAGS="$(CFLAGS) -I$(DIR_APP)/include" \
113 # CXXFLAGS="$(CXXFLAGS) -I$(DIR_APP)/include" \
114 # PLGCFG=$(DIR_APP)/plugins.mk all || exit 1; \
115 #done
116
117 # Install main package.
118 cd $(DIR_APP) && make install-bin install-dirs install-includes $(MAKE_OPTIONS)
119 mv -v /usr/bin/vdr /usr/sbin/vdr
120
121 sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \
122 < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr
123 chmod 755 /usr/sbin/runvdr
124
125 # Install configuration.
126 mkdir -pv /etc/vdr
127 mkdir -pv /etc/sysconfig/vdr-plugins.d
128 cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
129 /etc/sysconfig/vdr
130 cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
131
132 # Link development files.
133 mkdir -pv /usr/lib/vdr
134 cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr
135 ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h
136 ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h
137
138 #install initscripts
139 $(call INSTALL_INITSCRIPT,vdr)
140
141 # Install start links and backup include file.
142 ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr
143 ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr
144 ln -sf ../init.d/vdr /etc/rc.d/rc6.d/K40vdr
145 install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \
146 /var/ipfire/backup/addons/includes/vdr
147
148 @rm -rf $(DIR_APP)
149 @$(POSTBUILD)