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