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 ###############################################################################
30 DL_FILE = $(THISAPP).tar.bz2
32 DL_FROM = $(URL_IPFIRE)
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34 TARGET = $(DIR_INFO)/$(THISAPP)
38 DEPS = "vdr_streamdev"
43 CACHEDIR=/var/cache/vdr \
47 LOCDIR=/usr/share/locale \
48 MANDIR=/usr/share/man \
49 RESDIR=/usr/share/vdr \
54 CXXFLAGS="$(CXXFLAGS)"
56 ###############################################################################
58 ###############################################################################
62 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
64 $(DL_FILE)_MD5 = e1b7a76c57c96300829dccd39eb20e7d
68 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
70 download : $(patsubst %,$(DIR_DL)/%,$(objects))
72 md5 : $(subst %,%_MD5,$(objects))
77 ###############################################################################
78 # Downloading, checking, md5sum
79 ###############################################################################
81 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
84 $(patsubst %,$(DIR_DL)/%,$(objects)) :
87 $(subst %,%_MD5,$(objects)) :
90 ###############################################################################
91 # Installation Details
92 ###############################################################################
94 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
96 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
98 # Compile main package.
99 cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir
101 # Compile bundled plugins.
102 #cd $(DIR_APP) && for plugin in ...; do \
103 # make $(MAKETUNING) -C PLUGINS/src/$$plugin VDRDIR=$(DIR_APP) \
104 # CFLAGS="$(CFLAGS) -I$(DIR_APP)/include" \
105 # CXXFLAGS="$(CXXFLAGS) -I$(DIR_APP)/include" \
106 # PLGCFG=$(DIR_APP)/plugins.mk all || exit 1; \
109 # Install main package.
110 cd $(DIR_APP) && make install-bin install-dirs install-includes $(MAKE_OPTIONS)
111 mv -v /usr/bin/vdr /usr/sbin/vdr
113 sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \
114 < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr
115 chmod 755 /usr/sbin/runvdr
117 # Install configuration.
119 mkdir -pv /etc/sysconfig/vdr-plugins.d
120 cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
122 cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
124 # Link development files.
125 mkdir -pv /usr/lib/vdr
126 cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr
127 ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h
128 ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h
130 # Install start links and backup include file.
131 ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr
132 ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr
133 ln -sf ../init.d/vdr /etc/rc.d/rc6.d/K40vdr
134 install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \
135 /var/ipfire/backup/addons/includes/vdr