]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - lfs/vdr
vdr: fix packages names for updating from 1.6 to 2.x.
[people/teissler/ipfire-2.x.git] / lfs / vdr
CommitLineData
debeaeaa
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
08434343 4# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
debeaeaa
AF
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
55afc985 27VER = 2.0.1
08434343 28VDRPLUGVER = 2.0.0
debeaeaa
AF
29THISAPP = vdr-$(VER)
30DL_FILE = $(THISAPP).tar.bz2
98248635 31
debeaeaa
AF
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35PROG = vdr
d2be7786 36PAK_VER = 6
debeaeaa 37
58ccbbd4 38DEPS = "vdr_streamdev"
debeaeaa 39
d2be7786
MT
40MAKE_OPTIONS = \
41 PREFIX=/usr \
42 BINDIR=/usr/bin \
43 CACHEDIR=/var/cache/vdr \
44 CONFDIR=/etc/vdr \
c435d7dc 45 INCDIR=/usr/include \
d2be7786
MT
46 LIBDIR=/usr/lib/vdr \
47 LOCDIR=/usr/share/locale \
48 MANDIR=/usr/share/man \
49 RESDIR=/usr/share/vdr \
50 RUNDIR=/var/run \
51 VARDIR=/var \
52 VIDEODIR=/var/video \
53 CFLAGS="$(CFLAGS)" \
54 CXXFLAGS="$(CXXFLAGS)"
55
debeaeaa
AF
56###############################################################################
57# Top-level Rules
58###############################################################################
59
d2be7786 60objects = $(DL_FILE)
debeaeaa 61
d2be7786 62$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
debeaeaa 63
55afc985 64$(DL_FILE)_MD5 = e1b7a76c57c96300829dccd39eb20e7d
debeaeaa
AF
65
66install : $(TARGET)
67
68check : $(patsubst %,$(DIR_CHK)/%,$(objects))
69
98248635 70download : $(patsubst %,$(DIR_DL)/%,$(objects))
debeaeaa
AF
71
72md5 : $(subst %,%_MD5,$(objects))
73
74dist:
75 @$(PAK)
76
77###############################################################################
78# Downloading, checking, md5sum
79###############################################################################
80
81$(patsubst %,$(DIR_CHK)/%,$(objects)) :
82 @$(CHECK)
83
84$(patsubst %,$(DIR_DL)/%,$(objects)) :
85 @$(LOAD)
86
87$(subst %,%_MD5,$(objects)) :
88 @$(MD5)
89
90###############################################################################
91# Installation Details
92###############################################################################
93
94$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
95 @$(PREBUILD)
96 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cc24c14b 97
d2be7786
MT
98 # Compile main package.
99 cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir
100
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; \
107 #done
108
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
112
08434343 113 sed -e "s/VDR_PLUGIN_VERSION/$(VDRPLUGVER)/" \
d2be7786
MT
114 < $(DIR_SRC)/config/vdr/runvdr > /usr/sbin/runvdr
115 chmod 755 /usr/sbin/runvdr
116
117 # Install configuration.
118 mkdir -pv /etc/vdr
119 mkdir -pv /etc/sysconfig/vdr-plugins.d
90dc87b7
MT
120 cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
121 /etc/sysconfig/vdr
d2be7786
MT
122 cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
123
90dc87b7
MT
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
129
d2be7786 130 # Install start links and backup include file.
0e07ae54
AF
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
2a8c4fcb 134 install -v -m 644 $(DIR_SRC)/config/backup/includes/vdr \
d2be7786 135 /var/ipfire/backup/addons/includes/vdr
cc24c14b 136
debeaeaa
AF
137 @rm -rf $(DIR_APP)
138 @$(POSTBUILD)