1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2020 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 ###############################################################################
29 # VDRPLUGVER must match with APIVERSION in config.h
30 # after change this update also all vdr plugins
34 DL_FILE = $(THISAPP).tar.bz2
36 DL_FROM = $(URL_IPFIRE)
37 DIR_APP = $(DIR_SRC)/$(THISAPP)
38 TARGET = $(DIR_INFO)/$(THISAPP)
47 CACHEDIR=/var/cache/vdr \
51 LOCDIR=/usr/share/locale \
52 MANDIR=/usr/share/man \
53 RESDIR=/usr/share/vdr \
58 CXXFLAGS="$(CXXFLAGS)"
60 ###############################################################################
62 ###############################################################################
66 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
68 $(DL_FILE)_MD5 = b2897fe6b6e6711d512a69642b1b8ec1
72 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
74 download : $(patsubst %,$(DIR_DL)/%,$(objects))
76 md5 : $(subst %,%_MD5,$(objects))
81 ###############################################################################
82 # Downloading, checking, md5sum
83 ###############################################################################
85 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
88 $(patsubst %,$(DIR_DL)/%,$(objects)) :
91 $(subst %,%_MD5,$(objects)) :
94 ###############################################################################
95 # Installation Details
96 ###############################################################################
98 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
100 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
101 # stime was removed from glibc with version 2.31
102 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/vdr/vdr-2.4.1_replace_stime.patch
104 # Compile main package.
105 cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir
107 # Compile bundled plugins.
108 #cd $(DIR_APP) && for plugin in ...; do \
109 # make $(MAKETUNING) -C PLUGINS/src/$$plugin VDRDIR=$(DIR_APP) \
110 # CFLAGS="$(CFLAGS) -I$(DIR_APP)/include" \
111 # CXXFLAGS="$(CXXFLAGS) -I$(DIR_APP)/include" \
112 # PLGCFG=$(DIR_APP)/plugins.mk all || exit 1; \
115 # Install main package.
116 cd $(DIR_APP) && make install-bin install-dirs install-includes $(MAKE_OPTIONS)
117 mv -v /usr/bin/vdr /usr/sbin/vdr
119 sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \
120 < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr
121 chmod 755 /usr/sbin/runvdr
123 # Install configuration.
125 mkdir -pv /etc/sysconfig/vdr-plugins.d
126 cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
128 cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
130 # Link development files.
131 mkdir -pv /usr/lib/vdr
132 cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr
133 ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h
134 ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h
137 $(call INSTALL_INITSCRIPT,vdr)
139 # Install start links and backup include file.
140 ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr
141 ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr
142 ln -sf ../init.d/vdr /etc/rc.d/rc6.d/K40vdr
143 install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \
144 /var/ipfire/backup/addons/includes/vdr